001package org.hl7.fhir.r4.formats; 002 003import java.io.IOException; 004 005import org.hl7.fhir.exceptions.FHIRFormatError; 006 007/* 008 Copyright (c) 2011+, HL7, Inc. 009 All rights reserved. 010 011 Redistribution and use in source and binary forms, with or without modification, 012 are permitted provided that the following conditions are met: 013 014 * Redistributions of source code must retain the above copyright notice, this 015 list of conditions and the following disclaimer. 016 * Redistributions in binary form must reproduce the above copyright notice, 017 this list of conditions and the following disclaimer in the documentation 018 and/or other materials provided with the distribution. 019 * Neither the name of HL7 nor the names of its contributors may be used to 020 endorse or promote products derived from this software without specific 021 prior written permission. 022 023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 025 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 026 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 027 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 028 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 029 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 030 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 031 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 032 POSSIBILITY OF SUCH DAMAGE. 033 034*/ 035 036// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 037import org.hl7.fhir.r4.model.*; 038import org.hl7.fhir.utilities.Utilities; 039import org.xmlpull.v1.XmlPullParser; 040import org.xmlpull.v1.XmlPullParserException; 041 042public class XmlParser extends XmlParserBase { 043 044 public XmlParser() { 045 super(); 046 } 047 048 public XmlParser(XmlVersion ver) { 049 super(ver); 050 } 051 052 public XmlParser(boolean allowUnknownContent) { 053 super(); 054 setAllowUnknownContent(allowUnknownContent); 055 } 056 057 protected boolean parseElementContent(int eventType, XmlPullParser xpp, Element res) 058 throws XmlPullParserException, IOException, FHIRFormatError { 059 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) 060 res.getExtension().add(parseExtension(xpp)); 061 else 062 return false; 063 064 return true; 065 } 066 067 protected boolean parseBackboneElementContent(int eventType, XmlPullParser xpp, BackboneElement res) 068 throws XmlPullParserException, IOException, FHIRFormatError { 069 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) 070 res.getModifierExtension().add(parseExtension(xpp)); 071 else 072 return parseElementContent(eventType, xpp, res); 073 074 return true; 075 } 076 077 protected boolean parseBackboneElementContent(int eventType, XmlPullParser xpp, BackboneType res) 078 throws XmlPullParserException, IOException, FHIRFormatError { 079 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) 080 res.getModifierExtension().add(parseExtension(xpp)); 081 else 082 return parseElementContent(eventType, xpp, res); 083 084 return true; 085 } 086 087 @SuppressWarnings("unchecked") 088 protected <E extends Enum<E>> Enumeration<E> parseEnumeration(XmlPullParser xpp, E item, EnumFactory e) 089 throws XmlPullParserException, IOException, FHIRFormatError { 090 Enumeration<E> res = new Enumeration<E>(e); 091 parseElementAttributes(xpp, res); 092 res.setValue((E) e.fromCode(xpp.getAttributeValue(null, "value"))); 093 next(xpp); 094 int eventType = nextNoWhitespace(xpp); 095 while (eventType != XmlPullParser.END_TAG) { 096 if (!parseElementContent(eventType, xpp, res)) 097 unknownContent(xpp); 098 eventType = nextNoWhitespace(xpp); 099 } 100 next(xpp); 101 parseElementClose(res); 102 return res; 103 } 104 105 protected DateType parseDate(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 106 DateType res = new DateType(xpp.getAttributeValue(null, "value")); 107 parseElementAttributes(xpp, res); 108 next(xpp); 109 int eventType = nextNoWhitespace(xpp); 110 while (eventType != XmlPullParser.END_TAG) { 111 if (!parseElementContent(eventType, xpp, res)) 112 unknownContent(xpp); 113 eventType = nextNoWhitespace(xpp); 114 } 115 next(xpp); 116 parseElementClose(res); 117 return res; 118 } 119 120 protected DateTimeType parseDateTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 121 DateTimeType res = new DateTimeType(xpp.getAttributeValue(null, "value")); 122 parseElementAttributes(xpp, res); 123 next(xpp); 124 int eventType = nextNoWhitespace(xpp); 125 while (eventType != XmlPullParser.END_TAG) { 126 if (!parseElementContent(eventType, xpp, res)) 127 unknownContent(xpp); 128 eventType = nextNoWhitespace(xpp); 129 } 130 next(xpp); 131 parseElementClose(res); 132 return res; 133 } 134 135 protected CodeType parseCode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 136 CodeType res = new CodeType(xpp.getAttributeValue(null, "value")); 137 parseElementAttributes(xpp, res); 138 next(xpp); 139 int eventType = nextNoWhitespace(xpp); 140 while (eventType != XmlPullParser.END_TAG) { 141 if (!parseElementContent(eventType, xpp, res)) 142 unknownContent(xpp); 143 eventType = nextNoWhitespace(xpp); 144 } 145 next(xpp); 146 parseElementClose(res); 147 return res; 148 } 149 150 protected StringType parseString(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 151 StringType res = new StringType(xpp.getAttributeValue(null, "value")); 152 parseElementAttributes(xpp, res); 153 next(xpp); 154 int eventType = nextNoWhitespace(xpp); 155 while (eventType != XmlPullParser.END_TAG) { 156 if (!parseElementContent(eventType, xpp, res)) 157 unknownContent(xpp); 158 eventType = nextNoWhitespace(xpp); 159 } 160 next(xpp); 161 parseElementClose(res); 162 return res; 163 } 164 165 protected IntegerType parseInteger(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 166 IntegerType res = new IntegerType(xpp.getAttributeValue(null, "value")); 167 parseElementAttributes(xpp, res); 168 next(xpp); 169 int eventType = nextNoWhitespace(xpp); 170 while (eventType != XmlPullParser.END_TAG) { 171 if (!parseElementContent(eventType, xpp, res)) 172 unknownContent(xpp); 173 eventType = nextNoWhitespace(xpp); 174 } 175 next(xpp); 176 parseElementClose(res); 177 return res; 178 } 179 180 protected OidType parseOid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 181 OidType res = new OidType(xpp.getAttributeValue(null, "value")); 182 parseElementAttributes(xpp, res); 183 next(xpp); 184 int eventType = nextNoWhitespace(xpp); 185 while (eventType != XmlPullParser.END_TAG) { 186 if (!parseElementContent(eventType, xpp, res)) 187 unknownContent(xpp); 188 eventType = nextNoWhitespace(xpp); 189 } 190 next(xpp); 191 parseElementClose(res); 192 return res; 193 } 194 195 protected CanonicalType parseCanonical(XmlPullParser xpp) 196 throws XmlPullParserException, IOException, FHIRFormatError { 197 CanonicalType res = new CanonicalType(xpp.getAttributeValue(null, "value")); 198 parseElementAttributes(xpp, res); 199 next(xpp); 200 int eventType = nextNoWhitespace(xpp); 201 while (eventType != XmlPullParser.END_TAG) { 202 if (!parseElementContent(eventType, xpp, res)) 203 unknownContent(xpp); 204 eventType = nextNoWhitespace(xpp); 205 } 206 next(xpp); 207 parseElementClose(res); 208 return res; 209 } 210 211 protected UriType parseUri(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 212 UriType res = new UriType(xpp.getAttributeValue(null, "value")); 213 parseElementAttributes(xpp, res); 214 next(xpp); 215 int eventType = nextNoWhitespace(xpp); 216 while (eventType != XmlPullParser.END_TAG) { 217 if (!parseElementContent(eventType, xpp, res)) 218 unknownContent(xpp); 219 eventType = nextNoWhitespace(xpp); 220 } 221 next(xpp); 222 parseElementClose(res); 223 return res; 224 } 225 226 protected UuidType parseUuid(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 227 UuidType res = new UuidType(xpp.getAttributeValue(null, "value")); 228 parseElementAttributes(xpp, res); 229 next(xpp); 230 int eventType = nextNoWhitespace(xpp); 231 while (eventType != XmlPullParser.END_TAG) { 232 if (!parseElementContent(eventType, xpp, res)) 233 unknownContent(xpp); 234 eventType = nextNoWhitespace(xpp); 235 } 236 next(xpp); 237 parseElementClose(res); 238 return res; 239 } 240 241 protected UrlType parseUrl(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 242 UrlType res = new UrlType(xpp.getAttributeValue(null, "value")); 243 parseElementAttributes(xpp, res); 244 next(xpp); 245 int eventType = nextNoWhitespace(xpp); 246 while (eventType != XmlPullParser.END_TAG) { 247 if (!parseElementContent(eventType, xpp, res)) 248 unknownContent(xpp); 249 eventType = nextNoWhitespace(xpp); 250 } 251 next(xpp); 252 parseElementClose(res); 253 return res; 254 } 255 256 protected InstantType parseInstant(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 257 InstantType res = new InstantType(xpp.getAttributeValue(null, "value")); 258 parseElementAttributes(xpp, res); 259 next(xpp); 260 int eventType = nextNoWhitespace(xpp); 261 while (eventType != XmlPullParser.END_TAG) { 262 if (!parseElementContent(eventType, xpp, res)) 263 unknownContent(xpp); 264 eventType = nextNoWhitespace(xpp); 265 } 266 next(xpp); 267 parseElementClose(res); 268 return res; 269 } 270 271 protected BooleanType parseBoolean(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 272 BooleanType res = new BooleanType(xpp.getAttributeValue(null, "value")); 273 parseElementAttributes(xpp, res); 274 next(xpp); 275 int eventType = nextNoWhitespace(xpp); 276 while (eventType != XmlPullParser.END_TAG) { 277 if (!parseElementContent(eventType, xpp, res)) 278 unknownContent(xpp); 279 eventType = nextNoWhitespace(xpp); 280 } 281 next(xpp); 282 parseElementClose(res); 283 return res; 284 } 285 286 protected Base64BinaryType parseBase64Binary(XmlPullParser xpp) 287 throws XmlPullParserException, IOException, FHIRFormatError { 288 Base64BinaryType res = new Base64BinaryType(xpp.getAttributeValue(null, "value")); 289 parseElementAttributes(xpp, res); 290 next(xpp); 291 int eventType = nextNoWhitespace(xpp); 292 while (eventType != XmlPullParser.END_TAG) { 293 if (!parseElementContent(eventType, xpp, res)) 294 unknownContent(xpp); 295 eventType = nextNoWhitespace(xpp); 296 } 297 next(xpp); 298 parseElementClose(res); 299 return res; 300 } 301 302 protected UnsignedIntType parseUnsignedInt(XmlPullParser xpp) 303 throws XmlPullParserException, IOException, FHIRFormatError { 304 UnsignedIntType res = new UnsignedIntType(xpp.getAttributeValue(null, "value")); 305 parseElementAttributes(xpp, res); 306 next(xpp); 307 int eventType = nextNoWhitespace(xpp); 308 while (eventType != XmlPullParser.END_TAG) { 309 if (!parseElementContent(eventType, xpp, res)) 310 unknownContent(xpp); 311 eventType = nextNoWhitespace(xpp); 312 } 313 next(xpp); 314 parseElementClose(res); 315 return res; 316 } 317 318 protected MarkdownType parseMarkdown(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 319 MarkdownType res = new MarkdownType(xpp.getAttributeValue(null, "value")); 320 parseElementAttributes(xpp, res); 321 next(xpp); 322 int eventType = nextNoWhitespace(xpp); 323 while (eventType != XmlPullParser.END_TAG) { 324 if (!parseElementContent(eventType, xpp, res)) 325 unknownContent(xpp); 326 eventType = nextNoWhitespace(xpp); 327 } 328 next(xpp); 329 parseElementClose(res); 330 return res; 331 } 332 333 protected TimeType parseTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 334 TimeType res = new TimeType(xpp.getAttributeValue(null, "value")); 335 parseElementAttributes(xpp, res); 336 next(xpp); 337 int eventType = nextNoWhitespace(xpp); 338 while (eventType != XmlPullParser.END_TAG) { 339 if (!parseElementContent(eventType, xpp, res)) 340 unknownContent(xpp); 341 eventType = nextNoWhitespace(xpp); 342 } 343 next(xpp); 344 parseElementClose(res); 345 return res; 346 } 347 348 protected IdType parseId(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 349 IdType res = new IdType(xpp.getAttributeValue(null, "value")); 350 parseElementAttributes(xpp, res); 351 next(xpp); 352 int eventType = nextNoWhitespace(xpp); 353 while (eventType != XmlPullParser.END_TAG) { 354 if (!parseElementContent(eventType, xpp, res)) 355 unknownContent(xpp); 356 eventType = nextNoWhitespace(xpp); 357 } 358 next(xpp); 359 parseElementClose(res); 360 return res; 361 } 362 363 protected PositiveIntType parsePositiveInt(XmlPullParser xpp) 364 throws XmlPullParserException, IOException, FHIRFormatError { 365 PositiveIntType res = new PositiveIntType(xpp.getAttributeValue(null, "value")); 366 parseElementAttributes(xpp, res); 367 next(xpp); 368 int eventType = nextNoWhitespace(xpp); 369 while (eventType != XmlPullParser.END_TAG) { 370 if (!parseElementContent(eventType, xpp, res)) 371 unknownContent(xpp); 372 eventType = nextNoWhitespace(xpp); 373 } 374 next(xpp); 375 parseElementClose(res); 376 return res; 377 } 378 379 protected DecimalType parseDecimal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 380 DecimalType res = new DecimalType(xpp.getAttributeValue(null, "value")); 381 parseElementAttributes(xpp, res); 382 next(xpp); 383 int eventType = nextNoWhitespace(xpp); 384 while (eventType != XmlPullParser.END_TAG) { 385 if (!parseElementContent(eventType, xpp, res)) 386 unknownContent(xpp); 387 eventType = nextNoWhitespace(xpp); 388 } 389 next(xpp); 390 parseElementClose(res); 391 return res; 392 } 393 394 protected Extension parseExtension(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 395 Extension res = new Extension(); 396 parseElementAttributes(xpp, res); 397 if (xpp.getAttributeValue(null, "url") != null) 398 res.setUrl(xpp.getAttributeValue(null, "url")); 399 next(xpp); 400 int eventType = nextNoWhitespace(xpp); 401 while (eventType != XmlPullParser.END_TAG) { 402 if (!parseExtensionContent(eventType, xpp, res)) 403 unknownContent(xpp); 404 eventType = nextNoWhitespace(xpp); 405 } 406 next(xpp); 407 parseElementClose(res); 408 return res; 409 } 410 411 protected boolean parseExtensionContent(int eventType, XmlPullParser xpp, Extension res) 412 throws XmlPullParserException, IOException, FHIRFormatError { 413 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 414 res.setValue(parseType("value", xpp)); 415 } else if (!parseElementContent(eventType, xpp, res)) 416 return false; 417 return true; 418 } 419 420 protected Narrative parseNarrative(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 421 Narrative res = new Narrative(); 422 parseElementAttributes(xpp, res); 423 next(xpp); 424 int eventType = nextNoWhitespace(xpp); 425 while (eventType != XmlPullParser.END_TAG) { 426 if (!parseNarrativeContent(eventType, xpp, res)) 427 unknownContent(xpp); 428 eventType = nextNoWhitespace(xpp); 429 } 430 next(xpp); 431 parseElementClose(res); 432 return res; 433 } 434 435 protected boolean parseNarrativeContent(int eventType, XmlPullParser xpp, Narrative res) 436 throws XmlPullParserException, IOException, FHIRFormatError { 437 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 438 res.setStatusElement( 439 parseEnumeration(xpp, Narrative.NarrativeStatus.NULL, new Narrative.NarrativeStatusEnumFactory())); 440 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("div")) { 441 res.setDiv(parseXhtml(xpp)); 442 } else if (!parseElementContent(eventType, xpp, res)) 443 return false; 444 return true; 445 } 446 447 protected Meta parseMeta(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 448 Meta res = new Meta(); 449 parseTypeAttributes(xpp, res); 450 next(xpp); 451 int eventType = nextNoWhitespace(xpp); 452 while (eventType != XmlPullParser.END_TAG) { 453 if (!parseMetaContent(eventType, xpp, res)) 454 unknownContent(xpp); 455 eventType = nextNoWhitespace(xpp); 456 } 457 next(xpp); 458 parseElementClose(res); 459 return res; 460 } 461 462 protected boolean parseMetaContent(int eventType, XmlPullParser xpp, Meta res) 463 throws XmlPullParserException, IOException, FHIRFormatError { 464 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { 465 res.setVersionIdElement(parseId(xpp)); 466 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastUpdated")) { 467 res.setLastUpdatedElement(parseInstant(xpp)); 468 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 469 res.setSourceElement(parseUri(xpp)); 470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 471 res.getProfile().add(parseCanonical(xpp)); 472 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { 473 res.getSecurity().add(parseCoding(xpp)); 474 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tag")) { 475 res.getTag().add(parseCoding(xpp)); 476 } else if (!parseElementContent(eventType, xpp, res)) 477 return false; 478 return true; 479 } 480 481 protected Address parseAddress(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 482 Address res = new Address(); 483 parseTypeAttributes(xpp, res); 484 next(xpp); 485 int eventType = nextNoWhitespace(xpp); 486 while (eventType != XmlPullParser.END_TAG) { 487 if (!parseAddressContent(eventType, xpp, res)) 488 unknownContent(xpp); 489 eventType = nextNoWhitespace(xpp); 490 } 491 next(xpp); 492 parseElementClose(res); 493 return res; 494 } 495 496 protected boolean parseAddressContent(int eventType, XmlPullParser xpp, Address res) 497 throws XmlPullParserException, IOException, FHIRFormatError { 498 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 499 res.setUseElement(parseEnumeration(xpp, Address.AddressUse.NULL, new Address.AddressUseEnumFactory())); 500 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 501 res.setTypeElement(parseEnumeration(xpp, Address.AddressType.NULL, new Address.AddressTypeEnumFactory())); 502 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 503 res.setTextElement(parseString(xpp)); 504 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("line")) { 505 res.getLine().add(parseString(xpp)); 506 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("city")) { 507 res.setCityElement(parseString(xpp)); 508 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("district")) { 509 res.setDistrictElement(parseString(xpp)); 510 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { 511 res.setStateElement(parseString(xpp)); 512 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("postalCode")) { 513 res.setPostalCodeElement(parseString(xpp)); 514 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 515 res.setCountryElement(parseString(xpp)); 516 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 517 res.setPeriod(parsePeriod(xpp)); 518 } else if (!parseElementContent(eventType, xpp, res)) 519 return false; 520 return true; 521 } 522 523 protected Contributor parseContributor(XmlPullParser xpp) 524 throws XmlPullParserException, IOException, FHIRFormatError { 525 Contributor res = new Contributor(); 526 parseTypeAttributes(xpp, res); 527 next(xpp); 528 int eventType = nextNoWhitespace(xpp); 529 while (eventType != XmlPullParser.END_TAG) { 530 if (!parseContributorContent(eventType, xpp, res)) 531 unknownContent(xpp); 532 eventType = nextNoWhitespace(xpp); 533 } 534 next(xpp); 535 parseElementClose(res); 536 return res; 537 } 538 539 protected boolean parseContributorContent(int eventType, XmlPullParser xpp, Contributor res) 540 throws XmlPullParserException, IOException, FHIRFormatError { 541 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 542 res.setTypeElement( 543 parseEnumeration(xpp, Contributor.ContributorType.NULL, new Contributor.ContributorTypeEnumFactory())); 544 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 545 res.setNameElement(parseString(xpp)); 546 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 547 res.getContact().add(parseContactDetail(xpp)); 548 } else if (!parseElementContent(eventType, xpp, res)) 549 return false; 550 return true; 551 } 552 553 protected Attachment parseAttachment(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 554 Attachment res = new Attachment(); 555 parseTypeAttributes(xpp, res); 556 next(xpp); 557 int eventType = nextNoWhitespace(xpp); 558 while (eventType != XmlPullParser.END_TAG) { 559 if (!parseAttachmentContent(eventType, xpp, res)) 560 unknownContent(xpp); 561 eventType = nextNoWhitespace(xpp); 562 } 563 next(xpp); 564 parseElementClose(res); 565 return res; 566 } 567 568 protected boolean parseAttachmentContent(int eventType, XmlPullParser xpp, Attachment res) 569 throws XmlPullParserException, IOException, FHIRFormatError { 570 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { 571 res.setContentTypeElement(parseCode(xpp)); 572 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 573 res.setLanguageElement(parseCode(xpp)); 574 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 575 res.setDataElement(parseBase64Binary(xpp)); 576 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 577 res.setUrlElement(parseUrl(xpp)); 578 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("size")) { 579 res.setSizeElement(parseUnsignedInt(xpp)); 580 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hash")) { 581 res.setHashElement(parseBase64Binary(xpp)); 582 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 583 res.setTitleElement(parseString(xpp)); 584 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("creation")) { 585 res.setCreationElement(parseDateTime(xpp)); 586 } else if (!parseElementContent(eventType, xpp, res)) 587 return false; 588 return true; 589 } 590 591 protected Count parseCount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 592 Count res = new Count(); 593 parseTypeAttributes(xpp, res); 594 next(xpp); 595 int eventType = nextNoWhitespace(xpp); 596 while (eventType != XmlPullParser.END_TAG) { 597 if (!parseCountContent(eventType, xpp, res)) 598 unknownContent(xpp); 599 eventType = nextNoWhitespace(xpp); 600 } 601 next(xpp); 602 parseElementClose(res); 603 return res; 604 } 605 606 protected boolean parseCountContent(int eventType, XmlPullParser xpp, Count res) 607 throws XmlPullParserException, IOException, FHIRFormatError { 608 if (!parseQuantityContent(eventType, xpp, res)) 609 return false; 610 return true; 611 } 612 613 protected DataRequirement parseDataRequirement(XmlPullParser xpp) 614 throws XmlPullParserException, IOException, FHIRFormatError { 615 DataRequirement res = new DataRequirement(); 616 parseTypeAttributes(xpp, res); 617 next(xpp); 618 int eventType = nextNoWhitespace(xpp); 619 while (eventType != XmlPullParser.END_TAG) { 620 if (!parseDataRequirementContent(eventType, xpp, res)) 621 unknownContent(xpp); 622 eventType = nextNoWhitespace(xpp); 623 } 624 next(xpp); 625 parseElementClose(res); 626 return res; 627 } 628 629 protected boolean parseDataRequirementContent(int eventType, XmlPullParser xpp, DataRequirement res) 630 throws XmlPullParserException, IOException, FHIRFormatError { 631 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 632 res.setTypeElement(parseCode(xpp)); 633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 634 res.getProfile().add(parseCanonical(xpp)); 635 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 636 res.setSubject(parseType("subject", xpp)); 637 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { 638 res.getMustSupport().add(parseString(xpp)); 639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codeFilter")) { 640 res.getCodeFilter().add(parseDataRequirementDataRequirementCodeFilterComponent(xpp, res)); 641 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateFilter")) { 642 res.getDateFilter().add(parseDataRequirementDataRequirementDateFilterComponent(xpp, res)); 643 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("limit")) { 644 res.setLimitElement(parsePositiveInt(xpp)); 645 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sort")) { 646 res.getSort().add(parseDataRequirementDataRequirementSortComponent(xpp, res)); 647 } else if (!parseElementContent(eventType, xpp, res)) 648 return false; 649 return true; 650 } 651 652 protected DataRequirement.DataRequirementCodeFilterComponent parseDataRequirementDataRequirementCodeFilterComponent( 653 XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { 654 DataRequirement.DataRequirementCodeFilterComponent res = new DataRequirement.DataRequirementCodeFilterComponent(); 655 parseElementAttributes(xpp, res); 656 next(xpp); 657 int eventType = nextNoWhitespace(xpp); 658 while (eventType != XmlPullParser.END_TAG) { 659 if (!parseDataRequirementDataRequirementCodeFilterComponentContent(eventType, xpp, owner, res)) 660 unknownContent(xpp); 661 eventType = nextNoWhitespace(xpp); 662 } 663 next(xpp); 664 parseElementClose(res); 665 return res; 666 } 667 668 protected boolean parseDataRequirementDataRequirementCodeFilterComponentContent(int eventType, XmlPullParser xpp, 669 DataRequirement owner, DataRequirement.DataRequirementCodeFilterComponent res) 670 throws XmlPullParserException, IOException, FHIRFormatError { 671 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 672 res.setPathElement(parseString(xpp)); 673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { 674 res.setSearchParamElement(parseString(xpp)); 675 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { 676 res.setValueSetElement(parseCanonical(xpp)); 677 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 678 res.getCode().add(parseCoding(xpp)); 679 } else if (!parseElementContent(eventType, xpp, res)) 680 return false; 681 return true; 682 } 683 684 protected DataRequirement.DataRequirementDateFilterComponent parseDataRequirementDataRequirementDateFilterComponent( 685 XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { 686 DataRequirement.DataRequirementDateFilterComponent res = new DataRequirement.DataRequirementDateFilterComponent(); 687 parseElementAttributes(xpp, res); 688 next(xpp); 689 int eventType = nextNoWhitespace(xpp); 690 while (eventType != XmlPullParser.END_TAG) { 691 if (!parseDataRequirementDataRequirementDateFilterComponentContent(eventType, xpp, owner, res)) 692 unknownContent(xpp); 693 eventType = nextNoWhitespace(xpp); 694 } 695 next(xpp); 696 parseElementClose(res); 697 return res; 698 } 699 700 protected boolean parseDataRequirementDataRequirementDateFilterComponentContent(int eventType, XmlPullParser xpp, 701 DataRequirement owner, DataRequirement.DataRequirementDateFilterComponent res) 702 throws XmlPullParserException, IOException, FHIRFormatError { 703 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 704 res.setPathElement(parseString(xpp)); 705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { 706 res.setSearchParamElement(parseString(xpp)); 707 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 708 res.setValue(parseType("value", xpp)); 709 } else if (!parseElementContent(eventType, xpp, res)) 710 return false; 711 return true; 712 } 713 714 protected DataRequirement.DataRequirementSortComponent parseDataRequirementDataRequirementSortComponent( 715 XmlPullParser xpp, DataRequirement owner) throws XmlPullParserException, IOException, FHIRFormatError { 716 DataRequirement.DataRequirementSortComponent res = new DataRequirement.DataRequirementSortComponent(); 717 parseElementAttributes(xpp, res); 718 next(xpp); 719 int eventType = nextNoWhitespace(xpp); 720 while (eventType != XmlPullParser.END_TAG) { 721 if (!parseDataRequirementDataRequirementSortComponentContent(eventType, xpp, owner, res)) 722 unknownContent(xpp); 723 eventType = nextNoWhitespace(xpp); 724 } 725 next(xpp); 726 parseElementClose(res); 727 return res; 728 } 729 730 protected boolean parseDataRequirementDataRequirementSortComponentContent(int eventType, XmlPullParser xpp, 731 DataRequirement owner, DataRequirement.DataRequirementSortComponent res) 732 throws XmlPullParserException, IOException, FHIRFormatError { 733 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 734 res.setPathElement(parseString(xpp)); 735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("direction")) { 736 res.setDirectionElement( 737 parseEnumeration(xpp, DataRequirement.SortDirection.NULL, new DataRequirement.SortDirectionEnumFactory())); 738 } else if (!parseElementContent(eventType, xpp, res)) 739 return false; 740 return true; 741 } 742 743 protected Dosage parseDosage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 744 Dosage res = new Dosage(); 745 parseTypeAttributes(xpp, res); 746 next(xpp); 747 int eventType = nextNoWhitespace(xpp); 748 while (eventType != XmlPullParser.END_TAG) { 749 if (!parseDosageContent(eventType, xpp, res)) 750 unknownContent(xpp); 751 eventType = nextNoWhitespace(xpp); 752 } 753 next(xpp); 754 parseElementClose(res); 755 return res; 756 } 757 758 protected boolean parseDosageContent(int eventType, XmlPullParser xpp, Dosage res) 759 throws XmlPullParserException, IOException, FHIRFormatError { 760 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 761 res.setSequenceElement(parseInteger(xpp)); 762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 763 res.setTextElement(parseString(xpp)); 764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalInstruction")) { 765 res.getAdditionalInstruction().add(parseCodeableConcept(xpp)); 766 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientInstruction")) { 767 res.setPatientInstructionElement(parseString(xpp)); 768 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timing")) { 769 res.setTiming(parseTiming(xpp)); 770 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { 771 res.setAsNeeded(parseType("asNeeded", xpp)); 772 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 773 res.setSite(parseCodeableConcept(xpp)); 774 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { 775 res.setRoute(parseCodeableConcept(xpp)); 776 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 777 res.setMethod(parseCodeableConcept(xpp)); 778 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseAndRate")) { 779 res.getDoseAndRate().add(parseDosageDosageDoseAndRateComponent(xpp, res)); 780 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerPeriod")) { 781 res.setMaxDosePerPeriod(parseRatio(xpp)); 782 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerAdministration")) { 783 res.setMaxDosePerAdministration(parseQuantity(xpp)); 784 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerLifetime")) { 785 res.setMaxDosePerLifetime(parseQuantity(xpp)); 786 } else if (!parseBackboneElementContent(eventType, xpp, res)) 787 return false; 788 return true; 789 } 790 791 protected Dosage.DosageDoseAndRateComponent parseDosageDosageDoseAndRateComponent(XmlPullParser xpp, Dosage owner) 792 throws XmlPullParserException, IOException, FHIRFormatError { 793 Dosage.DosageDoseAndRateComponent res = new Dosage.DosageDoseAndRateComponent(); 794 parseElementAttributes(xpp, res); 795 next(xpp); 796 int eventType = nextNoWhitespace(xpp); 797 while (eventType != XmlPullParser.END_TAG) { 798 if (!parseDosageDosageDoseAndRateComponentContent(eventType, xpp, owner, res)) 799 unknownContent(xpp); 800 eventType = nextNoWhitespace(xpp); 801 } 802 next(xpp); 803 parseElementClose(res); 804 return res; 805 } 806 807 protected boolean parseDosageDosageDoseAndRateComponentContent(int eventType, XmlPullParser xpp, Dosage owner, 808 Dosage.DosageDoseAndRateComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 809 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 810 res.setType(parseCodeableConcept(xpp)); 811 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "dose")) { 812 res.setDose(parseType("dose", xpp)); 813 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { 814 res.setRate(parseType("rate", xpp)); 815 } else if (!parseElementContent(eventType, xpp, res)) 816 return false; 817 return true; 818 } 819 820 protected Money parseMoney(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 821 Money res = new Money(); 822 parseTypeAttributes(xpp, res); 823 next(xpp); 824 int eventType = nextNoWhitespace(xpp); 825 while (eventType != XmlPullParser.END_TAG) { 826 if (!parseMoneyContent(eventType, xpp, res)) 827 unknownContent(xpp); 828 eventType = nextNoWhitespace(xpp); 829 } 830 next(xpp); 831 parseElementClose(res); 832 return res; 833 } 834 835 protected boolean parseMoneyContent(int eventType, XmlPullParser xpp, Money res) 836 throws XmlPullParserException, IOException, FHIRFormatError { 837 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 838 res.setValueElement(parseDecimal(xpp)); 839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("currency")) { 840 res.setCurrencyElement(parseCode(xpp)); 841 } else if (!parseElementContent(eventType, xpp, res)) 842 return false; 843 return true; 844 } 845 846 protected HumanName parseHumanName(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 847 HumanName res = new HumanName(); 848 parseTypeAttributes(xpp, res); 849 next(xpp); 850 int eventType = nextNoWhitespace(xpp); 851 while (eventType != XmlPullParser.END_TAG) { 852 if (!parseHumanNameContent(eventType, xpp, res)) 853 unknownContent(xpp); 854 eventType = nextNoWhitespace(xpp); 855 } 856 next(xpp); 857 parseElementClose(res); 858 return res; 859 } 860 861 protected boolean parseHumanNameContent(int eventType, XmlPullParser xpp, HumanName res) 862 throws XmlPullParserException, IOException, FHIRFormatError { 863 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 864 res.setUseElement(parseEnumeration(xpp, HumanName.NameUse.NULL, new HumanName.NameUseEnumFactory())); 865 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 866 res.setTextElement(parseString(xpp)); 867 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("family")) { 868 res.setFamilyElement(parseString(xpp)); 869 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("given")) { 870 res.getGiven().add(parseString(xpp)); 871 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { 872 res.getPrefix().add(parseString(xpp)); 873 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suffix")) { 874 res.getSuffix().add(parseString(xpp)); 875 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 876 res.setPeriod(parsePeriod(xpp)); 877 } else if (!parseElementContent(eventType, xpp, res)) 878 return false; 879 return true; 880 } 881 882 protected ContactPoint parseContactPoint(XmlPullParser xpp) 883 throws XmlPullParserException, IOException, FHIRFormatError { 884 ContactPoint res = new ContactPoint(); 885 parseTypeAttributes(xpp, res); 886 next(xpp); 887 int eventType = nextNoWhitespace(xpp); 888 while (eventType != XmlPullParser.END_TAG) { 889 if (!parseContactPointContent(eventType, xpp, res)) 890 unknownContent(xpp); 891 eventType = nextNoWhitespace(xpp); 892 } 893 next(xpp); 894 parseElementClose(res); 895 return res; 896 } 897 898 protected boolean parseContactPointContent(int eventType, XmlPullParser xpp, ContactPoint res) 899 throws XmlPullParserException, IOException, FHIRFormatError { 900 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 901 res.setSystemElement(parseEnumeration(xpp, ContactPoint.ContactPointSystem.NULL, 902 new ContactPoint.ContactPointSystemEnumFactory())); 903 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 904 res.setValueElement(parseString(xpp)); 905 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 906 res.setUseElement( 907 parseEnumeration(xpp, ContactPoint.ContactPointUse.NULL, new ContactPoint.ContactPointUseEnumFactory())); 908 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { 909 res.setRankElement(parsePositiveInt(xpp)); 910 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 911 res.setPeriod(parsePeriod(xpp)); 912 } else if (!parseElementContent(eventType, xpp, res)) 913 return false; 914 return true; 915 } 916 917 protected MarketingStatus parseMarketingStatus(XmlPullParser xpp) 918 throws XmlPullParserException, IOException, FHIRFormatError { 919 MarketingStatus res = new MarketingStatus(); 920 parseTypeAttributes(xpp, res); 921 next(xpp); 922 int eventType = nextNoWhitespace(xpp); 923 while (eventType != XmlPullParser.END_TAG) { 924 if (!parseMarketingStatusContent(eventType, xpp, res)) 925 unknownContent(xpp); 926 eventType = nextNoWhitespace(xpp); 927 } 928 next(xpp); 929 parseElementClose(res); 930 return res; 931 } 932 933 protected boolean parseMarketingStatusContent(int eventType, XmlPullParser xpp, MarketingStatus res) 934 throws XmlPullParserException, IOException, FHIRFormatError { 935 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 936 res.setCountry(parseCodeableConcept(xpp)); 937 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 938 res.setJurisdiction(parseCodeableConcept(xpp)); 939 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 940 res.setStatus(parseCodeableConcept(xpp)); 941 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateRange")) { 942 res.setDateRange(parsePeriod(xpp)); 943 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("restoreDate")) { 944 res.setRestoreDateElement(parseDateTime(xpp)); 945 } else if (!parseBackboneElementContent(eventType, xpp, res)) 946 return false; 947 return true; 948 } 949 950 protected Identifier parseIdentifier(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 951 Identifier res = new Identifier(); 952 parseTypeAttributes(xpp, res); 953 next(xpp); 954 int eventType = nextNoWhitespace(xpp); 955 while (eventType != XmlPullParser.END_TAG) { 956 if (!parseIdentifierContent(eventType, xpp, res)) 957 unknownContent(xpp); 958 eventType = nextNoWhitespace(xpp); 959 } 960 next(xpp); 961 parseElementClose(res); 962 return res; 963 } 964 965 protected boolean parseIdentifierContent(int eventType, XmlPullParser xpp, Identifier res) 966 throws XmlPullParserException, IOException, FHIRFormatError { 967 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 968 res.setUseElement( 969 parseEnumeration(xpp, Identifier.IdentifierUse.NULL, new Identifier.IdentifierUseEnumFactory())); 970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 971 res.setType(parseCodeableConcept(xpp)); 972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 973 res.setSystemElement(parseUri(xpp)); 974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 975 res.setValueElement(parseString(xpp)); 976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 977 res.setPeriod(parsePeriod(xpp)); 978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assigner")) { 979 res.setAssigner(parseReference(xpp)); 980 } else if (!parseElementContent(eventType, xpp, res)) 981 return false; 982 return true; 983 } 984 985 protected SubstanceAmount parseSubstanceAmount(XmlPullParser xpp) 986 throws XmlPullParserException, IOException, FHIRFormatError { 987 SubstanceAmount res = new SubstanceAmount(); 988 parseTypeAttributes(xpp, res); 989 next(xpp); 990 int eventType = nextNoWhitespace(xpp); 991 while (eventType != XmlPullParser.END_TAG) { 992 if (!parseSubstanceAmountContent(eventType, xpp, res)) 993 unknownContent(xpp); 994 eventType = nextNoWhitespace(xpp); 995 } 996 next(xpp); 997 parseElementClose(res); 998 return res; 999 } 1000 1001 protected boolean parseSubstanceAmountContent(int eventType, XmlPullParser xpp, SubstanceAmount res) 1002 throws XmlPullParserException, IOException, FHIRFormatError { 1003 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "amount")) { 1004 res.setAmount(parseType("amount", xpp)); 1005 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amountType")) { 1006 res.setAmountType(parseCodeableConcept(xpp)); 1007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amountText")) { 1008 res.setAmountTextElement(parseString(xpp)); 1009 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { 1010 res.setReferenceRange(parseSubstanceAmountSubstanceAmountReferenceRangeComponent(xpp, res)); 1011 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1012 return false; 1013 return true; 1014 } 1015 1016 protected SubstanceAmount.SubstanceAmountReferenceRangeComponent parseSubstanceAmountSubstanceAmountReferenceRangeComponent( 1017 XmlPullParser xpp, SubstanceAmount owner) throws XmlPullParserException, IOException, FHIRFormatError { 1018 SubstanceAmount.SubstanceAmountReferenceRangeComponent res = new SubstanceAmount.SubstanceAmountReferenceRangeComponent(); 1019 parseElementAttributes(xpp, res); 1020 next(xpp); 1021 int eventType = nextNoWhitespace(xpp); 1022 while (eventType != XmlPullParser.END_TAG) { 1023 if (!parseSubstanceAmountSubstanceAmountReferenceRangeComponentContent(eventType, xpp, owner, res)) 1024 unknownContent(xpp); 1025 eventType = nextNoWhitespace(xpp); 1026 } 1027 next(xpp); 1028 parseElementClose(res); 1029 return res; 1030 } 1031 1032 protected boolean parseSubstanceAmountSubstanceAmountReferenceRangeComponentContent(int eventType, XmlPullParser xpp, 1033 SubstanceAmount owner, SubstanceAmount.SubstanceAmountReferenceRangeComponent res) 1034 throws XmlPullParserException, IOException, FHIRFormatError { 1035 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lowLimit")) { 1036 res.setLowLimit(parseQuantity(xpp)); 1037 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("highLimit")) { 1038 res.setHighLimit(parseQuantity(xpp)); 1039 } else if (!parseElementContent(eventType, xpp, res)) 1040 return false; 1041 return true; 1042 } 1043 1044 protected Coding parseCoding(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1045 Coding res = new Coding(); 1046 parseTypeAttributes(xpp, res); 1047 next(xpp); 1048 int eventType = nextNoWhitespace(xpp); 1049 while (eventType != XmlPullParser.END_TAG) { 1050 if (!parseCodingContent(eventType, xpp, res)) 1051 unknownContent(xpp); 1052 eventType = nextNoWhitespace(xpp); 1053 } 1054 next(xpp); 1055 parseElementClose(res); 1056 return res; 1057 } 1058 1059 protected boolean parseCodingContent(int eventType, XmlPullParser xpp, Coding res) 1060 throws XmlPullParserException, IOException, FHIRFormatError { 1061 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 1062 res.setSystemElement(parseUri(xpp)); 1063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 1064 res.setVersionElement(parseString(xpp)); 1065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1066 res.setCodeElement(parseCode(xpp)); 1067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 1068 res.setDisplayElement(parseString(xpp)); 1069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("userSelected")) { 1070 res.setUserSelectedElement(parseBoolean(xpp)); 1071 } else if (!parseElementContent(eventType, xpp, res)) 1072 return false; 1073 return true; 1074 } 1075 1076 protected SampledData parseSampledData(XmlPullParser xpp) 1077 throws XmlPullParserException, IOException, FHIRFormatError { 1078 SampledData res = new SampledData(); 1079 parseTypeAttributes(xpp, res); 1080 next(xpp); 1081 int eventType = nextNoWhitespace(xpp); 1082 while (eventType != XmlPullParser.END_TAG) { 1083 if (!parseSampledDataContent(eventType, xpp, res)) 1084 unknownContent(xpp); 1085 eventType = nextNoWhitespace(xpp); 1086 } 1087 next(xpp); 1088 parseElementClose(res); 1089 return res; 1090 } 1091 1092 protected boolean parseSampledDataContent(int eventType, XmlPullParser xpp, SampledData res) 1093 throws XmlPullParserException, IOException, FHIRFormatError { 1094 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { 1095 res.setOrigin(parseQuantity(xpp)); 1096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 1097 res.setPeriodElement(parseDecimal(xpp)); 1098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 1099 res.setFactorElement(parseDecimal(xpp)); 1100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lowerLimit")) { 1101 res.setLowerLimitElement(parseDecimal(xpp)); 1102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("upperLimit")) { 1103 res.setUpperLimitElement(parseDecimal(xpp)); 1104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dimensions")) { 1105 res.setDimensionsElement(parsePositiveInt(xpp)); 1106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 1107 res.setDataElement(parseString(xpp)); 1108 } else if (!parseElementContent(eventType, xpp, res)) 1109 return false; 1110 return true; 1111 } 1112 1113 protected Population parsePopulation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1114 Population res = new Population(); 1115 parseTypeAttributes(xpp, res); 1116 next(xpp); 1117 int eventType = nextNoWhitespace(xpp); 1118 while (eventType != XmlPullParser.END_TAG) { 1119 if (!parsePopulationContent(eventType, xpp, res)) 1120 unknownContent(xpp); 1121 eventType = nextNoWhitespace(xpp); 1122 } 1123 next(xpp); 1124 parseElementClose(res); 1125 return res; 1126 } 1127 1128 protected boolean parsePopulationContent(int eventType, XmlPullParser xpp, Population res) 1129 throws XmlPullParserException, IOException, FHIRFormatError { 1130 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "age")) { 1131 res.setAge(parseType("age", xpp)); 1132 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 1133 res.setGender(parseCodeableConcept(xpp)); 1134 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("race")) { 1135 res.setRace(parseCodeableConcept(xpp)); 1136 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physiologicalCondition")) { 1137 res.setPhysiologicalCondition(parseCodeableConcept(xpp)); 1138 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1139 return false; 1140 return true; 1141 } 1142 1143 protected Ratio parseRatio(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1144 Ratio res = new Ratio(); 1145 parseTypeAttributes(xpp, res); 1146 next(xpp); 1147 int eventType = nextNoWhitespace(xpp); 1148 while (eventType != XmlPullParser.END_TAG) { 1149 if (!parseRatioContent(eventType, xpp, res)) 1150 unknownContent(xpp); 1151 eventType = nextNoWhitespace(xpp); 1152 } 1153 next(xpp); 1154 parseElementClose(res); 1155 return res; 1156 } 1157 1158 protected boolean parseRatioContent(int eventType, XmlPullParser xpp, Ratio res) 1159 throws XmlPullParserException, IOException, FHIRFormatError { 1160 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numerator")) { 1161 res.setNumerator(parseQuantity(xpp)); 1162 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("denominator")) { 1163 res.setDenominator(parseQuantity(xpp)); 1164 } else if (!parseElementContent(eventType, xpp, res)) 1165 return false; 1166 return true; 1167 } 1168 1169 protected Distance parseDistance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1170 Distance res = new Distance(); 1171 parseTypeAttributes(xpp, res); 1172 next(xpp); 1173 int eventType = nextNoWhitespace(xpp); 1174 while (eventType != XmlPullParser.END_TAG) { 1175 if (!parseDistanceContent(eventType, xpp, res)) 1176 unknownContent(xpp); 1177 eventType = nextNoWhitespace(xpp); 1178 } 1179 next(xpp); 1180 parseElementClose(res); 1181 return res; 1182 } 1183 1184 protected boolean parseDistanceContent(int eventType, XmlPullParser xpp, Distance res) 1185 throws XmlPullParserException, IOException, FHIRFormatError { 1186 if (!parseQuantityContent(eventType, xpp, res)) 1187 return false; 1188 return true; 1189 } 1190 1191 protected Age parseAge(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1192 Age res = new Age(); 1193 parseTypeAttributes(xpp, res); 1194 next(xpp); 1195 int eventType = nextNoWhitespace(xpp); 1196 while (eventType != XmlPullParser.END_TAG) { 1197 if (!parseAgeContent(eventType, xpp, res)) 1198 unknownContent(xpp); 1199 eventType = nextNoWhitespace(xpp); 1200 } 1201 next(xpp); 1202 parseElementClose(res); 1203 return res; 1204 } 1205 1206 protected boolean parseAgeContent(int eventType, XmlPullParser xpp, Age res) 1207 throws XmlPullParserException, IOException, FHIRFormatError { 1208 if (!parseQuantityContent(eventType, xpp, res)) 1209 return false; 1210 return true; 1211 } 1212 1213 protected Reference parseReference(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1214 Reference res = new Reference(); 1215 parseTypeAttributes(xpp, res); 1216 next(xpp); 1217 int eventType = nextNoWhitespace(xpp); 1218 while (eventType != XmlPullParser.END_TAG) { 1219 if (!parseReferenceContent(eventType, xpp, res)) 1220 unknownContent(xpp); 1221 eventType = nextNoWhitespace(xpp); 1222 } 1223 next(xpp); 1224 parseElementClose(res); 1225 return res; 1226 } 1227 1228 protected boolean parseReferenceContent(int eventType, XmlPullParser xpp, Reference res) 1229 throws XmlPullParserException, IOException, FHIRFormatError { 1230 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 1231 res.setReferenceElement(parseString(xpp)); 1232 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1233 res.setTypeElement(parseUri(xpp)); 1234 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 1235 res.setIdentifier(parseIdentifier(xpp)); 1236 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 1237 res.setDisplayElement(parseString(xpp)); 1238 } else if (!parseElementContent(eventType, xpp, res)) 1239 return false; 1240 return true; 1241 } 1242 1243 protected TriggerDefinition parseTriggerDefinition(XmlPullParser xpp) 1244 throws XmlPullParserException, IOException, FHIRFormatError { 1245 TriggerDefinition res = new TriggerDefinition(); 1246 parseTypeAttributes(xpp, res); 1247 next(xpp); 1248 int eventType = nextNoWhitespace(xpp); 1249 while (eventType != XmlPullParser.END_TAG) { 1250 if (!parseTriggerDefinitionContent(eventType, xpp, res)) 1251 unknownContent(xpp); 1252 eventType = nextNoWhitespace(xpp); 1253 } 1254 next(xpp); 1255 parseElementClose(res); 1256 return res; 1257 } 1258 1259 protected boolean parseTriggerDefinitionContent(int eventType, XmlPullParser xpp, TriggerDefinition res) 1260 throws XmlPullParserException, IOException, FHIRFormatError { 1261 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1262 res.setTypeElement( 1263 parseEnumeration(xpp, TriggerDefinition.TriggerType.NULL, new TriggerDefinition.TriggerTypeEnumFactory())); 1264 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 1265 res.setNameElement(parseString(xpp)); 1266 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 1267 res.setTiming(parseType("timing", xpp)); 1268 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 1269 res.getData().add(parseDataRequirement(xpp)); 1270 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 1271 res.setCondition(parseExpression(xpp)); 1272 } else if (!parseElementContent(eventType, xpp, res)) 1273 return false; 1274 return true; 1275 } 1276 1277 protected Quantity parseQuantity(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1278 Quantity res = new Quantity(); 1279 parseTypeAttributes(xpp, res); 1280 next(xpp); 1281 int eventType = nextNoWhitespace(xpp); 1282 while (eventType != XmlPullParser.END_TAG) { 1283 if (!parseQuantityContent(eventType, xpp, res)) 1284 unknownContent(xpp); 1285 eventType = nextNoWhitespace(xpp); 1286 } 1287 next(xpp); 1288 parseElementClose(res); 1289 return res; 1290 } 1291 1292 protected boolean parseQuantityContent(int eventType, XmlPullParser xpp, Quantity res) 1293 throws XmlPullParserException, IOException, FHIRFormatError { 1294 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 1295 res.setValueElement(parseDecimal(xpp)); 1296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { 1297 res.setComparatorElement( 1298 parseEnumeration(xpp, Quantity.QuantityComparator.NULL, new Quantity.QuantityComparatorEnumFactory())); 1299 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { 1300 res.setUnitElement(parseString(xpp)); 1301 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 1302 res.setSystemElement(parseUri(xpp)); 1303 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1304 res.setCodeElement(parseCode(xpp)); 1305 } else if (!parseElementContent(eventType, xpp, res)) 1306 return false; 1307 return true; 1308 } 1309 1310 protected Period parsePeriod(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1311 Period res = new Period(); 1312 parseTypeAttributes(xpp, res); 1313 next(xpp); 1314 int eventType = nextNoWhitespace(xpp); 1315 while (eventType != XmlPullParser.END_TAG) { 1316 if (!parsePeriodContent(eventType, xpp, res)) 1317 unknownContent(xpp); 1318 eventType = nextNoWhitespace(xpp); 1319 } 1320 next(xpp); 1321 parseElementClose(res); 1322 return res; 1323 } 1324 1325 protected boolean parsePeriodContent(int eventType, XmlPullParser xpp, Period res) 1326 throws XmlPullParserException, IOException, FHIRFormatError { 1327 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 1328 res.setStartElement(parseDateTime(xpp)); 1329 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 1330 res.setEndElement(parseDateTime(xpp)); 1331 } else if (!parseElementContent(eventType, xpp, res)) 1332 return false; 1333 return true; 1334 } 1335 1336 protected Duration parseDuration(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1337 Duration res = new Duration(); 1338 parseTypeAttributes(xpp, res); 1339 next(xpp); 1340 int eventType = nextNoWhitespace(xpp); 1341 while (eventType != XmlPullParser.END_TAG) { 1342 if (!parseDurationContent(eventType, xpp, res)) 1343 unknownContent(xpp); 1344 eventType = nextNoWhitespace(xpp); 1345 } 1346 next(xpp); 1347 parseElementClose(res); 1348 return res; 1349 } 1350 1351 protected boolean parseDurationContent(int eventType, XmlPullParser xpp, Duration res) 1352 throws XmlPullParserException, IOException, FHIRFormatError { 1353 if (!parseQuantityContent(eventType, xpp, res)) 1354 return false; 1355 return true; 1356 } 1357 1358 protected Range parseRange(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1359 Range res = new Range(); 1360 parseTypeAttributes(xpp, res); 1361 next(xpp); 1362 int eventType = nextNoWhitespace(xpp); 1363 while (eventType != XmlPullParser.END_TAG) { 1364 if (!parseRangeContent(eventType, xpp, res)) 1365 unknownContent(xpp); 1366 eventType = nextNoWhitespace(xpp); 1367 } 1368 next(xpp); 1369 parseElementClose(res); 1370 return res; 1371 } 1372 1373 protected boolean parseRangeContent(int eventType, XmlPullParser xpp, Range res) 1374 throws XmlPullParserException, IOException, FHIRFormatError { 1375 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { 1376 res.setLow(parseQuantity(xpp)); 1377 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { 1378 res.setHigh(parseQuantity(xpp)); 1379 } else if (!parseElementContent(eventType, xpp, res)) 1380 return false; 1381 return true; 1382 } 1383 1384 protected RelatedArtifact parseRelatedArtifact(XmlPullParser xpp) 1385 throws XmlPullParserException, IOException, FHIRFormatError { 1386 RelatedArtifact res = new RelatedArtifact(); 1387 parseTypeAttributes(xpp, res); 1388 next(xpp); 1389 int eventType = nextNoWhitespace(xpp); 1390 while (eventType != XmlPullParser.END_TAG) { 1391 if (!parseRelatedArtifactContent(eventType, xpp, res)) 1392 unknownContent(xpp); 1393 eventType = nextNoWhitespace(xpp); 1394 } 1395 next(xpp); 1396 parseElementClose(res); 1397 return res; 1398 } 1399 1400 protected boolean parseRelatedArtifactContent(int eventType, XmlPullParser xpp, RelatedArtifact res) 1401 throws XmlPullParserException, IOException, FHIRFormatError { 1402 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1403 res.setTypeElement(parseEnumeration(xpp, RelatedArtifact.RelatedArtifactType.NULL, 1404 new RelatedArtifact.RelatedArtifactTypeEnumFactory())); 1405 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { 1406 res.setLabelElement(parseString(xpp)); 1407 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 1408 res.setDisplayElement(parseString(xpp)); 1409 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("citation")) { 1410 res.setCitationElement(parseMarkdown(xpp)); 1411 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 1412 res.setUrlElement(parseUrl(xpp)); 1413 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { 1414 res.setDocument(parseAttachment(xpp)); 1415 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 1416 res.setResourceElement(parseCanonical(xpp)); 1417 } else if (!parseElementContent(eventType, xpp, res)) 1418 return false; 1419 return true; 1420 } 1421 1422 protected Annotation parseAnnotation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1423 Annotation res = new Annotation(); 1424 parseTypeAttributes(xpp, res); 1425 next(xpp); 1426 int eventType = nextNoWhitespace(xpp); 1427 while (eventType != XmlPullParser.END_TAG) { 1428 if (!parseAnnotationContent(eventType, xpp, res)) 1429 unknownContent(xpp); 1430 eventType = nextNoWhitespace(xpp); 1431 } 1432 next(xpp); 1433 parseElementClose(res); 1434 return res; 1435 } 1436 1437 protected boolean parseAnnotationContent(int eventType, XmlPullParser xpp, Annotation res) 1438 throws XmlPullParserException, IOException, FHIRFormatError { 1439 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "author")) { 1440 res.setAuthor(parseType("author", xpp)); 1441 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { 1442 res.setTimeElement(parseDateTime(xpp)); 1443 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 1444 res.setTextElement(parseMarkdown(xpp)); 1445 } else if (!parseElementContent(eventType, xpp, res)) 1446 return false; 1447 return true; 1448 } 1449 1450 protected ProductShelfLife parseProductShelfLife(XmlPullParser xpp) 1451 throws XmlPullParserException, IOException, FHIRFormatError { 1452 ProductShelfLife res = new ProductShelfLife(); 1453 parseTypeAttributes(xpp, res); 1454 next(xpp); 1455 int eventType = nextNoWhitespace(xpp); 1456 while (eventType != XmlPullParser.END_TAG) { 1457 if (!parseProductShelfLifeContent(eventType, xpp, res)) 1458 unknownContent(xpp); 1459 eventType = nextNoWhitespace(xpp); 1460 } 1461 next(xpp); 1462 parseElementClose(res); 1463 return res; 1464 } 1465 1466 protected boolean parseProductShelfLifeContent(int eventType, XmlPullParser xpp, ProductShelfLife res) 1467 throws XmlPullParserException, IOException, FHIRFormatError { 1468 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 1469 res.setIdentifier(parseIdentifier(xpp)); 1470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1471 res.setType(parseCodeableConcept(xpp)); 1472 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 1473 res.setPeriod(parseQuantity(xpp)); 1474 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialPrecautionsForStorage")) { 1475 res.getSpecialPrecautionsForStorage().add(parseCodeableConcept(xpp)); 1476 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1477 return false; 1478 return true; 1479 } 1480 1481 protected ContactDetail parseContactDetail(XmlPullParser xpp) 1482 throws XmlPullParserException, IOException, FHIRFormatError { 1483 ContactDetail res = new ContactDetail(); 1484 parseTypeAttributes(xpp, res); 1485 next(xpp); 1486 int eventType = nextNoWhitespace(xpp); 1487 while (eventType != XmlPullParser.END_TAG) { 1488 if (!parseContactDetailContent(eventType, xpp, res)) 1489 unknownContent(xpp); 1490 eventType = nextNoWhitespace(xpp); 1491 } 1492 next(xpp); 1493 parseElementClose(res); 1494 return res; 1495 } 1496 1497 protected boolean parseContactDetailContent(int eventType, XmlPullParser xpp, ContactDetail res) 1498 throws XmlPullParserException, IOException, FHIRFormatError { 1499 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 1500 res.setNameElement(parseString(xpp)); 1501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 1502 res.getTelecom().add(parseContactPoint(xpp)); 1503 } else if (!parseElementContent(eventType, xpp, res)) 1504 return false; 1505 return true; 1506 } 1507 1508 protected UsageContext parseUsageContext(XmlPullParser xpp) 1509 throws XmlPullParserException, IOException, FHIRFormatError { 1510 UsageContext res = new UsageContext(); 1511 parseTypeAttributes(xpp, res); 1512 next(xpp); 1513 int eventType = nextNoWhitespace(xpp); 1514 while (eventType != XmlPullParser.END_TAG) { 1515 if (!parseUsageContextContent(eventType, xpp, res)) 1516 unknownContent(xpp); 1517 eventType = nextNoWhitespace(xpp); 1518 } 1519 next(xpp); 1520 parseElementClose(res); 1521 return res; 1522 } 1523 1524 protected boolean parseUsageContextContent(int eventType, XmlPullParser xpp, UsageContext res) 1525 throws XmlPullParserException, IOException, FHIRFormatError { 1526 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1527 res.setCode(parseCoding(xpp)); 1528 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 1529 res.setValue(parseType("value", xpp)); 1530 } else if (!parseElementContent(eventType, xpp, res)) 1531 return false; 1532 return true; 1533 } 1534 1535 protected Expression parseExpression(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1536 Expression res = new Expression(); 1537 parseTypeAttributes(xpp, res); 1538 next(xpp); 1539 int eventType = nextNoWhitespace(xpp); 1540 while (eventType != XmlPullParser.END_TAG) { 1541 if (!parseExpressionContent(eventType, xpp, res)) 1542 unknownContent(xpp); 1543 eventType = nextNoWhitespace(xpp); 1544 } 1545 next(xpp); 1546 parseElementClose(res); 1547 return res; 1548 } 1549 1550 protected boolean parseExpressionContent(int eventType, XmlPullParser xpp, Expression res) 1551 throws XmlPullParserException, IOException, FHIRFormatError { 1552 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 1553 res.setDescriptionElement(parseString(xpp)); 1554 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 1555 res.setNameElement(parseId(xpp)); 1556 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 1557 res.setLanguageElement(parseCode(xpp)); 1558 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 1559 res.setExpressionElement(parseString(xpp)); 1560 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 1561 res.setReferenceElement(parseUri(xpp)); 1562 } else if (!parseElementContent(eventType, xpp, res)) 1563 return false; 1564 return true; 1565 } 1566 1567 protected Signature parseSignature(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1568 Signature res = new Signature(); 1569 parseTypeAttributes(xpp, res); 1570 next(xpp); 1571 int eventType = nextNoWhitespace(xpp); 1572 while (eventType != XmlPullParser.END_TAG) { 1573 if (!parseSignatureContent(eventType, xpp, res)) 1574 unknownContent(xpp); 1575 eventType = nextNoWhitespace(xpp); 1576 } 1577 next(xpp); 1578 parseElementClose(res); 1579 return res; 1580 } 1581 1582 protected boolean parseSignatureContent(int eventType, XmlPullParser xpp, Signature res) 1583 throws XmlPullParserException, IOException, FHIRFormatError { 1584 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1585 res.getType().add(parseCoding(xpp)); 1586 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { 1587 res.setWhenElement(parseInstant(xpp)); 1588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { 1589 res.setWho(parseReference(xpp)); 1590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { 1591 res.setOnBehalfOf(parseReference(xpp)); 1592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetFormat")) { 1593 res.setTargetFormatElement(parseCode(xpp)); 1594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sigFormat")) { 1595 res.setSigFormatElement(parseCode(xpp)); 1596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 1597 res.setDataElement(parseBase64Binary(xpp)); 1598 } else if (!parseElementContent(eventType, xpp, res)) 1599 return false; 1600 return true; 1601 } 1602 1603 protected Timing parseTiming(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 1604 Timing res = new Timing(); 1605 parseTypeAttributes(xpp, res); 1606 next(xpp); 1607 int eventType = nextNoWhitespace(xpp); 1608 while (eventType != XmlPullParser.END_TAG) { 1609 if (!parseTimingContent(eventType, xpp, res)) 1610 unknownContent(xpp); 1611 eventType = nextNoWhitespace(xpp); 1612 } 1613 next(xpp); 1614 parseElementClose(res); 1615 return res; 1616 } 1617 1618 protected boolean parseTimingContent(int eventType, XmlPullParser xpp, Timing res) 1619 throws XmlPullParserException, IOException, FHIRFormatError { 1620 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { 1621 res.getEvent().add(parseDateTime(xpp)); 1622 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeat")) { 1623 res.setRepeat(parseTimingTimingRepeatComponent(xpp, res)); 1624 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1625 res.setCode(parseCodeableConcept(xpp)); 1626 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1627 return false; 1628 return true; 1629 } 1630 1631 protected Timing.TimingRepeatComponent parseTimingTimingRepeatComponent(XmlPullParser xpp, Timing owner) 1632 throws XmlPullParserException, IOException, FHIRFormatError { 1633 Timing.TimingRepeatComponent res = new Timing.TimingRepeatComponent(); 1634 parseElementAttributes(xpp, res); 1635 next(xpp); 1636 int eventType = nextNoWhitespace(xpp); 1637 while (eventType != XmlPullParser.END_TAG) { 1638 if (!parseTimingTimingRepeatComponentContent(eventType, xpp, owner, res)) 1639 unknownContent(xpp); 1640 eventType = nextNoWhitespace(xpp); 1641 } 1642 next(xpp); 1643 parseElementClose(res); 1644 return res; 1645 } 1646 1647 protected boolean parseTimingTimingRepeatComponentContent(int eventType, XmlPullParser xpp, Timing owner, 1648 Timing.TimingRepeatComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 1649 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "bounds")) { 1650 res.setBounds(parseType("bounds", xpp)); 1651 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { 1652 res.setCountElement(parsePositiveInt(xpp)); 1653 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("countMax")) { 1654 res.setCountMaxElement(parsePositiveInt(xpp)); 1655 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 1656 res.setDurationElement(parseDecimal(xpp)); 1657 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationMax")) { 1658 res.setDurationMaxElement(parseDecimal(xpp)); 1659 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("durationUnit")) { 1660 res.setDurationUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); 1661 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequency")) { 1662 res.setFrequencyElement(parsePositiveInt(xpp)); 1663 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequencyMax")) { 1664 res.setFrequencyMaxElement(parsePositiveInt(xpp)); 1665 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 1666 res.setPeriodElement(parseDecimal(xpp)); 1667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodMax")) { 1668 res.setPeriodMaxElement(parseDecimal(xpp)); 1669 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodUnit")) { 1670 res.setPeriodUnitElement(parseEnumeration(xpp, Timing.UnitsOfTime.NULL, new Timing.UnitsOfTimeEnumFactory())); 1671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dayOfWeek")) { 1672 res.getDayOfWeek().add(parseEnumeration(xpp, Timing.DayOfWeek.NULL, new Timing.DayOfWeekEnumFactory())); 1673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeOfDay")) { 1674 res.getTimeOfDay().add(parseTime(xpp)); 1675 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("when")) { 1676 res.getWhen().add(parseEnumeration(xpp, Timing.EventTiming.NULL, new Timing.EventTimingEnumFactory())); 1677 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { 1678 res.setOffsetElement(parseUnsignedInt(xpp)); 1679 } else if (!parseElementContent(eventType, xpp, res)) 1680 return false; 1681 return true; 1682 } 1683 1684 protected ProdCharacteristic parseProdCharacteristic(XmlPullParser xpp) 1685 throws XmlPullParserException, IOException, FHIRFormatError { 1686 ProdCharacteristic res = new ProdCharacteristic(); 1687 parseTypeAttributes(xpp, res); 1688 next(xpp); 1689 int eventType = nextNoWhitespace(xpp); 1690 while (eventType != XmlPullParser.END_TAG) { 1691 if (!parseProdCharacteristicContent(eventType, xpp, res)) 1692 unknownContent(xpp); 1693 eventType = nextNoWhitespace(xpp); 1694 } 1695 next(xpp); 1696 parseElementClose(res); 1697 return res; 1698 } 1699 1700 protected boolean parseProdCharacteristicContent(int eventType, XmlPullParser xpp, ProdCharacteristic res) 1701 throws XmlPullParserException, IOException, FHIRFormatError { 1702 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("height")) { 1703 res.setHeight(parseQuantity(xpp)); 1704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("width")) { 1705 res.setWidth(parseQuantity(xpp)); 1706 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("depth")) { 1707 res.setDepth(parseQuantity(xpp)); 1708 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("weight")) { 1709 res.setWeight(parseQuantity(xpp)); 1710 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nominalVolume")) { 1711 res.setNominalVolume(parseQuantity(xpp)); 1712 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("externalDiameter")) { 1713 res.setExternalDiameter(parseQuantity(xpp)); 1714 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shape")) { 1715 res.setShapeElement(parseString(xpp)); 1716 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { 1717 res.getColor().add(parseString(xpp)); 1718 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imprint")) { 1719 res.getImprint().add(parseString(xpp)); 1720 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { 1721 res.getImage().add(parseAttachment(xpp)); 1722 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scoring")) { 1723 res.setScoring(parseCodeableConcept(xpp)); 1724 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1725 return false; 1726 return true; 1727 } 1728 1729 protected CodeableConcept parseCodeableConcept(XmlPullParser xpp) 1730 throws XmlPullParserException, IOException, FHIRFormatError { 1731 CodeableConcept res = new CodeableConcept(); 1732 parseTypeAttributes(xpp, res); 1733 next(xpp); 1734 int eventType = nextNoWhitespace(xpp); 1735 while (eventType != XmlPullParser.END_TAG) { 1736 if (!parseCodeableConceptContent(eventType, xpp, res)) 1737 unknownContent(xpp); 1738 eventType = nextNoWhitespace(xpp); 1739 } 1740 next(xpp); 1741 parseElementClose(res); 1742 return res; 1743 } 1744 1745 protected boolean parseCodeableConceptContent(int eventType, XmlPullParser xpp, CodeableConcept res) 1746 throws XmlPullParserException, IOException, FHIRFormatError { 1747 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coding")) { 1748 res.getCoding().add(parseCoding(xpp)); 1749 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 1750 res.setTextElement(parseString(xpp)); 1751 } else if (!parseElementContent(eventType, xpp, res)) 1752 return false; 1753 return true; 1754 } 1755 1756 protected ParameterDefinition parseParameterDefinition(XmlPullParser xpp) 1757 throws XmlPullParserException, IOException, FHIRFormatError { 1758 ParameterDefinition res = new ParameterDefinition(); 1759 parseTypeAttributes(xpp, res); 1760 next(xpp); 1761 int eventType = nextNoWhitespace(xpp); 1762 while (eventType != XmlPullParser.END_TAG) { 1763 if (!parseParameterDefinitionContent(eventType, xpp, res)) 1764 unknownContent(xpp); 1765 eventType = nextNoWhitespace(xpp); 1766 } 1767 next(xpp); 1768 parseElementClose(res); 1769 return res; 1770 } 1771 1772 protected boolean parseParameterDefinitionContent(int eventType, XmlPullParser xpp, ParameterDefinition res) 1773 throws XmlPullParserException, IOException, FHIRFormatError { 1774 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 1775 res.setNameElement(parseCode(xpp)); 1776 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 1777 res.setUseElement(parseEnumeration(xpp, ParameterDefinition.ParameterUse.NULL, 1778 new ParameterDefinition.ParameterUseEnumFactory())); 1779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 1780 res.setMinElement(parseInteger(xpp)); 1781 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 1782 res.setMaxElement(parseString(xpp)); 1783 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 1784 res.setDocumentationElement(parseString(xpp)); 1785 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1786 res.setTypeElement(parseCode(xpp)); 1787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 1788 res.setProfileElement(parseCanonical(xpp)); 1789 } else if (!parseElementContent(eventType, xpp, res)) 1790 return false; 1791 return true; 1792 } 1793 1794 protected ElementDefinition parseElementDefinition(XmlPullParser xpp) 1795 throws XmlPullParserException, IOException, FHIRFormatError { 1796 ElementDefinition res = new ElementDefinition(); 1797 parseElementAttributes(xpp, res); 1798 next(xpp); 1799 int eventType = nextNoWhitespace(xpp); 1800 while (eventType != XmlPullParser.END_TAG) { 1801 if (!parseElementDefinitionContent(eventType, xpp, res)) 1802 unknownContent(xpp); 1803 eventType = nextNoWhitespace(xpp); 1804 } 1805 next(xpp); 1806 parseElementClose(res); 1807 return res; 1808 } 1809 1810 protected boolean parseElementDefinitionContent(int eventType, XmlPullParser xpp, ElementDefinition res) 1811 throws XmlPullParserException, IOException, FHIRFormatError { 1812 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 1813 res.setPathElement(parseString(xpp)); 1814 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { 1815 res.getRepresentation().add(parseEnumeration(xpp, ElementDefinition.PropertyRepresentation.NULL, 1816 new ElementDefinition.PropertyRepresentationEnumFactory())); 1817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { 1818 res.setSliceNameElement(parseString(xpp)); 1819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceIsConstraining")) { 1820 res.setSliceIsConstrainingElement(parseBoolean(xpp)); 1821 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { 1822 res.setLabelElement(parseString(xpp)); 1823 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1824 res.getCode().add(parseCoding(xpp)); 1825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slicing")) { 1826 res.setSlicing(parseElementDefinitionElementDefinitionSlicingComponent(xpp, res)); 1827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("short")) { 1828 res.setShortElement(parseString(xpp)); 1829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 1830 res.setDefinitionElement(parseMarkdown(xpp)); 1831 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 1832 res.setCommentElement(parseMarkdown(xpp)); 1833 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { 1834 res.setRequirementsElement(parseMarkdown(xpp)); 1835 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 1836 res.getAlias().add(parseString(xpp)); 1837 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 1838 res.setMinElement(parseUnsignedInt(xpp)); 1839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 1840 res.setMaxElement(parseString(xpp)); 1841 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { 1842 res.setBase(parseElementDefinitionElementDefinitionBaseComponent(xpp, res)); 1843 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentReference")) { 1844 res.setContentReferenceElement(parseUri(xpp)); 1845 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1846 res.getType().add(parseElementDefinitionTypeRefComponent(xpp, res)); 1847 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { 1848 res.setDefaultValue(parseType("defaultValue", xpp)); 1849 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaningWhenMissing")) { 1850 res.setMeaningWhenMissingElement(parseMarkdown(xpp)); 1851 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderMeaning")) { 1852 res.setOrderMeaningElement(parseString(xpp)); 1853 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "fixed")) { 1854 res.setFixed(parseType("fixed", xpp)); 1855 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "pattern")) { 1856 res.setPattern(parseType("pattern", xpp)); 1857 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("example")) { 1858 res.getExample().add(parseElementDefinitionElementDefinitionExampleComponent(xpp, res)); 1859 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "minValue")) { 1860 res.setMinValue(parseType("minValue", xpp)); 1861 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "maxValue")) { 1862 res.setMaxValue(parseType("maxValue", xpp)); 1863 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { 1864 res.setMaxLengthElement(parseInteger(xpp)); 1865 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 1866 res.getCondition().add(parseId(xpp)); 1867 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("constraint")) { 1868 res.getConstraint().add(parseElementDefinitionElementDefinitionConstraintComponent(xpp, res)); 1869 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mustSupport")) { 1870 res.setMustSupportElement(parseBoolean(xpp)); 1871 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isModifier")) { 1872 res.setIsModifierElement(parseBoolean(xpp)); 1873 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isModifierReason")) { 1874 res.setIsModifierReasonElement(parseString(xpp)); 1875 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isSummary")) { 1876 res.setIsSummaryElement(parseBoolean(xpp)); 1877 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { 1878 res.setBinding(parseElementDefinitionElementDefinitionBindingComponent(xpp, res)); 1879 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { 1880 res.getMapping().add(parseElementDefinitionElementDefinitionMappingComponent(xpp, res)); 1881 } else if (!parseBackboneElementContent(eventType, xpp, res)) 1882 return false; 1883 return true; 1884 } 1885 1886 protected ElementDefinition.ElementDefinitionSlicingComponent parseElementDefinitionElementDefinitionSlicingComponent( 1887 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 1888 ElementDefinition.ElementDefinitionSlicingComponent res = new ElementDefinition.ElementDefinitionSlicingComponent(); 1889 parseElementAttributes(xpp, res); 1890 next(xpp); 1891 int eventType = nextNoWhitespace(xpp); 1892 while (eventType != XmlPullParser.END_TAG) { 1893 if (!parseElementDefinitionElementDefinitionSlicingComponentContent(eventType, xpp, owner, res)) 1894 unknownContent(xpp); 1895 eventType = nextNoWhitespace(xpp); 1896 } 1897 next(xpp); 1898 parseElementClose(res); 1899 return res; 1900 } 1901 1902 protected boolean parseElementDefinitionElementDefinitionSlicingComponentContent(int eventType, XmlPullParser xpp, 1903 ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingComponent res) 1904 throws XmlPullParserException, IOException, FHIRFormatError { 1905 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("discriminator")) { 1906 res.getDiscriminator().add(parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent(xpp, owner)); 1907 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 1908 res.setDescriptionElement(parseString(xpp)); 1909 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ordered")) { 1910 res.setOrderedElement(parseBoolean(xpp)); 1911 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rules")) { 1912 res.setRulesElement( 1913 parseEnumeration(xpp, ElementDefinition.SlicingRules.NULL, new ElementDefinition.SlicingRulesEnumFactory())); 1914 } else if (!parseElementContent(eventType, xpp, res)) 1915 return false; 1916 return true; 1917 } 1918 1919 protected ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent parseElementDefinitionElementDefinitionSlicingDiscriminatorComponent( 1920 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 1921 ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res = new ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent(); 1922 parseElementAttributes(xpp, res); 1923 next(xpp); 1924 int eventType = nextNoWhitespace(xpp); 1925 while (eventType != XmlPullParser.END_TAG) { 1926 if (!parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(eventType, xpp, owner, res)) 1927 unknownContent(xpp); 1928 eventType = nextNoWhitespace(xpp); 1929 } 1930 next(xpp); 1931 parseElementClose(res); 1932 return res; 1933 } 1934 1935 protected boolean parseElementDefinitionElementDefinitionSlicingDiscriminatorComponentContent(int eventType, 1936 XmlPullParser xpp, ElementDefinition owner, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent res) 1937 throws XmlPullParserException, IOException, FHIRFormatError { 1938 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 1939 res.setTypeElement(parseEnumeration(xpp, ElementDefinition.DiscriminatorType.NULL, 1940 new ElementDefinition.DiscriminatorTypeEnumFactory())); 1941 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 1942 res.setPathElement(parseString(xpp)); 1943 } else if (!parseElementContent(eventType, xpp, res)) 1944 return false; 1945 return true; 1946 } 1947 1948 protected ElementDefinition.ElementDefinitionBaseComponent parseElementDefinitionElementDefinitionBaseComponent( 1949 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 1950 ElementDefinition.ElementDefinitionBaseComponent res = new ElementDefinition.ElementDefinitionBaseComponent(); 1951 parseElementAttributes(xpp, res); 1952 next(xpp); 1953 int eventType = nextNoWhitespace(xpp); 1954 while (eventType != XmlPullParser.END_TAG) { 1955 if (!parseElementDefinitionElementDefinitionBaseComponentContent(eventType, xpp, owner, res)) 1956 unknownContent(xpp); 1957 eventType = nextNoWhitespace(xpp); 1958 } 1959 next(xpp); 1960 parseElementClose(res); 1961 return res; 1962 } 1963 1964 protected boolean parseElementDefinitionElementDefinitionBaseComponentContent(int eventType, XmlPullParser xpp, 1965 ElementDefinition owner, ElementDefinition.ElementDefinitionBaseComponent res) 1966 throws XmlPullParserException, IOException, FHIRFormatError { 1967 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 1968 res.setPathElement(parseString(xpp)); 1969 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 1970 res.setMinElement(parseUnsignedInt(xpp)); 1971 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 1972 res.setMaxElement(parseString(xpp)); 1973 } else if (!parseElementContent(eventType, xpp, res)) 1974 return false; 1975 return true; 1976 } 1977 1978 protected ElementDefinition.TypeRefComponent parseElementDefinitionTypeRefComponent(XmlPullParser xpp, 1979 ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 1980 ElementDefinition.TypeRefComponent res = new ElementDefinition.TypeRefComponent(); 1981 parseElementAttributes(xpp, res); 1982 next(xpp); 1983 int eventType = nextNoWhitespace(xpp); 1984 while (eventType != XmlPullParser.END_TAG) { 1985 if (!parseElementDefinitionTypeRefComponentContent(eventType, xpp, owner, res)) 1986 unknownContent(xpp); 1987 eventType = nextNoWhitespace(xpp); 1988 } 1989 next(xpp); 1990 parseElementClose(res); 1991 return res; 1992 } 1993 1994 protected boolean parseElementDefinitionTypeRefComponentContent(int eventType, XmlPullParser xpp, 1995 ElementDefinition owner, ElementDefinition.TypeRefComponent res) 1996 throws XmlPullParserException, IOException, FHIRFormatError { 1997 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 1998 res.setCodeElement(parseUri(xpp)); 1999 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 2000 res.getProfile().add(parseCanonical(xpp)); 2001 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetProfile")) { 2002 res.getTargetProfile().add(parseCanonical(xpp)); 2003 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("aggregation")) { 2004 res.getAggregation().add(parseEnumeration(xpp, ElementDefinition.AggregationMode.NULL, 2005 new ElementDefinition.AggregationModeEnumFactory())); 2006 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { 2007 res.setVersioningElement(parseEnumeration(xpp, ElementDefinition.ReferenceVersionRules.NULL, 2008 new ElementDefinition.ReferenceVersionRulesEnumFactory())); 2009 } else if (!parseElementContent(eventType, xpp, res)) 2010 return false; 2011 return true; 2012 } 2013 2014 protected ElementDefinition.ElementDefinitionExampleComponent parseElementDefinitionElementDefinitionExampleComponent( 2015 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2016 ElementDefinition.ElementDefinitionExampleComponent res = new ElementDefinition.ElementDefinitionExampleComponent(); 2017 parseElementAttributes(xpp, res); 2018 next(xpp); 2019 int eventType = nextNoWhitespace(xpp); 2020 while (eventType != XmlPullParser.END_TAG) { 2021 if (!parseElementDefinitionElementDefinitionExampleComponentContent(eventType, xpp, owner, res)) 2022 unknownContent(xpp); 2023 eventType = nextNoWhitespace(xpp); 2024 } 2025 next(xpp); 2026 parseElementClose(res); 2027 return res; 2028 } 2029 2030 protected boolean parseElementDefinitionElementDefinitionExampleComponentContent(int eventType, XmlPullParser xpp, 2031 ElementDefinition owner, ElementDefinition.ElementDefinitionExampleComponent res) 2032 throws XmlPullParserException, IOException, FHIRFormatError { 2033 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { 2034 res.setLabelElement(parseString(xpp)); 2035 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 2036 res.setValue(parseType("value", xpp)); 2037 } else if (!parseElementContent(eventType, xpp, res)) 2038 return false; 2039 return true; 2040 } 2041 2042 protected ElementDefinition.ElementDefinitionConstraintComponent parseElementDefinitionElementDefinitionConstraintComponent( 2043 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2044 ElementDefinition.ElementDefinitionConstraintComponent res = new ElementDefinition.ElementDefinitionConstraintComponent(); 2045 parseElementAttributes(xpp, res); 2046 next(xpp); 2047 int eventType = nextNoWhitespace(xpp); 2048 while (eventType != XmlPullParser.END_TAG) { 2049 if (!parseElementDefinitionElementDefinitionConstraintComponentContent(eventType, xpp, owner, res)) 2050 unknownContent(xpp); 2051 eventType = nextNoWhitespace(xpp); 2052 } 2053 next(xpp); 2054 parseElementClose(res); 2055 return res; 2056 } 2057 2058 protected boolean parseElementDefinitionElementDefinitionConstraintComponentContent(int eventType, XmlPullParser xpp, 2059 ElementDefinition owner, ElementDefinition.ElementDefinitionConstraintComponent res) 2060 throws XmlPullParserException, IOException, FHIRFormatError { 2061 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("key")) { 2062 res.setKeyElement(parseId(xpp)); 2063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirements")) { 2064 res.setRequirementsElement(parseString(xpp)); 2065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 2066 res.setSeverityElement(parseEnumeration(xpp, ElementDefinition.ConstraintSeverity.NULL, 2067 new ElementDefinition.ConstraintSeverityEnumFactory())); 2068 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("human")) { 2069 res.setHumanElement(parseString(xpp)); 2070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 2071 res.setExpressionElement(parseString(xpp)); 2072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { 2073 res.setXpathElement(parseString(xpp)); 2074 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 2075 res.setSourceElement(parseCanonical(xpp)); 2076 } else if (!parseElementContent(eventType, xpp, res)) 2077 return false; 2078 return true; 2079 } 2080 2081 protected ElementDefinition.ElementDefinitionBindingComponent parseElementDefinitionElementDefinitionBindingComponent( 2082 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2083 ElementDefinition.ElementDefinitionBindingComponent res = new ElementDefinition.ElementDefinitionBindingComponent(); 2084 parseElementAttributes(xpp, res); 2085 next(xpp); 2086 int eventType = nextNoWhitespace(xpp); 2087 while (eventType != XmlPullParser.END_TAG) { 2088 if (!parseElementDefinitionElementDefinitionBindingComponentContent(eventType, xpp, owner, res)) 2089 unknownContent(xpp); 2090 eventType = nextNoWhitespace(xpp); 2091 } 2092 next(xpp); 2093 parseElementClose(res); 2094 return res; 2095 } 2096 2097 protected boolean parseElementDefinitionElementDefinitionBindingComponentContent(int eventType, XmlPullParser xpp, 2098 ElementDefinition owner, ElementDefinition.ElementDefinitionBindingComponent res) 2099 throws XmlPullParserException, IOException, FHIRFormatError { 2100 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 2101 res.setStrengthElement( 2102 parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); 2103 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 2104 res.setDescriptionElement(parseString(xpp)); 2105 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { 2106 res.setValueSetElement(parseCanonical(xpp)); 2107 } else if (!parseElementContent(eventType, xpp, res)) 2108 return false; 2109 return true; 2110 } 2111 2112 protected ElementDefinition.ElementDefinitionMappingComponent parseElementDefinitionElementDefinitionMappingComponent( 2113 XmlPullParser xpp, ElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2114 ElementDefinition.ElementDefinitionMappingComponent res = new ElementDefinition.ElementDefinitionMappingComponent(); 2115 parseElementAttributes(xpp, res); 2116 next(xpp); 2117 int eventType = nextNoWhitespace(xpp); 2118 while (eventType != XmlPullParser.END_TAG) { 2119 if (!parseElementDefinitionElementDefinitionMappingComponentContent(eventType, xpp, owner, res)) 2120 unknownContent(xpp); 2121 eventType = nextNoWhitespace(xpp); 2122 } 2123 next(xpp); 2124 parseElementClose(res); 2125 return res; 2126 } 2127 2128 protected boolean parseElementDefinitionElementDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, 2129 ElementDefinition owner, ElementDefinition.ElementDefinitionMappingComponent res) 2130 throws XmlPullParserException, IOException, FHIRFormatError { 2131 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { 2132 res.setIdentityElement(parseId(xpp)); 2133 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 2134 res.setLanguageElement(parseCode(xpp)); 2135 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("map")) { 2136 res.setMapElement(parseString(xpp)); 2137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 2138 res.setCommentElement(parseString(xpp)); 2139 } else if (!parseElementContent(eventType, xpp, res)) 2140 return false; 2141 return true; 2142 } 2143 2144 protected void parseDomainResourceAttributes(XmlPullParser xpp, DomainResource res) 2145 throws XmlPullParserException, IOException, FHIRFormatError { 2146 parseResourceAttributes(xpp, res); 2147 } 2148 2149 protected boolean parseDomainResourceContent(int eventType, XmlPullParser xpp, DomainResource res) 2150 throws XmlPullParserException, IOException, FHIRFormatError { 2151 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 2152 res.setText(parseNarrative(xpp)); 2153 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contained")) { 2154 res.getContained().add(parseResourceContained(xpp)); 2155 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extension")) { 2156 res.getExtension().add(parseExtension(xpp)); 2157 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifierExtension")) { 2158 res.getModifierExtension().add(parseExtension(xpp)); 2159 } else 2160 return parseResourceContent(eventType, xpp, res); 2161 return true; 2162 } 2163 2164 protected Parameters parseParameters(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 2165 Parameters res = new Parameters(); 2166 parseResourceAttributes(xpp, res); 2167 next(xpp); 2168 int eventType = nextNoWhitespace(xpp); 2169 while (eventType != XmlPullParser.END_TAG) { 2170 if (!parseParametersContent(eventType, xpp, res)) 2171 unknownContent(xpp); 2172 eventType = nextNoWhitespace(xpp); 2173 } 2174 next(xpp); 2175 parseElementClose(res); 2176 return res; 2177 } 2178 2179 protected boolean parseParametersContent(int eventType, XmlPullParser xpp, Parameters res) 2180 throws XmlPullParserException, IOException, FHIRFormatError { 2181 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 2182 res.getParameter().add(parseParametersParametersParameterComponent(xpp, res)); 2183 } else if (!parseResourceContent(eventType, xpp, res)) 2184 return false; 2185 return true; 2186 } 2187 2188 protected Parameters.ParametersParameterComponent parseParametersParametersParameterComponent(XmlPullParser xpp, 2189 Parameters owner) throws XmlPullParserException, IOException, FHIRFormatError { 2190 Parameters.ParametersParameterComponent res = new Parameters.ParametersParameterComponent(); 2191 parseBackboneAttributes(xpp, res); 2192 next(xpp); 2193 int eventType = nextNoWhitespace(xpp); 2194 while (eventType != XmlPullParser.END_TAG) { 2195 if (!parseParametersParametersParameterComponentContent(eventType, xpp, owner, res)) 2196 unknownContent(xpp); 2197 eventType = nextNoWhitespace(xpp); 2198 } 2199 next(xpp); 2200 parseElementClose(res); 2201 return res; 2202 } 2203 2204 protected boolean parseParametersParametersParameterComponentContent(int eventType, XmlPullParser xpp, 2205 Parameters owner, Parameters.ParametersParameterComponent res) 2206 throws XmlPullParserException, IOException, FHIRFormatError { 2207 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 2208 res.setNameElement(parseString(xpp)); 2209 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 2210 res.setValue(parseType("value", xpp)); 2211 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 2212 res.setResource(parseResourceContained(xpp)); 2213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { 2214 res.getPart().add(parseParametersParametersParameterComponent(xpp, owner)); 2215 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2216 return false; 2217 return true; 2218 } 2219 2220 protected void parseResourceAttributes(XmlPullParser xpp, Resource res) 2221 throws XmlPullParserException, IOException, FHIRFormatError { 2222 if (!comments.isEmpty()) { 2223 res.getFormatCommentsPre().addAll(comments); 2224 comments.clear(); 2225 } 2226 } 2227 2228 protected boolean parseResourceContent(int eventType, XmlPullParser xpp, Resource res) 2229 throws XmlPullParserException, IOException, FHIRFormatError { 2230 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("id")) { 2231 res.setIdElement(parseId(xpp)); 2232 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meta")) { 2233 res.setMeta(parseMeta(xpp)); 2234 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicitRules")) { 2235 res.setImplicitRulesElement(parseUri(xpp)); 2236 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 2237 res.setLanguageElement(parseCode(xpp)); 2238 } else 2239 return false; 2240 return true; 2241 } 2242 2243 protected Account parseAccount(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 2244 Account res = new Account(); 2245 parseDomainResourceAttributes(xpp, res); 2246 next(xpp); 2247 int eventType = nextNoWhitespace(xpp); 2248 while (eventType != XmlPullParser.END_TAG) { 2249 if (!parseAccountContent(eventType, xpp, res)) 2250 unknownContent(xpp); 2251 eventType = nextNoWhitespace(xpp); 2252 } 2253 next(xpp); 2254 parseElementClose(res); 2255 return res; 2256 } 2257 2258 protected boolean parseAccountContent(int eventType, XmlPullParser xpp, Account res) 2259 throws XmlPullParserException, IOException, FHIRFormatError { 2260 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2261 res.getIdentifier().add(parseIdentifier(xpp)); 2262 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 2263 res.setStatusElement(parseEnumeration(xpp, Account.AccountStatus.NULL, new Account.AccountStatusEnumFactory())); 2264 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2265 res.setType(parseCodeableConcept(xpp)); 2266 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 2267 res.setNameElement(parseString(xpp)); 2268 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 2269 res.getSubject().add(parseReference(xpp)); 2270 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("servicePeriod")) { 2271 res.setServicePeriod(parsePeriod(xpp)); 2272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 2273 res.getCoverage().add(parseAccountCoverageComponent(xpp, res)); 2274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { 2275 res.setOwner(parseReference(xpp)); 2276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 2277 res.setDescriptionElement(parseString(xpp)); 2278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guarantor")) { 2279 res.getGuarantor().add(parseAccountGuarantorComponent(xpp, res)); 2280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 2281 res.setPartOf(parseReference(xpp)); 2282 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2283 return false; 2284 return true; 2285 } 2286 2287 protected Account.CoverageComponent parseAccountCoverageComponent(XmlPullParser xpp, Account owner) 2288 throws XmlPullParserException, IOException, FHIRFormatError { 2289 Account.CoverageComponent res = new Account.CoverageComponent(); 2290 parseBackboneAttributes(xpp, res); 2291 next(xpp); 2292 int eventType = nextNoWhitespace(xpp); 2293 while (eventType != XmlPullParser.END_TAG) { 2294 if (!parseAccountCoverageComponentContent(eventType, xpp, owner, res)) 2295 unknownContent(xpp); 2296 eventType = nextNoWhitespace(xpp); 2297 } 2298 next(xpp); 2299 parseElementClose(res); 2300 return res; 2301 } 2302 2303 protected boolean parseAccountCoverageComponentContent(int eventType, XmlPullParser xpp, Account owner, 2304 Account.CoverageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 2305 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 2306 res.setCoverage(parseReference(xpp)); 2307 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 2308 res.setPriorityElement(parsePositiveInt(xpp)); 2309 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2310 return false; 2311 return true; 2312 } 2313 2314 protected Account.GuarantorComponent parseAccountGuarantorComponent(XmlPullParser xpp, Account owner) 2315 throws XmlPullParserException, IOException, FHIRFormatError { 2316 Account.GuarantorComponent res = new Account.GuarantorComponent(); 2317 parseBackboneAttributes(xpp, res); 2318 next(xpp); 2319 int eventType = nextNoWhitespace(xpp); 2320 while (eventType != XmlPullParser.END_TAG) { 2321 if (!parseAccountGuarantorComponentContent(eventType, xpp, owner, res)) 2322 unknownContent(xpp); 2323 eventType = nextNoWhitespace(xpp); 2324 } 2325 next(xpp); 2326 parseElementClose(res); 2327 return res; 2328 } 2329 2330 protected boolean parseAccountGuarantorComponentContent(int eventType, XmlPullParser xpp, Account owner, 2331 Account.GuarantorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 2332 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 2333 res.setParty(parseReference(xpp)); 2334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onHold")) { 2335 res.setOnHoldElement(parseBoolean(xpp)); 2336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 2337 res.setPeriod(parsePeriod(xpp)); 2338 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2339 return false; 2340 return true; 2341 } 2342 2343 protected ActivityDefinition parseActivityDefinition(XmlPullParser xpp) 2344 throws XmlPullParserException, IOException, FHIRFormatError { 2345 ActivityDefinition res = new ActivityDefinition(); 2346 parseDomainResourceAttributes(xpp, res); 2347 next(xpp); 2348 int eventType = nextNoWhitespace(xpp); 2349 while (eventType != XmlPullParser.END_TAG) { 2350 if (!parseActivityDefinitionContent(eventType, xpp, res)) 2351 unknownContent(xpp); 2352 eventType = nextNoWhitespace(xpp); 2353 } 2354 next(xpp); 2355 parseElementClose(res); 2356 return res; 2357 } 2358 2359 protected boolean parseActivityDefinitionContent(int eventType, XmlPullParser xpp, ActivityDefinition res) 2360 throws XmlPullParserException, IOException, FHIRFormatError { 2361 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 2362 res.setUrlElement(parseUri(xpp)); 2363 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2364 res.getIdentifier().add(parseIdentifier(xpp)); 2365 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 2366 res.setVersionElement(parseString(xpp)); 2367 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 2368 res.setNameElement(parseString(xpp)); 2369 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 2370 res.setTitleElement(parseString(xpp)); 2371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 2372 res.setSubtitleElement(parseString(xpp)); 2373 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 2374 res.setStatusElement( 2375 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 2376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 2377 res.setExperimentalElement(parseBoolean(xpp)); 2378 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 2379 res.setSubject(parseType("subject", xpp)); 2380 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 2381 res.setDateElement(parseDateTime(xpp)); 2382 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 2383 res.setPublisherElement(parseString(xpp)); 2384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 2385 res.getContact().add(parseContactDetail(xpp)); 2386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 2387 res.setDescriptionElement(parseMarkdown(xpp)); 2388 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 2389 res.getUseContext().add(parseUsageContext(xpp)); 2390 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 2391 res.getJurisdiction().add(parseCodeableConcept(xpp)); 2392 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 2393 res.setPurposeElement(parseMarkdown(xpp)); 2394 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 2395 res.setUsageElement(parseString(xpp)); 2396 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 2397 res.setCopyrightElement(parseMarkdown(xpp)); 2398 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 2399 res.setApprovalDateElement(parseDate(xpp)); 2400 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 2401 res.setLastReviewDateElement(parseDate(xpp)); 2402 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 2403 res.setEffectivePeriod(parsePeriod(xpp)); 2404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 2405 res.getTopic().add(parseCodeableConcept(xpp)); 2406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 2407 res.getAuthor().add(parseContactDetail(xpp)); 2408 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 2409 res.getEditor().add(parseContactDetail(xpp)); 2410 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 2411 res.getReviewer().add(parseContactDetail(xpp)); 2412 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 2413 res.getEndorser().add(parseContactDetail(xpp)); 2414 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 2415 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 2416 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { 2417 res.getLibrary().add(parseCanonical(xpp)); 2418 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 2419 res.setKindElement(parseEnumeration(xpp, ActivityDefinition.ActivityDefinitionKind.NULL, 2420 new ActivityDefinition.ActivityDefinitionKindEnumFactory())); 2421 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 2422 res.setProfileElement(parseCanonical(xpp)); 2423 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 2424 res.setCode(parseCodeableConcept(xpp)); 2425 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 2426 res.setIntentElement(parseEnumeration(xpp, ActivityDefinition.RequestIntent.NULL, 2427 new ActivityDefinition.RequestIntentEnumFactory())); 2428 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 2429 res.setPriorityElement(parseEnumeration(xpp, ActivityDefinition.RequestPriority.NULL, 2430 new ActivityDefinition.RequestPriorityEnumFactory())); 2431 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 2432 res.setDoNotPerformElement(parseBoolean(xpp)); 2433 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 2434 res.setTiming(parseType("timing", xpp)); 2435 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 2436 res.setLocation(parseReference(xpp)); 2437 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 2438 res.getParticipant().add(parseActivityDefinitionActivityDefinitionParticipantComponent(xpp, res)); 2439 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { 2440 res.setProduct(parseType("product", xpp)); 2441 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 2442 res.setQuantity(parseQuantity(xpp)); 2443 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { 2444 res.getDosage().add(parseDosage(xpp)); 2445 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 2446 res.getBodySite().add(parseCodeableConcept(xpp)); 2447 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimenRequirement")) { 2448 res.getSpecimenRequirement().add(parseReference(xpp)); 2449 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observationRequirement")) { 2450 res.getObservationRequirement().add(parseReference(xpp)); 2451 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observationResultRequirement")) { 2452 res.getObservationResultRequirement().add(parseReference(xpp)); 2453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { 2454 res.setTransformElement(parseCanonical(xpp)); 2455 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { 2456 res.getDynamicValue().add(parseActivityDefinitionActivityDefinitionDynamicValueComponent(xpp, res)); 2457 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2458 return false; 2459 return true; 2460 } 2461 2462 protected ActivityDefinition.ActivityDefinitionParticipantComponent parseActivityDefinitionActivityDefinitionParticipantComponent( 2463 XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2464 ActivityDefinition.ActivityDefinitionParticipantComponent res = new ActivityDefinition.ActivityDefinitionParticipantComponent(); 2465 parseBackboneAttributes(xpp, res); 2466 next(xpp); 2467 int eventType = nextNoWhitespace(xpp); 2468 while (eventType != XmlPullParser.END_TAG) { 2469 if (!parseActivityDefinitionActivityDefinitionParticipantComponentContent(eventType, xpp, owner, res)) 2470 unknownContent(xpp); 2471 eventType = nextNoWhitespace(xpp); 2472 } 2473 next(xpp); 2474 parseElementClose(res); 2475 return res; 2476 } 2477 2478 protected boolean parseActivityDefinitionActivityDefinitionParticipantComponentContent(int eventType, 2479 XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionParticipantComponent res) 2480 throws XmlPullParserException, IOException, FHIRFormatError { 2481 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2482 res.setTypeElement(parseEnumeration(xpp, ActivityDefinition.ActivityParticipantType.NULL, 2483 new ActivityDefinition.ActivityParticipantTypeEnumFactory())); 2484 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 2485 res.setRole(parseCodeableConcept(xpp)); 2486 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2487 return false; 2488 return true; 2489 } 2490 2491 protected ActivityDefinition.ActivityDefinitionDynamicValueComponent parseActivityDefinitionActivityDefinitionDynamicValueComponent( 2492 XmlPullParser xpp, ActivityDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 2493 ActivityDefinition.ActivityDefinitionDynamicValueComponent res = new ActivityDefinition.ActivityDefinitionDynamicValueComponent(); 2494 parseBackboneAttributes(xpp, res); 2495 next(xpp); 2496 int eventType = nextNoWhitespace(xpp); 2497 while (eventType != XmlPullParser.END_TAG) { 2498 if (!parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(eventType, xpp, owner, res)) 2499 unknownContent(xpp); 2500 eventType = nextNoWhitespace(xpp); 2501 } 2502 next(xpp); 2503 parseElementClose(res); 2504 return res; 2505 } 2506 2507 protected boolean parseActivityDefinitionActivityDefinitionDynamicValueComponentContent(int eventType, 2508 XmlPullParser xpp, ActivityDefinition owner, ActivityDefinition.ActivityDefinitionDynamicValueComponent res) 2509 throws XmlPullParserException, IOException, FHIRFormatError { 2510 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 2511 res.setPathElement(parseString(xpp)); 2512 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 2513 res.setExpression(parseExpression(xpp)); 2514 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2515 return false; 2516 return true; 2517 } 2518 2519 protected AdverseEvent parseAdverseEvent(XmlPullParser xpp) 2520 throws XmlPullParserException, IOException, FHIRFormatError { 2521 AdverseEvent res = new AdverseEvent(); 2522 parseDomainResourceAttributes(xpp, res); 2523 next(xpp); 2524 int eventType = nextNoWhitespace(xpp); 2525 while (eventType != XmlPullParser.END_TAG) { 2526 if (!parseAdverseEventContent(eventType, xpp, res)) 2527 unknownContent(xpp); 2528 eventType = nextNoWhitespace(xpp); 2529 } 2530 next(xpp); 2531 parseElementClose(res); 2532 return res; 2533 } 2534 2535 protected boolean parseAdverseEventContent(int eventType, XmlPullParser xpp, AdverseEvent res) 2536 throws XmlPullParserException, IOException, FHIRFormatError { 2537 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2538 res.setIdentifier(parseIdentifier(xpp)); 2539 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actuality")) { 2540 res.setActualityElement(parseEnumeration(xpp, AdverseEvent.AdverseEventActuality.NULL, 2541 new AdverseEvent.AdverseEventActualityEnumFactory())); 2542 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 2543 res.getCategory().add(parseCodeableConcept(xpp)); 2544 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { 2545 res.setEvent(parseCodeableConcept(xpp)); 2546 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 2547 res.setSubject(parseReference(xpp)); 2548 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 2549 res.setEncounter(parseReference(xpp)); 2550 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 2551 res.setDateElement(parseDateTime(xpp)); 2552 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detected")) { 2553 res.setDetectedElement(parseDateTime(xpp)); 2554 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedDate")) { 2555 res.setRecordedDateElement(parseDateTime(xpp)); 2556 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultingCondition")) { 2557 res.getResultingCondition().add(parseReference(xpp)); 2558 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 2559 res.setLocation(parseReference(xpp)); 2560 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("seriousness")) { 2561 res.setSeriousness(parseCodeableConcept(xpp)); 2562 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 2563 res.setSeverity(parseCodeableConcept(xpp)); 2564 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 2565 res.setOutcome(parseCodeableConcept(xpp)); 2566 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { 2567 res.setRecorder(parseReference(xpp)); 2568 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { 2569 res.getContributor().add(parseReference(xpp)); 2570 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suspectEntity")) { 2571 res.getSuspectEntity().add(parseAdverseEventAdverseEventSuspectEntityComponent(xpp, res)); 2572 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectMedicalHistory")) { 2573 res.getSubjectMedicalHistory().add(parseReference(xpp)); 2574 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceDocument")) { 2575 res.getReferenceDocument().add(parseReference(xpp)); 2576 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { 2577 res.getStudy().add(parseReference(xpp)); 2578 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2579 return false; 2580 return true; 2581 } 2582 2583 protected AdverseEvent.AdverseEventSuspectEntityComponent parseAdverseEventAdverseEventSuspectEntityComponent( 2584 XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 2585 AdverseEvent.AdverseEventSuspectEntityComponent res = new AdverseEvent.AdverseEventSuspectEntityComponent(); 2586 parseBackboneAttributes(xpp, res); 2587 next(xpp); 2588 int eventType = nextNoWhitespace(xpp); 2589 while (eventType != XmlPullParser.END_TAG) { 2590 if (!parseAdverseEventAdverseEventSuspectEntityComponentContent(eventType, xpp, owner, res)) 2591 unknownContent(xpp); 2592 eventType = nextNoWhitespace(xpp); 2593 } 2594 next(xpp); 2595 parseElementClose(res); 2596 return res; 2597 } 2598 2599 protected boolean parseAdverseEventAdverseEventSuspectEntityComponentContent(int eventType, XmlPullParser xpp, 2600 AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityComponent res) 2601 throws XmlPullParserException, IOException, FHIRFormatError { 2602 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 2603 res.setInstance(parseReference(xpp)); 2604 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("causality")) { 2605 res.getCausality().add(parseAdverseEventAdverseEventSuspectEntityCausalityComponent(xpp, owner)); 2606 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2607 return false; 2608 return true; 2609 } 2610 2611 protected AdverseEvent.AdverseEventSuspectEntityCausalityComponent parseAdverseEventAdverseEventSuspectEntityCausalityComponent( 2612 XmlPullParser xpp, AdverseEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 2613 AdverseEvent.AdverseEventSuspectEntityCausalityComponent res = new AdverseEvent.AdverseEventSuspectEntityCausalityComponent(); 2614 parseBackboneAttributes(xpp, res); 2615 next(xpp); 2616 int eventType = nextNoWhitespace(xpp); 2617 while (eventType != XmlPullParser.END_TAG) { 2618 if (!parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(eventType, xpp, owner, res)) 2619 unknownContent(xpp); 2620 eventType = nextNoWhitespace(xpp); 2621 } 2622 next(xpp); 2623 parseElementClose(res); 2624 return res; 2625 } 2626 2627 protected boolean parseAdverseEventAdverseEventSuspectEntityCausalityComponentContent(int eventType, 2628 XmlPullParser xpp, AdverseEvent owner, AdverseEvent.AdverseEventSuspectEntityCausalityComponent res) 2629 throws XmlPullParserException, IOException, FHIRFormatError { 2630 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { 2631 res.setAssessment(parseCodeableConcept(xpp)); 2632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productRelatedness")) { 2633 res.setProductRelatednessElement(parseString(xpp)); 2634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 2635 res.setAuthor(parseReference(xpp)); 2636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 2637 res.setMethod(parseCodeableConcept(xpp)); 2638 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2639 return false; 2640 return true; 2641 } 2642 2643 protected AllergyIntolerance parseAllergyIntolerance(XmlPullParser xpp) 2644 throws XmlPullParserException, IOException, FHIRFormatError { 2645 AllergyIntolerance res = new AllergyIntolerance(); 2646 parseDomainResourceAttributes(xpp, res); 2647 next(xpp); 2648 int eventType = nextNoWhitespace(xpp); 2649 while (eventType != XmlPullParser.END_TAG) { 2650 if (!parseAllergyIntoleranceContent(eventType, xpp, res)) 2651 unknownContent(xpp); 2652 eventType = nextNoWhitespace(xpp); 2653 } 2654 next(xpp); 2655 parseElementClose(res); 2656 return res; 2657 } 2658 2659 protected boolean parseAllergyIntoleranceContent(int eventType, XmlPullParser xpp, AllergyIntolerance res) 2660 throws XmlPullParserException, IOException, FHIRFormatError { 2661 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2662 res.getIdentifier().add(parseIdentifier(xpp)); 2663 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { 2664 res.setClinicalStatus(parseCodeableConcept(xpp)); 2665 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { 2666 res.setVerificationStatus(parseCodeableConcept(xpp)); 2667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2668 res.setTypeElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceType.NULL, 2669 new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory())); 2670 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 2671 res.getCategory().add(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCategory.NULL, 2672 new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory())); 2673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criticality")) { 2674 res.setCriticalityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceCriticality.NULL, 2675 new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory())); 2676 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 2677 res.setCode(parseCodeableConcept(xpp)); 2678 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 2679 res.setPatient(parseReference(xpp)); 2680 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 2681 res.setEncounter(parseReference(xpp)); 2682 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { 2683 res.setOnset(parseType("onset", xpp)); 2684 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedDate")) { 2685 res.setRecordedDateElement(parseDateTime(xpp)); 2686 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { 2687 res.setRecorder(parseReference(xpp)); 2688 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { 2689 res.setAsserter(parseReference(xpp)); 2690 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastOccurrence")) { 2691 res.setLastOccurrenceElement(parseDateTime(xpp)); 2692 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 2693 res.getNote().add(parseAnnotation(xpp)); 2694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { 2695 res.getReaction().add(parseAllergyIntoleranceAllergyIntoleranceReactionComponent(xpp, res)); 2696 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2697 return false; 2698 return true; 2699 } 2700 2701 protected AllergyIntolerance.AllergyIntoleranceReactionComponent parseAllergyIntoleranceAllergyIntoleranceReactionComponent( 2702 XmlPullParser xpp, AllergyIntolerance owner) throws XmlPullParserException, IOException, FHIRFormatError { 2703 AllergyIntolerance.AllergyIntoleranceReactionComponent res = new AllergyIntolerance.AllergyIntoleranceReactionComponent(); 2704 parseBackboneAttributes(xpp, res); 2705 next(xpp); 2706 int eventType = nextNoWhitespace(xpp); 2707 while (eventType != XmlPullParser.END_TAG) { 2708 if (!parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(eventType, xpp, owner, res)) 2709 unknownContent(xpp); 2710 eventType = nextNoWhitespace(xpp); 2711 } 2712 next(xpp); 2713 parseElementClose(res); 2714 return res; 2715 } 2716 2717 protected boolean parseAllergyIntoleranceAllergyIntoleranceReactionComponentContent(int eventType, XmlPullParser xpp, 2718 AllergyIntolerance owner, AllergyIntolerance.AllergyIntoleranceReactionComponent res) 2719 throws XmlPullParserException, IOException, FHIRFormatError { 2720 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { 2721 res.setSubstance(parseCodeableConcept(xpp)); 2722 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manifestation")) { 2723 res.getManifestation().add(parseCodeableConcept(xpp)); 2724 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 2725 res.setDescriptionElement(parseString(xpp)); 2726 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onset")) { 2727 res.setOnsetElement(parseDateTime(xpp)); 2728 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 2729 res.setSeverityElement(parseEnumeration(xpp, AllergyIntolerance.AllergyIntoleranceSeverity.NULL, 2730 new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory())); 2731 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureRoute")) { 2732 res.setExposureRoute(parseCodeableConcept(xpp)); 2733 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 2734 res.getNote().add(parseAnnotation(xpp)); 2735 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2736 return false; 2737 return true; 2738 } 2739 2740 protected Appointment parseAppointment(XmlPullParser xpp) 2741 throws XmlPullParserException, IOException, FHIRFormatError { 2742 Appointment res = new Appointment(); 2743 parseDomainResourceAttributes(xpp, res); 2744 next(xpp); 2745 int eventType = nextNoWhitespace(xpp); 2746 while (eventType != XmlPullParser.END_TAG) { 2747 if (!parseAppointmentContent(eventType, xpp, res)) 2748 unknownContent(xpp); 2749 eventType = nextNoWhitespace(xpp); 2750 } 2751 next(xpp); 2752 parseElementClose(res); 2753 return res; 2754 } 2755 2756 protected boolean parseAppointmentContent(int eventType, XmlPullParser xpp, Appointment res) 2757 throws XmlPullParserException, IOException, FHIRFormatError { 2758 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2759 res.getIdentifier().add(parseIdentifier(xpp)); 2760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 2761 res.setStatusElement( 2762 parseEnumeration(xpp, Appointment.AppointmentStatus.NULL, new Appointment.AppointmentStatusEnumFactory())); 2763 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cancelationReason")) { 2764 res.setCancelationReason(parseCodeableConcept(xpp)); 2765 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { 2766 res.getServiceCategory().add(parseCodeableConcept(xpp)); 2767 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { 2768 res.getServiceType().add(parseCodeableConcept(xpp)); 2769 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 2770 res.getSpecialty().add(parseCodeableConcept(xpp)); 2771 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { 2772 res.setAppointmentType(parseCodeableConcept(xpp)); 2773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 2774 res.getReasonCode().add(parseCodeableConcept(xpp)); 2775 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 2776 res.getReasonReference().add(parseReference(xpp)); 2777 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 2778 res.setPriorityElement(parseUnsignedInt(xpp)); 2779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 2780 res.setDescriptionElement(parseString(xpp)); 2781 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 2782 res.getSupportingInformation().add(parseReference(xpp)); 2783 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 2784 res.setStartElement(parseInstant(xpp)); 2785 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 2786 res.setEndElement(parseInstant(xpp)); 2787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minutesDuration")) { 2788 res.setMinutesDurationElement(parsePositiveInt(xpp)); 2789 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("slot")) { 2790 res.getSlot().add(parseReference(xpp)); 2791 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 2792 res.setCreatedElement(parseDateTime(xpp)); 2793 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 2794 res.setCommentElement(parseString(xpp)); 2795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientInstruction")) { 2796 res.setPatientInstructionElement(parseString(xpp)); 2797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 2798 res.getBasedOn().add(parseReference(xpp)); 2799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 2800 res.getParticipant().add(parseAppointmentAppointmentParticipantComponent(xpp, res)); 2801 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestedPeriod")) { 2802 res.getRequestedPeriod().add(parsePeriod(xpp)); 2803 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2804 return false; 2805 return true; 2806 } 2807 2808 protected Appointment.AppointmentParticipantComponent parseAppointmentAppointmentParticipantComponent( 2809 XmlPullParser xpp, Appointment owner) throws XmlPullParserException, IOException, FHIRFormatError { 2810 Appointment.AppointmentParticipantComponent res = new Appointment.AppointmentParticipantComponent(); 2811 parseBackboneAttributes(xpp, res); 2812 next(xpp); 2813 int eventType = nextNoWhitespace(xpp); 2814 while (eventType != XmlPullParser.END_TAG) { 2815 if (!parseAppointmentAppointmentParticipantComponentContent(eventType, xpp, owner, res)) 2816 unknownContent(xpp); 2817 eventType = nextNoWhitespace(xpp); 2818 } 2819 next(xpp); 2820 parseElementClose(res); 2821 return res; 2822 } 2823 2824 protected boolean parseAppointmentAppointmentParticipantComponentContent(int eventType, XmlPullParser xpp, 2825 Appointment owner, Appointment.AppointmentParticipantComponent res) 2826 throws XmlPullParserException, IOException, FHIRFormatError { 2827 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2828 res.getType().add(parseCodeableConcept(xpp)); 2829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 2830 res.setActor(parseReference(xpp)); 2831 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { 2832 res.setRequiredElement(parseEnumeration(xpp, Appointment.ParticipantRequired.NULL, 2833 new Appointment.ParticipantRequiredEnumFactory())); 2834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 2835 res.setStatusElement(parseEnumeration(xpp, Appointment.ParticipationStatus.NULL, 2836 new Appointment.ParticipationStatusEnumFactory())); 2837 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 2838 res.setPeriod(parsePeriod(xpp)); 2839 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2840 return false; 2841 return true; 2842 } 2843 2844 protected AppointmentResponse parseAppointmentResponse(XmlPullParser xpp) 2845 throws XmlPullParserException, IOException, FHIRFormatError { 2846 AppointmentResponse res = new AppointmentResponse(); 2847 parseDomainResourceAttributes(xpp, res); 2848 next(xpp); 2849 int eventType = nextNoWhitespace(xpp); 2850 while (eventType != XmlPullParser.END_TAG) { 2851 if (!parseAppointmentResponseContent(eventType, xpp, res)) 2852 unknownContent(xpp); 2853 eventType = nextNoWhitespace(xpp); 2854 } 2855 next(xpp); 2856 parseElementClose(res); 2857 return res; 2858 } 2859 2860 protected boolean parseAppointmentResponseContent(int eventType, XmlPullParser xpp, AppointmentResponse res) 2861 throws XmlPullParserException, IOException, FHIRFormatError { 2862 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 2863 res.getIdentifier().add(parseIdentifier(xpp)); 2864 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { 2865 res.setAppointment(parseReference(xpp)); 2866 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 2867 res.setStartElement(parseInstant(xpp)); 2868 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 2869 res.setEndElement(parseInstant(xpp)); 2870 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantType")) { 2871 res.getParticipantType().add(parseCodeableConcept(xpp)); 2872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 2873 res.setActor(parseReference(xpp)); 2874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantStatus")) { 2875 res.setParticipantStatusElement(parseEnumeration(xpp, AppointmentResponse.ParticipantStatus.NULL, 2876 new AppointmentResponse.ParticipantStatusEnumFactory())); 2877 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 2878 res.setCommentElement(parseString(xpp)); 2879 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2880 return false; 2881 return true; 2882 } 2883 2884 protected AuditEvent parseAuditEvent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 2885 AuditEvent res = new AuditEvent(); 2886 parseDomainResourceAttributes(xpp, res); 2887 next(xpp); 2888 int eventType = nextNoWhitespace(xpp); 2889 while (eventType != XmlPullParser.END_TAG) { 2890 if (!parseAuditEventContent(eventType, xpp, res)) 2891 unknownContent(xpp); 2892 eventType = nextNoWhitespace(xpp); 2893 } 2894 next(xpp); 2895 parseElementClose(res); 2896 return res; 2897 } 2898 2899 protected boolean parseAuditEventContent(int eventType, XmlPullParser xpp, AuditEvent res) 2900 throws XmlPullParserException, IOException, FHIRFormatError { 2901 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2902 res.setType(parseCoding(xpp)); 2903 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { 2904 res.getSubtype().add(parseCoding(xpp)); 2905 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 2906 res.setActionElement( 2907 parseEnumeration(xpp, AuditEvent.AuditEventAction.NULL, new AuditEvent.AuditEventActionEnumFactory())); 2908 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 2909 res.setPeriod(parsePeriod(xpp)); 2910 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { 2911 res.setRecordedElement(parseInstant(xpp)); 2912 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 2913 res.setOutcomeElement( 2914 parseEnumeration(xpp, AuditEvent.AuditEventOutcome.NULL, new AuditEvent.AuditEventOutcomeEnumFactory())); 2915 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeDesc")) { 2916 res.setOutcomeDescElement(parseString(xpp)); 2917 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfEvent")) { 2918 res.getPurposeOfEvent().add(parseCodeableConcept(xpp)); 2919 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { 2920 res.getAgent().add(parseAuditEventAuditEventAgentComponent(xpp, res)); 2921 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 2922 res.setSource(parseAuditEventAuditEventSourceComponent(xpp, res)); 2923 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { 2924 res.getEntity().add(parseAuditEventAuditEventEntityComponent(xpp, res)); 2925 } else if (!parseDomainResourceContent(eventType, xpp, res)) 2926 return false; 2927 return true; 2928 } 2929 2930 protected AuditEvent.AuditEventAgentComponent parseAuditEventAuditEventAgentComponent(XmlPullParser xpp, 2931 AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 2932 AuditEvent.AuditEventAgentComponent res = new AuditEvent.AuditEventAgentComponent(); 2933 parseBackboneAttributes(xpp, res); 2934 next(xpp); 2935 int eventType = nextNoWhitespace(xpp); 2936 while (eventType != XmlPullParser.END_TAG) { 2937 if (!parseAuditEventAuditEventAgentComponentContent(eventType, xpp, owner, res)) 2938 unknownContent(xpp); 2939 eventType = nextNoWhitespace(xpp); 2940 } 2941 next(xpp); 2942 parseElementClose(res); 2943 return res; 2944 } 2945 2946 protected boolean parseAuditEventAuditEventAgentComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, 2947 AuditEvent.AuditEventAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 2948 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2949 res.setType(parseCodeableConcept(xpp)); 2950 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 2951 res.getRole().add(parseCodeableConcept(xpp)); 2952 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { 2953 res.setWho(parseReference(xpp)); 2954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altId")) { 2955 res.setAltIdElement(parseString(xpp)); 2956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 2957 res.setNameElement(parseString(xpp)); 2958 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { 2959 res.setRequestorElement(parseBoolean(xpp)); 2960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 2961 res.setLocation(parseReference(xpp)); 2962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { 2963 res.getPolicy().add(parseUri(xpp)); 2964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("media")) { 2965 res.setMedia(parseCoding(xpp)); 2966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 2967 res.setNetwork(parseAuditEventAuditEventAgentNetworkComponent(xpp, owner)); 2968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purposeOfUse")) { 2969 res.getPurposeOfUse().add(parseCodeableConcept(xpp)); 2970 } else if (!parseBackboneElementContent(eventType, xpp, res)) 2971 return false; 2972 return true; 2973 } 2974 2975 protected AuditEvent.AuditEventAgentNetworkComponent parseAuditEventAuditEventAgentNetworkComponent(XmlPullParser xpp, 2976 AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 2977 AuditEvent.AuditEventAgentNetworkComponent res = new AuditEvent.AuditEventAgentNetworkComponent(); 2978 parseBackboneAttributes(xpp, res); 2979 next(xpp); 2980 int eventType = nextNoWhitespace(xpp); 2981 while (eventType != XmlPullParser.END_TAG) { 2982 if (!parseAuditEventAuditEventAgentNetworkComponentContent(eventType, xpp, owner, res)) 2983 unknownContent(xpp); 2984 eventType = nextNoWhitespace(xpp); 2985 } 2986 next(xpp); 2987 parseElementClose(res); 2988 return res; 2989 } 2990 2991 protected boolean parseAuditEventAuditEventAgentNetworkComponentContent(int eventType, XmlPullParser xpp, 2992 AuditEvent owner, AuditEvent.AuditEventAgentNetworkComponent res) 2993 throws XmlPullParserException, IOException, FHIRFormatError { 2994 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 2995 res.setAddressElement(parseString(xpp)); 2996 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 2997 res.setTypeElement(parseEnumeration(xpp, AuditEvent.AuditEventAgentNetworkType.NULL, 2998 new AuditEvent.AuditEventAgentNetworkTypeEnumFactory())); 2999 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3000 return false; 3001 return true; 3002 } 3003 3004 protected AuditEvent.AuditEventSourceComponent parseAuditEventAuditEventSourceComponent(XmlPullParser xpp, 3005 AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 3006 AuditEvent.AuditEventSourceComponent res = new AuditEvent.AuditEventSourceComponent(); 3007 parseBackboneAttributes(xpp, res); 3008 next(xpp); 3009 int eventType = nextNoWhitespace(xpp); 3010 while (eventType != XmlPullParser.END_TAG) { 3011 if (!parseAuditEventAuditEventSourceComponentContent(eventType, xpp, owner, res)) 3012 unknownContent(xpp); 3013 eventType = nextNoWhitespace(xpp); 3014 } 3015 next(xpp); 3016 parseElementClose(res); 3017 return res; 3018 } 3019 3020 protected boolean parseAuditEventAuditEventSourceComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, 3021 AuditEvent.AuditEventSourceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3022 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 3023 res.setSiteElement(parseString(xpp)); 3024 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observer")) { 3025 res.setObserver(parseReference(xpp)); 3026 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3027 res.getType().add(parseCoding(xpp)); 3028 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3029 return false; 3030 return true; 3031 } 3032 3033 protected AuditEvent.AuditEventEntityComponent parseAuditEventAuditEventEntityComponent(XmlPullParser xpp, 3034 AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 3035 AuditEvent.AuditEventEntityComponent res = new AuditEvent.AuditEventEntityComponent(); 3036 parseBackboneAttributes(xpp, res); 3037 next(xpp); 3038 int eventType = nextNoWhitespace(xpp); 3039 while (eventType != XmlPullParser.END_TAG) { 3040 if (!parseAuditEventAuditEventEntityComponentContent(eventType, xpp, owner, res)) 3041 unknownContent(xpp); 3042 eventType = nextNoWhitespace(xpp); 3043 } 3044 next(xpp); 3045 parseElementClose(res); 3046 return res; 3047 } 3048 3049 protected boolean parseAuditEventAuditEventEntityComponentContent(int eventType, XmlPullParser xpp, AuditEvent owner, 3050 AuditEvent.AuditEventEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3051 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("what")) { 3052 res.setWhat(parseReference(xpp)); 3053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3054 res.setType(parseCoding(xpp)); 3055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 3056 res.setRole(parseCoding(xpp)); 3057 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lifecycle")) { 3058 res.setLifecycle(parseCoding(xpp)); 3059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { 3060 res.getSecurityLabel().add(parseCoding(xpp)); 3061 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 3062 res.setNameElement(parseString(xpp)); 3063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3064 res.setDescriptionElement(parseString(xpp)); 3065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("query")) { 3066 res.setQueryElement(parseBase64Binary(xpp)); 3067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 3068 res.getDetail().add(parseAuditEventAuditEventEntityDetailComponent(xpp, owner)); 3069 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3070 return false; 3071 return true; 3072 } 3073 3074 protected AuditEvent.AuditEventEntityDetailComponent parseAuditEventAuditEventEntityDetailComponent(XmlPullParser xpp, 3075 AuditEvent owner) throws XmlPullParserException, IOException, FHIRFormatError { 3076 AuditEvent.AuditEventEntityDetailComponent res = new AuditEvent.AuditEventEntityDetailComponent(); 3077 parseBackboneAttributes(xpp, res); 3078 next(xpp); 3079 int eventType = nextNoWhitespace(xpp); 3080 while (eventType != XmlPullParser.END_TAG) { 3081 if (!parseAuditEventAuditEventEntityDetailComponentContent(eventType, xpp, owner, res)) 3082 unknownContent(xpp); 3083 eventType = nextNoWhitespace(xpp); 3084 } 3085 next(xpp); 3086 parseElementClose(res); 3087 return res; 3088 } 3089 3090 protected boolean parseAuditEventAuditEventEntityDetailComponentContent(int eventType, XmlPullParser xpp, 3091 AuditEvent owner, AuditEvent.AuditEventEntityDetailComponent res) 3092 throws XmlPullParserException, IOException, FHIRFormatError { 3093 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3094 res.setTypeElement(parseString(xpp)); 3095 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 3096 res.setValue(parseType("value", xpp)); 3097 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3098 return false; 3099 return true; 3100 } 3101 3102 protected Basic parseBasic(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 3103 Basic res = new Basic(); 3104 parseDomainResourceAttributes(xpp, res); 3105 next(xpp); 3106 int eventType = nextNoWhitespace(xpp); 3107 while (eventType != XmlPullParser.END_TAG) { 3108 if (!parseBasicContent(eventType, xpp, res)) 3109 unknownContent(xpp); 3110 eventType = nextNoWhitespace(xpp); 3111 } 3112 next(xpp); 3113 parseElementClose(res); 3114 return res; 3115 } 3116 3117 protected boolean parseBasicContent(int eventType, XmlPullParser xpp, Basic res) 3118 throws XmlPullParserException, IOException, FHIRFormatError { 3119 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 3120 res.getIdentifier().add(parseIdentifier(xpp)); 3121 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 3122 res.setCode(parseCodeableConcept(xpp)); 3123 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 3124 res.setSubject(parseReference(xpp)); 3125 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 3126 res.setCreatedElement(parseDate(xpp)); 3127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 3128 res.setAuthor(parseReference(xpp)); 3129 } else if (!parseDomainResourceContent(eventType, xpp, res)) 3130 return false; 3131 return true; 3132 } 3133 3134 protected Binary parseBinary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 3135 Binary res = new Binary(); 3136 parseResourceAttributes(xpp, res); 3137 next(xpp); 3138 int eventType = nextNoWhitespace(xpp); 3139 while (eventType != XmlPullParser.END_TAG) { 3140 if (!parseBinaryContent(eventType, xpp, res)) 3141 unknownContent(xpp); 3142 eventType = nextNoWhitespace(xpp); 3143 } 3144 next(xpp); 3145 parseElementClose(res); 3146 return res; 3147 } 3148 3149 protected boolean parseBinaryContent(int eventType, XmlPullParser xpp, Binary res) 3150 throws XmlPullParserException, IOException, FHIRFormatError { 3151 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { 3152 res.setContentTypeElement(parseCode(xpp)); 3153 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityContext")) { 3154 res.setSecurityContext(parseReference(xpp)); 3155 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 3156 res.setDataElement(parseBase64Binary(xpp)); 3157 } else if (!parseResourceContent(eventType, xpp, res)) 3158 return false; 3159 return true; 3160 } 3161 3162 protected BiologicallyDerivedProduct parseBiologicallyDerivedProduct(XmlPullParser xpp) 3163 throws XmlPullParserException, IOException, FHIRFormatError { 3164 BiologicallyDerivedProduct res = new BiologicallyDerivedProduct(); 3165 parseDomainResourceAttributes(xpp, res); 3166 next(xpp); 3167 int eventType = nextNoWhitespace(xpp); 3168 while (eventType != XmlPullParser.END_TAG) { 3169 if (!parseBiologicallyDerivedProductContent(eventType, xpp, res)) 3170 unknownContent(xpp); 3171 eventType = nextNoWhitespace(xpp); 3172 } 3173 next(xpp); 3174 parseElementClose(res); 3175 return res; 3176 } 3177 3178 protected boolean parseBiologicallyDerivedProductContent(int eventType, XmlPullParser xpp, 3179 BiologicallyDerivedProduct res) throws XmlPullParserException, IOException, FHIRFormatError { 3180 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 3181 res.getIdentifier().add(parseIdentifier(xpp)); 3182 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productCategory")) { 3183 res.setProductCategoryElement( 3184 parseEnumeration(xpp, BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL, 3185 new BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory())); 3186 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productCode")) { 3187 res.setProductCode(parseCodeableConcept(xpp)); 3188 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 3189 res.setStatusElement(parseEnumeration(xpp, BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL, 3190 new BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory())); 3191 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 3192 res.getRequest().add(parseReference(xpp)); 3193 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 3194 res.setQuantityElement(parseInteger(xpp)); 3195 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 3196 res.getParent().add(parseReference(xpp)); 3197 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { 3198 res.setCollection(parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent(xpp, res)); 3199 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processing")) { 3200 res.getProcessing().add(parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(xpp, res)); 3201 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manipulation")) { 3202 res.setManipulation(parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent(xpp, res)); 3203 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("storage")) { 3204 res.getStorage().add(parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(xpp, res)); 3205 } else if (!parseDomainResourceContent(eventType, xpp, res)) 3206 return false; 3207 return true; 3208 } 3209 3210 protected BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent( 3211 XmlPullParser xpp, BiologicallyDerivedProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 3212 BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent(); 3213 parseBackboneAttributes(xpp, res); 3214 next(xpp); 3215 int eventType = nextNoWhitespace(xpp); 3216 while (eventType != XmlPullParser.END_TAG) { 3217 if (!parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentContent(eventType, xpp, owner, 3218 res)) 3219 unknownContent(xpp); 3220 eventType = nextNoWhitespace(xpp); 3221 } 3222 next(xpp); 3223 parseElementClose(res); 3224 return res; 3225 } 3226 3227 protected boolean parseBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentContent(int eventType, 3228 XmlPullParser xpp, BiologicallyDerivedProduct owner, 3229 BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent res) 3230 throws XmlPullParserException, IOException, FHIRFormatError { 3231 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collector")) { 3232 res.setCollector(parseReference(xpp)); 3233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 3234 res.setSource(parseReference(xpp)); 3235 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "collected")) { 3236 res.setCollected(parseType("collected", xpp)); 3237 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3238 return false; 3239 return true; 3240 } 3241 3242 protected BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent( 3243 XmlPullParser xpp, BiologicallyDerivedProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 3244 BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent(); 3245 parseBackboneAttributes(xpp, res); 3246 next(xpp); 3247 int eventType = nextNoWhitespace(xpp); 3248 while (eventType != XmlPullParser.END_TAG) { 3249 if (!parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentContent(eventType, xpp, owner, 3250 res)) 3251 unknownContent(xpp); 3252 eventType = nextNoWhitespace(xpp); 3253 } 3254 next(xpp); 3255 parseElementClose(res); 3256 return res; 3257 } 3258 3259 protected boolean parseBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentContent(int eventType, 3260 XmlPullParser xpp, BiologicallyDerivedProduct owner, 3261 BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent res) 3262 throws XmlPullParserException, IOException, FHIRFormatError { 3263 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3264 res.setDescriptionElement(parseString(xpp)); 3265 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { 3266 res.setProcedure(parseCodeableConcept(xpp)); 3267 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additive")) { 3268 res.setAdditive(parseReference(xpp)); 3269 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "time")) { 3270 res.setTime(parseType("time", xpp)); 3271 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3272 return false; 3273 return true; 3274 } 3275 3276 protected BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent( 3277 XmlPullParser xpp, BiologicallyDerivedProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 3278 BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent(); 3279 parseBackboneAttributes(xpp, res); 3280 next(xpp); 3281 int eventType = nextNoWhitespace(xpp); 3282 while (eventType != XmlPullParser.END_TAG) { 3283 if (!parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentContent(eventType, xpp, owner, 3284 res)) 3285 unknownContent(xpp); 3286 eventType = nextNoWhitespace(xpp); 3287 } 3288 next(xpp); 3289 parseElementClose(res); 3290 return res; 3291 } 3292 3293 protected boolean parseBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentContent(int eventType, 3294 XmlPullParser xpp, BiologicallyDerivedProduct owner, 3295 BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent res) 3296 throws XmlPullParserException, IOException, FHIRFormatError { 3297 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3298 res.setDescriptionElement(parseString(xpp)); 3299 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "time")) { 3300 res.setTime(parseType("time", xpp)); 3301 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3302 return false; 3303 return true; 3304 } 3305 3306 protected BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent( 3307 XmlPullParser xpp, BiologicallyDerivedProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 3308 BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent res = new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent(); 3309 parseBackboneAttributes(xpp, res); 3310 next(xpp); 3311 int eventType = nextNoWhitespace(xpp); 3312 while (eventType != XmlPullParser.END_TAG) { 3313 if (!parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentContent(eventType, xpp, owner, res)) 3314 unknownContent(xpp); 3315 eventType = nextNoWhitespace(xpp); 3316 } 3317 next(xpp); 3318 parseElementClose(res); 3319 return res; 3320 } 3321 3322 protected boolean parseBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentContent(int eventType, 3323 XmlPullParser xpp, BiologicallyDerivedProduct owner, 3324 BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent res) 3325 throws XmlPullParserException, IOException, FHIRFormatError { 3326 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3327 res.setDescriptionElement(parseString(xpp)); 3328 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("temperature")) { 3329 res.setTemperatureElement(parseDecimal(xpp)); 3330 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scale")) { 3331 res.setScaleElement(parseEnumeration(xpp, BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.NULL, 3332 new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory())); 3333 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 3334 res.setDuration(parsePeriod(xpp)); 3335 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3336 return false; 3337 return true; 3338 } 3339 3340 protected BodyStructure parseBodyStructure(XmlPullParser xpp) 3341 throws XmlPullParserException, IOException, FHIRFormatError { 3342 BodyStructure res = new BodyStructure(); 3343 parseDomainResourceAttributes(xpp, res); 3344 next(xpp); 3345 int eventType = nextNoWhitespace(xpp); 3346 while (eventType != XmlPullParser.END_TAG) { 3347 if (!parseBodyStructureContent(eventType, xpp, res)) 3348 unknownContent(xpp); 3349 eventType = nextNoWhitespace(xpp); 3350 } 3351 next(xpp); 3352 parseElementClose(res); 3353 return res; 3354 } 3355 3356 protected boolean parseBodyStructureContent(int eventType, XmlPullParser xpp, BodyStructure res) 3357 throws XmlPullParserException, IOException, FHIRFormatError { 3358 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 3359 res.getIdentifier().add(parseIdentifier(xpp)); 3360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 3361 res.setActiveElement(parseBoolean(xpp)); 3362 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("morphology")) { 3363 res.setMorphology(parseCodeableConcept(xpp)); 3364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 3365 res.setLocation(parseCodeableConcept(xpp)); 3366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("locationQualifier")) { 3367 res.getLocationQualifier().add(parseCodeableConcept(xpp)); 3368 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3369 res.setDescriptionElement(parseString(xpp)); 3370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { 3371 res.getImage().add(parseAttachment(xpp)); 3372 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 3373 res.setPatient(parseReference(xpp)); 3374 } else if (!parseDomainResourceContent(eventType, xpp, res)) 3375 return false; 3376 return true; 3377 } 3378 3379 protected Bundle parseBundle(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 3380 Bundle res = new Bundle(); 3381 parseResourceAttributes(xpp, res); 3382 next(xpp); 3383 int eventType = nextNoWhitespace(xpp); 3384 while (eventType != XmlPullParser.END_TAG) { 3385 if (!parseBundleContent(eventType, xpp, res)) 3386 unknownContent(xpp); 3387 eventType = nextNoWhitespace(xpp); 3388 } 3389 next(xpp); 3390 parseElementClose(res); 3391 return res; 3392 } 3393 3394 protected boolean parseBundleContent(int eventType, XmlPullParser xpp, Bundle res) 3395 throws XmlPullParserException, IOException, FHIRFormatError { 3396 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 3397 res.setIdentifier(parseIdentifier(xpp)); 3398 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3399 res.setTypeElement(parseEnumeration(xpp, Bundle.BundleType.NULL, new Bundle.BundleTypeEnumFactory())); 3400 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { 3401 res.setTimestampElement(parseInstant(xpp)); 3402 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { 3403 res.setTotalElement(parseUnsignedInt(xpp)); 3404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 3405 res.getLink().add(parseBundleBundleLinkComponent(xpp, res)); 3406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { 3407 res.getEntry().add(parseBundleBundleEntryComponent(xpp, res)); 3408 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { 3409 res.setSignature(parseSignature(xpp)); 3410 } else if (!parseResourceContent(eventType, xpp, res)) 3411 return false; 3412 return true; 3413 } 3414 3415 protected Bundle.BundleLinkComponent parseBundleBundleLinkComponent(XmlPullParser xpp, Bundle owner) 3416 throws XmlPullParserException, IOException, FHIRFormatError { 3417 Bundle.BundleLinkComponent res = new Bundle.BundleLinkComponent(); 3418 parseBackboneAttributes(xpp, res); 3419 next(xpp); 3420 int eventType = nextNoWhitespace(xpp); 3421 while (eventType != XmlPullParser.END_TAG) { 3422 if (!parseBundleBundleLinkComponentContent(eventType, xpp, owner, res)) 3423 unknownContent(xpp); 3424 eventType = nextNoWhitespace(xpp); 3425 } 3426 next(xpp); 3427 parseElementClose(res); 3428 return res; 3429 } 3430 3431 protected boolean parseBundleBundleLinkComponentContent(int eventType, XmlPullParser xpp, Bundle owner, 3432 Bundle.BundleLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3433 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relation")) { 3434 res.setRelationElement(parseString(xpp)); 3435 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 3436 res.setUrlElement(parseUri(xpp)); 3437 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3438 return false; 3439 return true; 3440 } 3441 3442 protected Bundle.BundleEntryComponent parseBundleBundleEntryComponent(XmlPullParser xpp, Bundle owner) 3443 throws XmlPullParserException, IOException, FHIRFormatError { 3444 Bundle.BundleEntryComponent res = new Bundle.BundleEntryComponent(); 3445 parseBackboneAttributes(xpp, res); 3446 next(xpp); 3447 int eventType = nextNoWhitespace(xpp); 3448 while (eventType != XmlPullParser.END_TAG) { 3449 if (!parseBundleBundleEntryComponentContent(eventType, xpp, owner, res)) 3450 unknownContent(xpp); 3451 eventType = nextNoWhitespace(xpp); 3452 } 3453 next(xpp); 3454 parseElementClose(res); 3455 return res; 3456 } 3457 3458 protected boolean parseBundleBundleEntryComponentContent(int eventType, XmlPullParser xpp, Bundle owner, 3459 Bundle.BundleEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3460 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 3461 res.getLink().add(parseBundleBundleLinkComponent(xpp, owner)); 3462 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fullUrl")) { 3463 res.setFullUrlElement(parseUri(xpp)); 3464 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 3465 res.setResource(parseResourceContained(xpp)); 3466 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { 3467 res.setSearch(parseBundleBundleEntrySearchComponent(xpp, owner)); 3468 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 3469 res.setRequest(parseBundleBundleEntryRequestComponent(xpp, owner)); 3470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 3471 res.setResponse(parseBundleBundleEntryResponseComponent(xpp, owner)); 3472 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3473 return false; 3474 return true; 3475 } 3476 3477 protected Bundle.BundleEntrySearchComponent parseBundleBundleEntrySearchComponent(XmlPullParser xpp, Bundle owner) 3478 throws XmlPullParserException, IOException, FHIRFormatError { 3479 Bundle.BundleEntrySearchComponent res = new Bundle.BundleEntrySearchComponent(); 3480 parseBackboneAttributes(xpp, res); 3481 next(xpp); 3482 int eventType = nextNoWhitespace(xpp); 3483 while (eventType != XmlPullParser.END_TAG) { 3484 if (!parseBundleBundleEntrySearchComponentContent(eventType, xpp, owner, res)) 3485 unknownContent(xpp); 3486 eventType = nextNoWhitespace(xpp); 3487 } 3488 next(xpp); 3489 parseElementClose(res); 3490 return res; 3491 } 3492 3493 protected boolean parseBundleBundleEntrySearchComponentContent(int eventType, XmlPullParser xpp, Bundle owner, 3494 Bundle.BundleEntrySearchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3495 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 3496 res.setModeElement(parseEnumeration(xpp, Bundle.SearchEntryMode.NULL, new Bundle.SearchEntryModeEnumFactory())); 3497 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { 3498 res.setScoreElement(parseDecimal(xpp)); 3499 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3500 return false; 3501 return true; 3502 } 3503 3504 protected Bundle.BundleEntryRequestComponent parseBundleBundleEntryRequestComponent(XmlPullParser xpp, Bundle owner) 3505 throws XmlPullParserException, IOException, FHIRFormatError { 3506 Bundle.BundleEntryRequestComponent res = new Bundle.BundleEntryRequestComponent(); 3507 parseBackboneAttributes(xpp, res); 3508 next(xpp); 3509 int eventType = nextNoWhitespace(xpp); 3510 while (eventType != XmlPullParser.END_TAG) { 3511 if (!parseBundleBundleEntryRequestComponentContent(eventType, xpp, owner, res)) 3512 unknownContent(xpp); 3513 eventType = nextNoWhitespace(xpp); 3514 } 3515 next(xpp); 3516 parseElementClose(res); 3517 return res; 3518 } 3519 3520 protected boolean parseBundleBundleEntryRequestComponentContent(int eventType, XmlPullParser xpp, Bundle owner, 3521 Bundle.BundleEntryRequestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3522 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 3523 res.setMethodElement(parseEnumeration(xpp, Bundle.HTTPVerb.NULL, new Bundle.HTTPVerbEnumFactory())); 3524 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 3525 res.setUrlElement(parseUri(xpp)); 3526 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneMatch")) { 3527 res.setIfNoneMatchElement(parseString(xpp)); 3528 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifModifiedSince")) { 3529 res.setIfModifiedSinceElement(parseInstant(xpp)); 3530 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifMatch")) { 3531 res.setIfMatchElement(parseString(xpp)); 3532 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ifNoneExist")) { 3533 res.setIfNoneExistElement(parseString(xpp)); 3534 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3535 return false; 3536 return true; 3537 } 3538 3539 protected Bundle.BundleEntryResponseComponent parseBundleBundleEntryResponseComponent(XmlPullParser xpp, Bundle owner) 3540 throws XmlPullParserException, IOException, FHIRFormatError { 3541 Bundle.BundleEntryResponseComponent res = new Bundle.BundleEntryResponseComponent(); 3542 parseBackboneAttributes(xpp, res); 3543 next(xpp); 3544 int eventType = nextNoWhitespace(xpp); 3545 while (eventType != XmlPullParser.END_TAG) { 3546 if (!parseBundleBundleEntryResponseComponentContent(eventType, xpp, owner, res)) 3547 unknownContent(xpp); 3548 eventType = nextNoWhitespace(xpp); 3549 } 3550 next(xpp); 3551 parseElementClose(res); 3552 return res; 3553 } 3554 3555 protected boolean parseBundleBundleEntryResponseComponentContent(int eventType, XmlPullParser xpp, Bundle owner, 3556 Bundle.BundleEntryResponseComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 3557 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 3558 res.setStatusElement(parseString(xpp)); 3559 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 3560 res.setLocationElement(parseUri(xpp)); 3561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("etag")) { 3562 res.setEtagElement(parseString(xpp)); 3563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { 3564 res.setLastModifiedElement(parseInstant(xpp)); 3565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 3566 res.setOutcome(parseResourceContained(xpp)); 3567 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3568 return false; 3569 return true; 3570 } 3571 3572 protected CapabilityStatement parseCapabilityStatement(XmlPullParser xpp) 3573 throws XmlPullParserException, IOException, FHIRFormatError { 3574 CapabilityStatement res = new CapabilityStatement(); 3575 parseDomainResourceAttributes(xpp, res); 3576 next(xpp); 3577 int eventType = nextNoWhitespace(xpp); 3578 while (eventType != XmlPullParser.END_TAG) { 3579 if (!parseCapabilityStatementContent(eventType, xpp, res)) 3580 unknownContent(xpp); 3581 eventType = nextNoWhitespace(xpp); 3582 } 3583 next(xpp); 3584 parseElementClose(res); 3585 return res; 3586 } 3587 3588 protected boolean parseCapabilityStatementContent(int eventType, XmlPullParser xpp, CapabilityStatement res) 3589 throws XmlPullParserException, IOException, FHIRFormatError { 3590 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 3591 res.setUrlElement(parseUri(xpp)); 3592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 3593 res.setVersionElement(parseString(xpp)); 3594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 3595 res.setNameElement(parseString(xpp)); 3596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 3597 res.setTitleElement(parseString(xpp)); 3598 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 3599 res.setStatusElement( 3600 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 3601 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 3602 res.setExperimentalElement(parseBoolean(xpp)); 3603 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 3604 res.setDateElement(parseDateTime(xpp)); 3605 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 3606 res.setPublisherElement(parseString(xpp)); 3607 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 3608 res.getContact().add(parseContactDetail(xpp)); 3609 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3610 res.setDescriptionElement(parseMarkdown(xpp)); 3611 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 3612 res.getUseContext().add(parseUsageContext(xpp)); 3613 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 3614 res.getJurisdiction().add(parseCodeableConcept(xpp)); 3615 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 3616 res.setPurposeElement(parseMarkdown(xpp)); 3617 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 3618 res.setCopyrightElement(parseMarkdown(xpp)); 3619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 3620 res.setKindElement(parseEnumeration(xpp, CapabilityStatement.CapabilityStatementKind.NULL, 3621 new CapabilityStatement.CapabilityStatementKindEnumFactory())); 3622 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiates")) { 3623 res.getInstantiates().add(parseCanonical(xpp)); 3624 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imports")) { 3625 res.getImports().add(parseCanonical(xpp)); 3626 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { 3627 res.setSoftware(parseCapabilityStatementCapabilityStatementSoftwareComponent(xpp, res)); 3628 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementation")) { 3629 res.setImplementation(parseCapabilityStatementCapabilityStatementImplementationComponent(xpp, res)); 3630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { 3631 res.setFhirVersionElement( 3632 parseEnumeration(xpp, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory())); 3633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { 3634 res.getFormat().add(parseCode(xpp)); 3635 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patchFormat")) { 3636 res.getPatchFormat().add(parseCode(xpp)); 3637 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementationGuide")) { 3638 res.getImplementationGuide().add(parseCanonical(xpp)); 3639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rest")) { 3640 res.getRest().add(parseCapabilityStatementCapabilityStatementRestComponent(xpp, res)); 3641 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("messaging")) { 3642 res.getMessaging().add(parseCapabilityStatementCapabilityStatementMessagingComponent(xpp, res)); 3643 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("document")) { 3644 res.getDocument().add(parseCapabilityStatementCapabilityStatementDocumentComponent(xpp, res)); 3645 } else if (!parseDomainResourceContent(eventType, xpp, res)) 3646 return false; 3647 return true; 3648 } 3649 3650 protected CapabilityStatement.CapabilityStatementSoftwareComponent parseCapabilityStatementCapabilityStatementSoftwareComponent( 3651 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3652 CapabilityStatement.CapabilityStatementSoftwareComponent res = new CapabilityStatement.CapabilityStatementSoftwareComponent(); 3653 parseBackboneAttributes(xpp, res); 3654 next(xpp); 3655 int eventType = nextNoWhitespace(xpp); 3656 while (eventType != XmlPullParser.END_TAG) { 3657 if (!parseCapabilityStatementCapabilityStatementSoftwareComponentContent(eventType, xpp, owner, res)) 3658 unknownContent(xpp); 3659 eventType = nextNoWhitespace(xpp); 3660 } 3661 next(xpp); 3662 parseElementClose(res); 3663 return res; 3664 } 3665 3666 protected boolean parseCapabilityStatementCapabilityStatementSoftwareComponentContent(int eventType, 3667 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementSoftwareComponent res) 3668 throws XmlPullParserException, IOException, FHIRFormatError { 3669 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 3670 res.setNameElement(parseString(xpp)); 3671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 3672 res.setVersionElement(parseString(xpp)); 3673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("releaseDate")) { 3674 res.setReleaseDateElement(parseDateTime(xpp)); 3675 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3676 return false; 3677 return true; 3678 } 3679 3680 protected CapabilityStatement.CapabilityStatementImplementationComponent parseCapabilityStatementCapabilityStatementImplementationComponent( 3681 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3682 CapabilityStatement.CapabilityStatementImplementationComponent res = new CapabilityStatement.CapabilityStatementImplementationComponent(); 3683 parseBackboneAttributes(xpp, res); 3684 next(xpp); 3685 int eventType = nextNoWhitespace(xpp); 3686 while (eventType != XmlPullParser.END_TAG) { 3687 if (!parseCapabilityStatementCapabilityStatementImplementationComponentContent(eventType, xpp, owner, res)) 3688 unknownContent(xpp); 3689 eventType = nextNoWhitespace(xpp); 3690 } 3691 next(xpp); 3692 parseElementClose(res); 3693 return res; 3694 } 3695 3696 protected boolean parseCapabilityStatementCapabilityStatementImplementationComponentContent(int eventType, 3697 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementImplementationComponent res) 3698 throws XmlPullParserException, IOException, FHIRFormatError { 3699 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3700 res.setDescriptionElement(parseString(xpp)); 3701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 3702 res.setUrlElement(parseUrl(xpp)); 3703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { 3704 res.setCustodian(parseReference(xpp)); 3705 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3706 return false; 3707 return true; 3708 } 3709 3710 protected CapabilityStatement.CapabilityStatementRestComponent parseCapabilityStatementCapabilityStatementRestComponent( 3711 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3712 CapabilityStatement.CapabilityStatementRestComponent res = new CapabilityStatement.CapabilityStatementRestComponent(); 3713 parseBackboneAttributes(xpp, res); 3714 next(xpp); 3715 int eventType = nextNoWhitespace(xpp); 3716 while (eventType != XmlPullParser.END_TAG) { 3717 if (!parseCapabilityStatementCapabilityStatementRestComponentContent(eventType, xpp, owner, res)) 3718 unknownContent(xpp); 3719 eventType = nextNoWhitespace(xpp); 3720 } 3721 next(xpp); 3722 parseElementClose(res); 3723 return res; 3724 } 3725 3726 protected boolean parseCapabilityStatementCapabilityStatementRestComponentContent(int eventType, XmlPullParser xpp, 3727 CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestComponent res) 3728 throws XmlPullParserException, IOException, FHIRFormatError { 3729 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 3730 res.setModeElement(parseEnumeration(xpp, CapabilityStatement.RestfulCapabilityMode.NULL, 3731 new CapabilityStatement.RestfulCapabilityModeEnumFactory())); 3732 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3733 res.setDocumentationElement(parseMarkdown(xpp)); 3734 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("security")) { 3735 res.setSecurity(parseCapabilityStatementCapabilityStatementRestSecurityComponent(xpp, owner)); 3736 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 3737 res.getResource().add(parseCapabilityStatementCapabilityStatementRestResourceComponent(xpp, owner)); 3738 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { 3739 res.getInteraction().add(parseCapabilityStatementSystemInteractionComponent(xpp, owner)); 3740 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { 3741 res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); 3742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 3743 res.getOperation().add(parseCapabilityStatementCapabilityStatementRestResourceOperationComponent(xpp, owner)); 3744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { 3745 res.getCompartment().add(parseCanonical(xpp)); 3746 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3747 return false; 3748 return true; 3749 } 3750 3751 protected CapabilityStatement.CapabilityStatementRestSecurityComponent parseCapabilityStatementCapabilityStatementRestSecurityComponent( 3752 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3753 CapabilityStatement.CapabilityStatementRestSecurityComponent res = new CapabilityStatement.CapabilityStatementRestSecurityComponent(); 3754 parseBackboneAttributes(xpp, res); 3755 next(xpp); 3756 int eventType = nextNoWhitespace(xpp); 3757 while (eventType != XmlPullParser.END_TAG) { 3758 if (!parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(eventType, xpp, owner, res)) 3759 unknownContent(xpp); 3760 eventType = nextNoWhitespace(xpp); 3761 } 3762 next(xpp); 3763 parseElementClose(res); 3764 return res; 3765 } 3766 3767 protected boolean parseCapabilityStatementCapabilityStatementRestSecurityComponentContent(int eventType, 3768 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestSecurityComponent res) 3769 throws XmlPullParserException, IOException, FHIRFormatError { 3770 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cors")) { 3771 res.setCorsElement(parseBoolean(xpp)); 3772 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { 3773 res.getService().add(parseCodeableConcept(xpp)); 3774 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 3775 res.setDescriptionElement(parseMarkdown(xpp)); 3776 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3777 return false; 3778 return true; 3779 } 3780 3781 protected CapabilityStatement.CapabilityStatementRestResourceComponent parseCapabilityStatementCapabilityStatementRestResourceComponent( 3782 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3783 CapabilityStatement.CapabilityStatementRestResourceComponent res = new CapabilityStatement.CapabilityStatementRestResourceComponent(); 3784 parseBackboneAttributes(xpp, res); 3785 next(xpp); 3786 int eventType = nextNoWhitespace(xpp); 3787 while (eventType != XmlPullParser.END_TAG) { 3788 if (!parseCapabilityStatementCapabilityStatementRestResourceComponentContent(eventType, xpp, owner, res)) 3789 unknownContent(xpp); 3790 eventType = nextNoWhitespace(xpp); 3791 } 3792 next(xpp); 3793 parseElementClose(res); 3794 return res; 3795 } 3796 3797 protected boolean parseCapabilityStatementCapabilityStatementRestResourceComponentContent(int eventType, 3798 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementRestResourceComponent res) 3799 throws XmlPullParserException, IOException, FHIRFormatError { 3800 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3801 res.setTypeElement(parseCode(xpp)); 3802 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 3803 res.setProfileElement(parseCanonical(xpp)); 3804 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportedProfile")) { 3805 res.getSupportedProfile().add(parseCanonical(xpp)); 3806 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3807 res.setDocumentationElement(parseMarkdown(xpp)); 3808 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { 3809 res.getInteraction().add(parseCapabilityStatementResourceInteractionComponent(xpp, owner)); 3810 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versioning")) { 3811 res.setVersioningElement(parseEnumeration(xpp, CapabilityStatement.ResourceVersionPolicy.NULL, 3812 new CapabilityStatement.ResourceVersionPolicyEnumFactory())); 3813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readHistory")) { 3814 res.setReadHistoryElement(parseBoolean(xpp)); 3815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("updateCreate")) { 3816 res.setUpdateCreateElement(parseBoolean(xpp)); 3817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalCreate")) { 3818 res.setConditionalCreateElement(parseBoolean(xpp)); 3819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalRead")) { 3820 res.setConditionalReadElement(parseEnumeration(xpp, CapabilityStatement.ConditionalReadStatus.NULL, 3821 new CapabilityStatement.ConditionalReadStatusEnumFactory())); 3822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalUpdate")) { 3823 res.setConditionalUpdateElement(parseBoolean(xpp)); 3824 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conditionalDelete")) { 3825 res.setConditionalDeleteElement(parseEnumeration(xpp, CapabilityStatement.ConditionalDeleteStatus.NULL, 3826 new CapabilityStatement.ConditionalDeleteStatusEnumFactory())); 3827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencePolicy")) { 3828 res.getReferencePolicy().add(parseEnumeration(xpp, CapabilityStatement.ReferenceHandlingPolicy.NULL, 3829 new CapabilityStatement.ReferenceHandlingPolicyEnumFactory())); 3830 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchInclude")) { 3831 res.getSearchInclude().add(parseString(xpp)); 3832 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchRevInclude")) { 3833 res.getSearchRevInclude().add(parseString(xpp)); 3834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchParam")) { 3835 res.getSearchParam().add(parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(xpp, owner)); 3836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 3837 res.getOperation().add(parseCapabilityStatementCapabilityStatementRestResourceOperationComponent(xpp, owner)); 3838 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3839 return false; 3840 return true; 3841 } 3842 3843 protected CapabilityStatement.ResourceInteractionComponent parseCapabilityStatementResourceInteractionComponent( 3844 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3845 CapabilityStatement.ResourceInteractionComponent res = new CapabilityStatement.ResourceInteractionComponent(); 3846 parseBackboneAttributes(xpp, res); 3847 next(xpp); 3848 int eventType = nextNoWhitespace(xpp); 3849 while (eventType != XmlPullParser.END_TAG) { 3850 if (!parseCapabilityStatementResourceInteractionComponentContent(eventType, xpp, owner, res)) 3851 unknownContent(xpp); 3852 eventType = nextNoWhitespace(xpp); 3853 } 3854 next(xpp); 3855 parseElementClose(res); 3856 return res; 3857 } 3858 3859 protected boolean parseCapabilityStatementResourceInteractionComponentContent(int eventType, XmlPullParser xpp, 3860 CapabilityStatement owner, CapabilityStatement.ResourceInteractionComponent res) 3861 throws XmlPullParserException, IOException, FHIRFormatError { 3862 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 3863 res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.TypeRestfulInteraction.NULL, 3864 new CapabilityStatement.TypeRestfulInteractionEnumFactory())); 3865 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3866 res.setDocumentationElement(parseMarkdown(xpp)); 3867 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3868 return false; 3869 return true; 3870 } 3871 3872 protected CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponent( 3873 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3874 CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res = new CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); 3875 parseBackboneAttributes(xpp, res); 3876 next(xpp); 3877 int eventType = nextNoWhitespace(xpp); 3878 while (eventType != XmlPullParser.END_TAG) { 3879 if (!parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(eventType, xpp, owner, 3880 res)) 3881 unknownContent(xpp); 3882 eventType = nextNoWhitespace(xpp); 3883 } 3884 next(xpp); 3885 parseElementClose(res); 3886 return res; 3887 } 3888 3889 protected boolean parseCapabilityStatementCapabilityStatementRestResourceSearchParamComponentContent(int eventType, 3890 XmlPullParser xpp, CapabilityStatement owner, 3891 CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent res) 3892 throws XmlPullParserException, IOException, FHIRFormatError { 3893 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 3894 res.setNameElement(parseString(xpp)); 3895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 3896 res.setDefinitionElement(parseCanonical(xpp)); 3897 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 3898 res.setTypeElement( 3899 parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); 3900 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3901 res.setDocumentationElement(parseMarkdown(xpp)); 3902 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3903 return false; 3904 return true; 3905 } 3906 3907 protected CapabilityStatement.CapabilityStatementRestResourceOperationComponent parseCapabilityStatementCapabilityStatementRestResourceOperationComponent( 3908 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3909 CapabilityStatement.CapabilityStatementRestResourceOperationComponent res = new CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); 3910 parseBackboneAttributes(xpp, res); 3911 next(xpp); 3912 int eventType = nextNoWhitespace(xpp); 3913 while (eventType != XmlPullParser.END_TAG) { 3914 if (!parseCapabilityStatementCapabilityStatementRestResourceOperationComponentContent(eventType, xpp, owner, res)) 3915 unknownContent(xpp); 3916 eventType = nextNoWhitespace(xpp); 3917 } 3918 next(xpp); 3919 parseElementClose(res); 3920 return res; 3921 } 3922 3923 protected boolean parseCapabilityStatementCapabilityStatementRestResourceOperationComponentContent(int eventType, 3924 XmlPullParser xpp, CapabilityStatement owner, 3925 CapabilityStatement.CapabilityStatementRestResourceOperationComponent res) 3926 throws XmlPullParserException, IOException, FHIRFormatError { 3927 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 3928 res.setNameElement(parseString(xpp)); 3929 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 3930 res.setDefinitionElement(parseCanonical(xpp)); 3931 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3932 res.setDocumentationElement(parseMarkdown(xpp)); 3933 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3934 return false; 3935 return true; 3936 } 3937 3938 protected CapabilityStatement.SystemInteractionComponent parseCapabilityStatementSystemInteractionComponent( 3939 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3940 CapabilityStatement.SystemInteractionComponent res = new CapabilityStatement.SystemInteractionComponent(); 3941 parseBackboneAttributes(xpp, res); 3942 next(xpp); 3943 int eventType = nextNoWhitespace(xpp); 3944 while (eventType != XmlPullParser.END_TAG) { 3945 if (!parseCapabilityStatementSystemInteractionComponentContent(eventType, xpp, owner, res)) 3946 unknownContent(xpp); 3947 eventType = nextNoWhitespace(xpp); 3948 } 3949 next(xpp); 3950 parseElementClose(res); 3951 return res; 3952 } 3953 3954 protected boolean parseCapabilityStatementSystemInteractionComponentContent(int eventType, XmlPullParser xpp, 3955 CapabilityStatement owner, CapabilityStatement.SystemInteractionComponent res) 3956 throws XmlPullParserException, IOException, FHIRFormatError { 3957 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 3958 res.setCodeElement(parseEnumeration(xpp, CapabilityStatement.SystemRestfulInteraction.NULL, 3959 new CapabilityStatement.SystemRestfulInteractionEnumFactory())); 3960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3961 res.setDocumentationElement(parseMarkdown(xpp)); 3962 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3963 return false; 3964 return true; 3965 } 3966 3967 protected CapabilityStatement.CapabilityStatementMessagingComponent parseCapabilityStatementCapabilityStatementMessagingComponent( 3968 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 3969 CapabilityStatement.CapabilityStatementMessagingComponent res = new CapabilityStatement.CapabilityStatementMessagingComponent(); 3970 parseBackboneAttributes(xpp, res); 3971 next(xpp); 3972 int eventType = nextNoWhitespace(xpp); 3973 while (eventType != XmlPullParser.END_TAG) { 3974 if (!parseCapabilityStatementCapabilityStatementMessagingComponentContent(eventType, xpp, owner, res)) 3975 unknownContent(xpp); 3976 eventType = nextNoWhitespace(xpp); 3977 } 3978 next(xpp); 3979 parseElementClose(res); 3980 return res; 3981 } 3982 3983 protected boolean parseCapabilityStatementCapabilityStatementMessagingComponentContent(int eventType, 3984 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementMessagingComponent res) 3985 throws XmlPullParserException, IOException, FHIRFormatError { 3986 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 3987 res.getEndpoint().add(parseCapabilityStatementCapabilityStatementMessagingEndpointComponent(xpp, owner)); 3988 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reliableCache")) { 3989 res.setReliableCacheElement(parseUnsignedInt(xpp)); 3990 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 3991 res.setDocumentationElement(parseMarkdown(xpp)); 3992 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportedMessage")) { 3993 res.getSupportedMessage() 3994 .add(parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(xpp, owner)); 3995 } else if (!parseBackboneElementContent(eventType, xpp, res)) 3996 return false; 3997 return true; 3998 } 3999 4000 protected CapabilityStatement.CapabilityStatementMessagingEndpointComponent parseCapabilityStatementCapabilityStatementMessagingEndpointComponent( 4001 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 4002 CapabilityStatement.CapabilityStatementMessagingEndpointComponent res = new CapabilityStatement.CapabilityStatementMessagingEndpointComponent(); 4003 parseBackboneAttributes(xpp, res); 4004 next(xpp); 4005 int eventType = nextNoWhitespace(xpp); 4006 while (eventType != XmlPullParser.END_TAG) { 4007 if (!parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(eventType, xpp, owner, res)) 4008 unknownContent(xpp); 4009 eventType = nextNoWhitespace(xpp); 4010 } 4011 next(xpp); 4012 parseElementClose(res); 4013 return res; 4014 } 4015 4016 protected boolean parseCapabilityStatementCapabilityStatementMessagingEndpointComponentContent(int eventType, 4017 XmlPullParser xpp, CapabilityStatement owner, 4018 CapabilityStatement.CapabilityStatementMessagingEndpointComponent res) 4019 throws XmlPullParserException, IOException, FHIRFormatError { 4020 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { 4021 res.setProtocol(parseCoding(xpp)); 4022 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 4023 res.setAddressElement(parseUrl(xpp)); 4024 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4025 return false; 4026 return true; 4027 } 4028 4029 protected CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent( 4030 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 4031 CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res = new CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent(); 4032 parseBackboneAttributes(xpp, res); 4033 next(xpp); 4034 int eventType = nextNoWhitespace(xpp); 4035 while (eventType != XmlPullParser.END_TAG) { 4036 if (!parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(eventType, xpp, owner, 4037 res)) 4038 unknownContent(xpp); 4039 eventType = nextNoWhitespace(xpp); 4040 } 4041 next(xpp); 4042 parseElementClose(res); 4043 return res; 4044 } 4045 4046 protected boolean parseCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentContent(int eventType, 4047 XmlPullParser xpp, CapabilityStatement owner, 4048 CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent res) 4049 throws XmlPullParserException, IOException, FHIRFormatError { 4050 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 4051 res.setModeElement(parseEnumeration(xpp, CapabilityStatement.EventCapabilityMode.NULL, 4052 new CapabilityStatement.EventCapabilityModeEnumFactory())); 4053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 4054 res.setDefinitionElement(parseCanonical(xpp)); 4055 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4056 return false; 4057 return true; 4058 } 4059 4060 protected CapabilityStatement.CapabilityStatementDocumentComponent parseCapabilityStatementCapabilityStatementDocumentComponent( 4061 XmlPullParser xpp, CapabilityStatement owner) throws XmlPullParserException, IOException, FHIRFormatError { 4062 CapabilityStatement.CapabilityStatementDocumentComponent res = new CapabilityStatement.CapabilityStatementDocumentComponent(); 4063 parseBackboneAttributes(xpp, res); 4064 next(xpp); 4065 int eventType = nextNoWhitespace(xpp); 4066 while (eventType != XmlPullParser.END_TAG) { 4067 if (!parseCapabilityStatementCapabilityStatementDocumentComponentContent(eventType, xpp, owner, res)) 4068 unknownContent(xpp); 4069 eventType = nextNoWhitespace(xpp); 4070 } 4071 next(xpp); 4072 parseElementClose(res); 4073 return res; 4074 } 4075 4076 protected boolean parseCapabilityStatementCapabilityStatementDocumentComponentContent(int eventType, 4077 XmlPullParser xpp, CapabilityStatement owner, CapabilityStatement.CapabilityStatementDocumentComponent res) 4078 throws XmlPullParserException, IOException, FHIRFormatError { 4079 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 4080 res.setModeElement(parseEnumeration(xpp, CapabilityStatement.DocumentMode.NULL, 4081 new CapabilityStatement.DocumentModeEnumFactory())); 4082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 4083 res.setDocumentationElement(parseMarkdown(xpp)); 4084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 4085 res.setProfileElement(parseCanonical(xpp)); 4086 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4087 return false; 4088 return true; 4089 } 4090 4091 protected CarePlan parseCarePlan(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 4092 CarePlan res = new CarePlan(); 4093 parseDomainResourceAttributes(xpp, res); 4094 next(xpp); 4095 int eventType = nextNoWhitespace(xpp); 4096 while (eventType != XmlPullParser.END_TAG) { 4097 if (!parseCarePlanContent(eventType, xpp, res)) 4098 unknownContent(xpp); 4099 eventType = nextNoWhitespace(xpp); 4100 } 4101 next(xpp); 4102 parseElementClose(res); 4103 return res; 4104 } 4105 4106 protected boolean parseCarePlanContent(int eventType, XmlPullParser xpp, CarePlan res) 4107 throws XmlPullParserException, IOException, FHIRFormatError { 4108 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4109 res.getIdentifier().add(parseIdentifier(xpp)); 4110 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 4111 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 4112 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 4113 res.getInstantiatesUri().add(parseUri(xpp)); 4114 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 4115 res.getBasedOn().add(parseReference(xpp)); 4116 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 4117 res.getReplaces().add(parseReference(xpp)); 4118 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 4119 res.getPartOf().add(parseReference(xpp)); 4120 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4121 res.setStatusElement( 4122 parseEnumeration(xpp, CarePlan.CarePlanStatus.NULL, new CarePlan.CarePlanStatusEnumFactory())); 4123 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 4124 res.setIntentElement( 4125 parseEnumeration(xpp, CarePlan.CarePlanIntent.NULL, new CarePlan.CarePlanIntentEnumFactory())); 4126 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 4127 res.getCategory().add(parseCodeableConcept(xpp)); 4128 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 4129 res.setTitleElement(parseString(xpp)); 4130 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 4131 res.setDescriptionElement(parseString(xpp)); 4132 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 4133 res.setSubject(parseReference(xpp)); 4134 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 4135 res.setEncounter(parseReference(xpp)); 4136 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 4137 res.setPeriod(parsePeriod(xpp)); 4138 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 4139 res.setCreatedElement(parseDateTime(xpp)); 4140 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 4141 res.setAuthor(parseReference(xpp)); 4142 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributor")) { 4143 res.getContributor().add(parseReference(xpp)); 4144 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { 4145 res.getCareTeam().add(parseReference(xpp)); 4146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { 4147 res.getAddresses().add(parseReference(xpp)); 4148 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 4149 res.getSupportingInfo().add(parseReference(xpp)); 4150 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { 4151 res.getGoal().add(parseReference(xpp)); 4152 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { 4153 res.getActivity().add(parseCarePlanCarePlanActivityComponent(xpp, res)); 4154 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 4155 res.getNote().add(parseAnnotation(xpp)); 4156 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4157 return false; 4158 return true; 4159 } 4160 4161 protected CarePlan.CarePlanActivityComponent parseCarePlanCarePlanActivityComponent(XmlPullParser xpp, CarePlan owner) 4162 throws XmlPullParserException, IOException, FHIRFormatError { 4163 CarePlan.CarePlanActivityComponent res = new CarePlan.CarePlanActivityComponent(); 4164 parseBackboneAttributes(xpp, res); 4165 next(xpp); 4166 int eventType = nextNoWhitespace(xpp); 4167 while (eventType != XmlPullParser.END_TAG) { 4168 if (!parseCarePlanCarePlanActivityComponentContent(eventType, xpp, owner, res)) 4169 unknownContent(xpp); 4170 eventType = nextNoWhitespace(xpp); 4171 } 4172 next(xpp); 4173 parseElementClose(res); 4174 return res; 4175 } 4176 4177 protected boolean parseCarePlanCarePlanActivityComponentContent(int eventType, XmlPullParser xpp, CarePlan owner, 4178 CarePlan.CarePlanActivityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4179 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCodeableConcept")) { 4180 res.getOutcomeCodeableConcept().add(parseCodeableConcept(xpp)); 4181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { 4182 res.getOutcomeReference().add(parseReference(xpp)); 4183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("progress")) { 4184 res.getProgress().add(parseAnnotation(xpp)); 4185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 4186 res.setReference(parseReference(xpp)); 4187 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 4188 res.setDetail(parseCarePlanCarePlanActivityDetailComponent(xpp, owner)); 4189 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4190 return false; 4191 return true; 4192 } 4193 4194 protected CarePlan.CarePlanActivityDetailComponent parseCarePlanCarePlanActivityDetailComponent(XmlPullParser xpp, 4195 CarePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 4196 CarePlan.CarePlanActivityDetailComponent res = new CarePlan.CarePlanActivityDetailComponent(); 4197 parseBackboneAttributes(xpp, res); 4198 next(xpp); 4199 int eventType = nextNoWhitespace(xpp); 4200 while (eventType != XmlPullParser.END_TAG) { 4201 if (!parseCarePlanCarePlanActivityDetailComponentContent(eventType, xpp, owner, res)) 4202 unknownContent(xpp); 4203 eventType = nextNoWhitespace(xpp); 4204 } 4205 next(xpp); 4206 parseElementClose(res); 4207 return res; 4208 } 4209 4210 protected boolean parseCarePlanCarePlanActivityDetailComponentContent(int eventType, XmlPullParser xpp, 4211 CarePlan owner, CarePlan.CarePlanActivityDetailComponent res) 4212 throws XmlPullParserException, IOException, FHIRFormatError { 4213 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 4214 res.setKindElement( 4215 parseEnumeration(xpp, CarePlan.CarePlanActivityKind.NULL, new CarePlan.CarePlanActivityKindEnumFactory())); 4216 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 4217 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 4218 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 4219 res.getInstantiatesUri().add(parseUri(xpp)); 4220 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 4221 res.setCode(parseCodeableConcept(xpp)); 4222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 4223 res.getReasonCode().add(parseCodeableConcept(xpp)); 4224 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 4225 res.getReasonReference().add(parseReference(xpp)); 4226 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { 4227 res.getGoal().add(parseReference(xpp)); 4228 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4229 res.setStatusElement(parseEnumeration(xpp, CarePlan.CarePlanActivityStatus.NULL, 4230 new CarePlan.CarePlanActivityStatusEnumFactory())); 4231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 4232 res.setStatusReason(parseCodeableConcept(xpp)); 4233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 4234 res.setDoNotPerformElement(parseBoolean(xpp)); 4235 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "scheduled")) { 4236 res.setScheduled(parseType("scheduled", xpp)); 4237 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 4238 res.setLocation(parseReference(xpp)); 4239 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 4240 res.getPerformer().add(parseReference(xpp)); 4241 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { 4242 res.setProduct(parseType("product", xpp)); 4243 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dailyAmount")) { 4244 res.setDailyAmount(parseQuantity(xpp)); 4245 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 4246 res.setQuantity(parseQuantity(xpp)); 4247 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 4248 res.setDescriptionElement(parseString(xpp)); 4249 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4250 return false; 4251 return true; 4252 } 4253 4254 protected CareTeam parseCareTeam(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 4255 CareTeam res = new CareTeam(); 4256 parseDomainResourceAttributes(xpp, res); 4257 next(xpp); 4258 int eventType = nextNoWhitespace(xpp); 4259 while (eventType != XmlPullParser.END_TAG) { 4260 if (!parseCareTeamContent(eventType, xpp, res)) 4261 unknownContent(xpp); 4262 eventType = nextNoWhitespace(xpp); 4263 } 4264 next(xpp); 4265 parseElementClose(res); 4266 return res; 4267 } 4268 4269 protected boolean parseCareTeamContent(int eventType, XmlPullParser xpp, CareTeam res) 4270 throws XmlPullParserException, IOException, FHIRFormatError { 4271 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4272 res.getIdentifier().add(parseIdentifier(xpp)); 4273 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4274 res.setStatusElement( 4275 parseEnumeration(xpp, CareTeam.CareTeamStatus.NULL, new CareTeam.CareTeamStatusEnumFactory())); 4276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 4277 res.getCategory().add(parseCodeableConcept(xpp)); 4278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 4279 res.setNameElement(parseString(xpp)); 4280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 4281 res.setSubject(parseReference(xpp)); 4282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 4283 res.setEncounter(parseReference(xpp)); 4284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 4285 res.setPeriod(parsePeriod(xpp)); 4286 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 4287 res.getParticipant().add(parseCareTeamCareTeamParticipantComponent(xpp, res)); 4288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 4289 res.getReasonCode().add(parseCodeableConcept(xpp)); 4290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 4291 res.getReasonReference().add(parseReference(xpp)); 4292 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 4293 res.getManagingOrganization().add(parseReference(xpp)); 4294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 4295 res.getTelecom().add(parseContactPoint(xpp)); 4296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 4297 res.getNote().add(parseAnnotation(xpp)); 4298 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4299 return false; 4300 return true; 4301 } 4302 4303 protected CareTeam.CareTeamParticipantComponent parseCareTeamCareTeamParticipantComponent(XmlPullParser xpp, 4304 CareTeam owner) throws XmlPullParserException, IOException, FHIRFormatError { 4305 CareTeam.CareTeamParticipantComponent res = new CareTeam.CareTeamParticipantComponent(); 4306 parseBackboneAttributes(xpp, res); 4307 next(xpp); 4308 int eventType = nextNoWhitespace(xpp); 4309 while (eventType != XmlPullParser.END_TAG) { 4310 if (!parseCareTeamCareTeamParticipantComponentContent(eventType, xpp, owner, res)) 4311 unknownContent(xpp); 4312 eventType = nextNoWhitespace(xpp); 4313 } 4314 next(xpp); 4315 parseElementClose(res); 4316 return res; 4317 } 4318 4319 protected boolean parseCareTeamCareTeamParticipantComponentContent(int eventType, XmlPullParser xpp, CareTeam owner, 4320 CareTeam.CareTeamParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4321 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 4322 res.getRole().add(parseCodeableConcept(xpp)); 4323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { 4324 res.setMember(parseReference(xpp)); 4325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { 4326 res.setOnBehalfOf(parseReference(xpp)); 4327 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 4328 res.setPeriod(parsePeriod(xpp)); 4329 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4330 return false; 4331 return true; 4332 } 4333 4334 protected CatalogEntry parseCatalogEntry(XmlPullParser xpp) 4335 throws XmlPullParserException, IOException, FHIRFormatError { 4336 CatalogEntry res = new CatalogEntry(); 4337 parseDomainResourceAttributes(xpp, res); 4338 next(xpp); 4339 int eventType = nextNoWhitespace(xpp); 4340 while (eventType != XmlPullParser.END_TAG) { 4341 if (!parseCatalogEntryContent(eventType, xpp, res)) 4342 unknownContent(xpp); 4343 eventType = nextNoWhitespace(xpp); 4344 } 4345 next(xpp); 4346 parseElementClose(res); 4347 return res; 4348 } 4349 4350 protected boolean parseCatalogEntryContent(int eventType, XmlPullParser xpp, CatalogEntry res) 4351 throws XmlPullParserException, IOException, FHIRFormatError { 4352 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4353 res.getIdentifier().add(parseIdentifier(xpp)); 4354 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4355 res.setType(parseCodeableConcept(xpp)); 4356 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderable")) { 4357 res.setOrderableElement(parseBoolean(xpp)); 4358 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencedItem")) { 4359 res.setReferencedItem(parseReference(xpp)); 4360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalIdentifier")) { 4361 res.getAdditionalIdentifier().add(parseIdentifier(xpp)); 4362 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 4363 res.getClassification().add(parseCodeableConcept(xpp)); 4364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4365 res.setStatusElement( 4366 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 4367 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { 4368 res.setValidityPeriod(parsePeriod(xpp)); 4369 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validTo")) { 4370 res.setValidToElement(parseDateTime(xpp)); 4371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastUpdated")) { 4372 res.setLastUpdatedElement(parseDateTime(xpp)); 4373 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalCharacteristic")) { 4374 res.getAdditionalCharacteristic().add(parseCodeableConcept(xpp)); 4375 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalClassification")) { 4376 res.getAdditionalClassification().add(parseCodeableConcept(xpp)); 4377 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedEntry")) { 4378 res.getRelatedEntry().add(parseCatalogEntryCatalogEntryRelatedEntryComponent(xpp, res)); 4379 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4380 return false; 4381 return true; 4382 } 4383 4384 protected CatalogEntry.CatalogEntryRelatedEntryComponent parseCatalogEntryCatalogEntryRelatedEntryComponent( 4385 XmlPullParser xpp, CatalogEntry owner) throws XmlPullParserException, IOException, FHIRFormatError { 4386 CatalogEntry.CatalogEntryRelatedEntryComponent res = new CatalogEntry.CatalogEntryRelatedEntryComponent(); 4387 parseBackboneAttributes(xpp, res); 4388 next(xpp); 4389 int eventType = nextNoWhitespace(xpp); 4390 while (eventType != XmlPullParser.END_TAG) { 4391 if (!parseCatalogEntryCatalogEntryRelatedEntryComponentContent(eventType, xpp, owner, res)) 4392 unknownContent(xpp); 4393 eventType = nextNoWhitespace(xpp); 4394 } 4395 next(xpp); 4396 parseElementClose(res); 4397 return res; 4398 } 4399 4400 protected boolean parseCatalogEntryCatalogEntryRelatedEntryComponentContent(int eventType, XmlPullParser xpp, 4401 CatalogEntry owner, CatalogEntry.CatalogEntryRelatedEntryComponent res) 4402 throws XmlPullParserException, IOException, FHIRFormatError { 4403 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationtype")) { 4404 res.setRelationtypeElement(parseEnumeration(xpp, CatalogEntry.CatalogEntryRelationType.NULL, 4405 new CatalogEntry.CatalogEntryRelationTypeEnumFactory())); 4406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 4407 res.setItem(parseReference(xpp)); 4408 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4409 return false; 4410 return true; 4411 } 4412 4413 protected ChargeItem parseChargeItem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 4414 ChargeItem res = new ChargeItem(); 4415 parseDomainResourceAttributes(xpp, res); 4416 next(xpp); 4417 int eventType = nextNoWhitespace(xpp); 4418 while (eventType != XmlPullParser.END_TAG) { 4419 if (!parseChargeItemContent(eventType, xpp, res)) 4420 unknownContent(xpp); 4421 eventType = nextNoWhitespace(xpp); 4422 } 4423 next(xpp); 4424 parseElementClose(res); 4425 return res; 4426 } 4427 4428 protected boolean parseChargeItemContent(int eventType, XmlPullParser xpp, ChargeItem res) 4429 throws XmlPullParserException, IOException, FHIRFormatError { 4430 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4431 res.getIdentifier().add(parseIdentifier(xpp)); 4432 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definitionUri")) { 4433 res.getDefinitionUri().add(parseUri(xpp)); 4434 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definitionCanonical")) { 4435 res.getDefinitionCanonical().add(parseCanonical(xpp)); 4436 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4437 res.setStatusElement( 4438 parseEnumeration(xpp, ChargeItem.ChargeItemStatus.NULL, new ChargeItem.ChargeItemStatusEnumFactory())); 4439 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 4440 res.getPartOf().add(parseReference(xpp)); 4441 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 4442 res.setCode(parseCodeableConcept(xpp)); 4443 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 4444 res.setSubject(parseReference(xpp)); 4445 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 4446 res.setContext(parseReference(xpp)); 4447 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 4448 res.setOccurrence(parseType("occurrence", xpp)); 4449 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 4450 res.getPerformer().add(parseChargeItemChargeItemPerformerComponent(xpp, res)); 4451 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performingOrganization")) { 4452 res.setPerformingOrganization(parseReference(xpp)); 4453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestingOrganization")) { 4454 res.setRequestingOrganization(parseReference(xpp)); 4455 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("costCenter")) { 4456 res.setCostCenter(parseReference(xpp)); 4457 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 4458 res.setQuantity(parseQuantity(xpp)); 4459 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodysite")) { 4460 res.getBodysite().add(parseCodeableConcept(xpp)); 4461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factorOverride")) { 4462 res.setFactorOverrideElement(parseDecimal(xpp)); 4463 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priceOverride")) { 4464 res.setPriceOverride(parseMoney(xpp)); 4465 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overrideReason")) { 4466 res.setOverrideReasonElement(parseString(xpp)); 4467 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { 4468 res.setEnterer(parseReference(xpp)); 4469 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteredDate")) { 4470 res.setEnteredDateElement(parseDateTime(xpp)); 4471 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 4472 res.getReason().add(parseCodeableConcept(xpp)); 4473 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("service")) { 4474 res.getService().add(parseReference(xpp)); 4475 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "product")) { 4476 res.setProduct(parseType("product", xpp)); 4477 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { 4478 res.getAccount().add(parseReference(xpp)); 4479 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 4480 res.getNote().add(parseAnnotation(xpp)); 4481 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 4482 res.getSupportingInformation().add(parseReference(xpp)); 4483 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4484 return false; 4485 return true; 4486 } 4487 4488 protected ChargeItem.ChargeItemPerformerComponent parseChargeItemChargeItemPerformerComponent(XmlPullParser xpp, 4489 ChargeItem owner) throws XmlPullParserException, IOException, FHIRFormatError { 4490 ChargeItem.ChargeItemPerformerComponent res = new ChargeItem.ChargeItemPerformerComponent(); 4491 parseBackboneAttributes(xpp, res); 4492 next(xpp); 4493 int eventType = nextNoWhitespace(xpp); 4494 while (eventType != XmlPullParser.END_TAG) { 4495 if (!parseChargeItemChargeItemPerformerComponentContent(eventType, xpp, owner, res)) 4496 unknownContent(xpp); 4497 eventType = nextNoWhitespace(xpp); 4498 } 4499 next(xpp); 4500 parseElementClose(res); 4501 return res; 4502 } 4503 4504 protected boolean parseChargeItemChargeItemPerformerComponentContent(int eventType, XmlPullParser xpp, 4505 ChargeItem owner, ChargeItem.ChargeItemPerformerComponent res) 4506 throws XmlPullParserException, IOException, FHIRFormatError { 4507 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 4508 res.setFunction(parseCodeableConcept(xpp)); 4509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 4510 res.setActor(parseReference(xpp)); 4511 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4512 return false; 4513 return true; 4514 } 4515 4516 protected ChargeItemDefinition parseChargeItemDefinition(XmlPullParser xpp) 4517 throws XmlPullParserException, IOException, FHIRFormatError { 4518 ChargeItemDefinition res = new ChargeItemDefinition(); 4519 parseDomainResourceAttributes(xpp, res); 4520 next(xpp); 4521 int eventType = nextNoWhitespace(xpp); 4522 while (eventType != XmlPullParser.END_TAG) { 4523 if (!parseChargeItemDefinitionContent(eventType, xpp, res)) 4524 unknownContent(xpp); 4525 eventType = nextNoWhitespace(xpp); 4526 } 4527 next(xpp); 4528 parseElementClose(res); 4529 return res; 4530 } 4531 4532 protected boolean parseChargeItemDefinitionContent(int eventType, XmlPullParser xpp, ChargeItemDefinition res) 4533 throws XmlPullParserException, IOException, FHIRFormatError { 4534 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 4535 res.setUrlElement(parseUri(xpp)); 4536 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4537 res.getIdentifier().add(parseIdentifier(xpp)); 4538 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 4539 res.setVersionElement(parseString(xpp)); 4540 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 4541 res.setTitleElement(parseString(xpp)); 4542 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFromUri")) { 4543 res.getDerivedFromUri().add(parseUri(xpp)); 4544 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 4545 res.getPartOf().add(parseCanonical(xpp)); 4546 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 4547 res.getReplaces().add(parseCanonical(xpp)); 4548 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4549 res.setStatusElement( 4550 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 4551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 4552 res.setExperimentalElement(parseBoolean(xpp)); 4553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 4554 res.setDateElement(parseDateTime(xpp)); 4555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 4556 res.setPublisherElement(parseString(xpp)); 4557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 4558 res.getContact().add(parseContactDetail(xpp)); 4559 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 4560 res.setDescriptionElement(parseMarkdown(xpp)); 4561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 4562 res.getUseContext().add(parseUsageContext(xpp)); 4563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 4564 res.getJurisdiction().add(parseCodeableConcept(xpp)); 4565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 4566 res.setCopyrightElement(parseMarkdown(xpp)); 4567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 4568 res.setApprovalDateElement(parseDate(xpp)); 4569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 4570 res.setLastReviewDateElement(parseDate(xpp)); 4571 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 4572 res.setEffectivePeriod(parsePeriod(xpp)); 4573 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 4574 res.setCode(parseCodeableConcept(xpp)); 4575 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 4576 res.getInstance().add(parseReference(xpp)); 4577 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applicability")) { 4578 res.getApplicability().add(parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(xpp, res)); 4579 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("propertyGroup")) { 4580 res.getPropertyGroup().add(parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(xpp, res)); 4581 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4582 return false; 4583 return true; 4584 } 4585 4586 protected ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent( 4587 XmlPullParser xpp, ChargeItemDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 4588 ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent res = new ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent(); 4589 parseBackboneAttributes(xpp, res); 4590 next(xpp); 4591 int eventType = nextNoWhitespace(xpp); 4592 while (eventType != XmlPullParser.END_TAG) { 4593 if (!parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponentContent(eventType, xpp, owner, res)) 4594 unknownContent(xpp); 4595 eventType = nextNoWhitespace(xpp); 4596 } 4597 next(xpp); 4598 parseElementClose(res); 4599 return res; 4600 } 4601 4602 protected boolean parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponentContent(int eventType, 4603 XmlPullParser xpp, ChargeItemDefinition owner, 4604 ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent res) 4605 throws XmlPullParserException, IOException, FHIRFormatError { 4606 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 4607 res.setDescriptionElement(parseString(xpp)); 4608 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 4609 res.setLanguageElement(parseString(xpp)); 4610 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 4611 res.setExpressionElement(parseString(xpp)); 4612 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4613 return false; 4614 return true; 4615 } 4616 4617 protected ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent( 4618 XmlPullParser xpp, ChargeItemDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 4619 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res = new ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent(); 4620 parseBackboneAttributes(xpp, res); 4621 next(xpp); 4622 int eventType = nextNoWhitespace(xpp); 4623 while (eventType != XmlPullParser.END_TAG) { 4624 if (!parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentContent(eventType, xpp, owner, res)) 4625 unknownContent(xpp); 4626 eventType = nextNoWhitespace(xpp); 4627 } 4628 next(xpp); 4629 parseElementClose(res); 4630 return res; 4631 } 4632 4633 protected boolean parseChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentContent(int eventType, 4634 XmlPullParser xpp, ChargeItemDefinition owner, 4635 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent res) 4636 throws XmlPullParserException, IOException, FHIRFormatError { 4637 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applicability")) { 4638 res.getApplicability().add(parseChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(xpp, owner)); 4639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priceComponent")) { 4640 res.getPriceComponent() 4641 .add(parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(xpp, owner)); 4642 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4643 return false; 4644 return true; 4645 } 4646 4647 protected ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent( 4648 XmlPullParser xpp, ChargeItemDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 4649 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent res = new ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent(); 4650 parseBackboneAttributes(xpp, res); 4651 next(xpp); 4652 int eventType = nextNoWhitespace(xpp); 4653 while (eventType != XmlPullParser.END_TAG) { 4654 if (!parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentContent(eventType, xpp, 4655 owner, res)) 4656 unknownContent(xpp); 4657 eventType = nextNoWhitespace(xpp); 4658 } 4659 next(xpp); 4660 parseElementClose(res); 4661 return res; 4662 } 4663 4664 protected boolean parseChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentContent( 4665 int eventType, XmlPullParser xpp, ChargeItemDefinition owner, 4666 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent res) 4667 throws XmlPullParserException, IOException, FHIRFormatError { 4668 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4669 res.setTypeElement(parseEnumeration(xpp, ChargeItemDefinition.ChargeItemDefinitionPriceComponentType.NULL, 4670 new ChargeItemDefinition.ChargeItemDefinitionPriceComponentTypeEnumFactory())); 4671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 4672 res.setCode(parseCodeableConcept(xpp)); 4673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 4674 res.setFactorElement(parseDecimal(xpp)); 4675 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 4676 res.setAmount(parseMoney(xpp)); 4677 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4678 return false; 4679 return true; 4680 } 4681 4682 protected Claim parseClaim(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 4683 Claim res = new Claim(); 4684 parseDomainResourceAttributes(xpp, res); 4685 next(xpp); 4686 int eventType = nextNoWhitespace(xpp); 4687 while (eventType != XmlPullParser.END_TAG) { 4688 if (!parseClaimContent(eventType, xpp, res)) 4689 unknownContent(xpp); 4690 eventType = nextNoWhitespace(xpp); 4691 } 4692 next(xpp); 4693 parseElementClose(res); 4694 return res; 4695 } 4696 4697 protected boolean parseClaimContent(int eventType, XmlPullParser xpp, Claim res) 4698 throws XmlPullParserException, IOException, FHIRFormatError { 4699 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4700 res.getIdentifier().add(parseIdentifier(xpp)); 4701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 4702 res.setStatusElement(parseEnumeration(xpp, Claim.ClaimStatus.NULL, new Claim.ClaimStatusEnumFactory())); 4703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4704 res.setType(parseCodeableConcept(xpp)); 4705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 4706 res.setSubType(parseCodeableConcept(xpp)); 4707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 4708 res.setUseElement(parseEnumeration(xpp, Claim.Use.NULL, new Claim.UseEnumFactory())); 4709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 4710 res.setPatient(parseReference(xpp)); 4711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { 4712 res.setBillablePeriod(parsePeriod(xpp)); 4713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 4714 res.setCreatedElement(parseDateTime(xpp)); 4715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { 4716 res.setEnterer(parseReference(xpp)); 4717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 4718 res.setInsurer(parseReference(xpp)); 4719 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 4720 res.setProvider(parseReference(xpp)); 4721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 4722 res.setPriority(parseCodeableConcept(xpp)); 4723 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserve")) { 4724 res.setFundsReserve(parseCodeableConcept(xpp)); 4725 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { 4726 res.getRelated().add(parseClaimRelatedClaimComponent(xpp, res)); 4727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { 4728 res.setPrescription(parseReference(xpp)); 4729 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { 4730 res.setOriginalPrescription(parseReference(xpp)); 4731 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { 4732 res.setPayee(parseClaimPayeeComponent(xpp, res)); 4733 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { 4734 res.setReferral(parseReference(xpp)); 4735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { 4736 res.setFacility(parseReference(xpp)); 4737 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { 4738 res.getCareTeam().add(parseClaimCareTeamComponent(xpp, res)); 4739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 4740 res.getSupportingInfo().add(parseClaimSupportingInformationComponent(xpp, res)); 4741 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { 4742 res.getDiagnosis().add(parseClaimDiagnosisComponent(xpp, res)); 4743 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { 4744 res.getProcedure().add(parseClaimProcedureComponent(xpp, res)); 4745 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 4746 res.getInsurance().add(parseClaimInsuranceComponent(xpp, res)); 4747 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { 4748 res.setAccident(parseClaimAccidentComponent(xpp, res)); 4749 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 4750 res.getItem().add(parseClaimItemComponent(xpp, res)); 4751 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { 4752 res.setTotal(parseMoney(xpp)); 4753 } else if (!parseDomainResourceContent(eventType, xpp, res)) 4754 return false; 4755 return true; 4756 } 4757 4758 protected Claim.RelatedClaimComponent parseClaimRelatedClaimComponent(XmlPullParser xpp, Claim owner) 4759 throws XmlPullParserException, IOException, FHIRFormatError { 4760 Claim.RelatedClaimComponent res = new Claim.RelatedClaimComponent(); 4761 parseBackboneAttributes(xpp, res); 4762 next(xpp); 4763 int eventType = nextNoWhitespace(xpp); 4764 while (eventType != XmlPullParser.END_TAG) { 4765 if (!parseClaimRelatedClaimComponentContent(eventType, xpp, owner, res)) 4766 unknownContent(xpp); 4767 eventType = nextNoWhitespace(xpp); 4768 } 4769 next(xpp); 4770 parseElementClose(res); 4771 return res; 4772 } 4773 4774 protected boolean parseClaimRelatedClaimComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4775 Claim.RelatedClaimComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4776 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { 4777 res.setClaim(parseReference(xpp)); 4778 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 4779 res.setRelationship(parseCodeableConcept(xpp)); 4780 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 4781 res.setReference(parseIdentifier(xpp)); 4782 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4783 return false; 4784 return true; 4785 } 4786 4787 protected Claim.PayeeComponent parseClaimPayeeComponent(XmlPullParser xpp, Claim owner) 4788 throws XmlPullParserException, IOException, FHIRFormatError { 4789 Claim.PayeeComponent res = new Claim.PayeeComponent(); 4790 parseBackboneAttributes(xpp, res); 4791 next(xpp); 4792 int eventType = nextNoWhitespace(xpp); 4793 while (eventType != XmlPullParser.END_TAG) { 4794 if (!parseClaimPayeeComponentContent(eventType, xpp, owner, res)) 4795 unknownContent(xpp); 4796 eventType = nextNoWhitespace(xpp); 4797 } 4798 next(xpp); 4799 parseElementClose(res); 4800 return res; 4801 } 4802 4803 protected boolean parseClaimPayeeComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4804 Claim.PayeeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4805 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4806 res.setType(parseCodeableConcept(xpp)); 4807 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 4808 res.setParty(parseReference(xpp)); 4809 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4810 return false; 4811 return true; 4812 } 4813 4814 protected Claim.CareTeamComponent parseClaimCareTeamComponent(XmlPullParser xpp, Claim owner) 4815 throws XmlPullParserException, IOException, FHIRFormatError { 4816 Claim.CareTeamComponent res = new Claim.CareTeamComponent(); 4817 parseBackboneAttributes(xpp, res); 4818 next(xpp); 4819 int eventType = nextNoWhitespace(xpp); 4820 while (eventType != XmlPullParser.END_TAG) { 4821 if (!parseClaimCareTeamComponentContent(eventType, xpp, owner, res)) 4822 unknownContent(xpp); 4823 eventType = nextNoWhitespace(xpp); 4824 } 4825 next(xpp); 4826 parseElementClose(res); 4827 return res; 4828 } 4829 4830 protected boolean parseClaimCareTeamComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4831 Claim.CareTeamComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4832 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 4833 res.setSequenceElement(parsePositiveInt(xpp)); 4834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 4835 res.setProvider(parseReference(xpp)); 4836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 4837 res.setResponsibleElement(parseBoolean(xpp)); 4838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 4839 res.setRole(parseCodeableConcept(xpp)); 4840 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { 4841 res.setQualification(parseCodeableConcept(xpp)); 4842 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4843 return false; 4844 return true; 4845 } 4846 4847 protected Claim.SupportingInformationComponent parseClaimSupportingInformationComponent(XmlPullParser xpp, 4848 Claim owner) throws XmlPullParserException, IOException, FHIRFormatError { 4849 Claim.SupportingInformationComponent res = new Claim.SupportingInformationComponent(); 4850 parseBackboneAttributes(xpp, res); 4851 next(xpp); 4852 int eventType = nextNoWhitespace(xpp); 4853 while (eventType != XmlPullParser.END_TAG) { 4854 if (!parseClaimSupportingInformationComponentContent(eventType, xpp, owner, res)) 4855 unknownContent(xpp); 4856 eventType = nextNoWhitespace(xpp); 4857 } 4858 next(xpp); 4859 parseElementClose(res); 4860 return res; 4861 } 4862 4863 protected boolean parseClaimSupportingInformationComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4864 Claim.SupportingInformationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4865 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 4866 res.setSequenceElement(parsePositiveInt(xpp)); 4867 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 4868 res.setCategory(parseCodeableConcept(xpp)); 4869 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 4870 res.setCode(parseCodeableConcept(xpp)); 4871 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 4872 res.setTiming(parseType("timing", xpp)); 4873 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 4874 res.setValue(parseType("value", xpp)); 4875 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 4876 res.setReason(parseCodeableConcept(xpp)); 4877 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4878 return false; 4879 return true; 4880 } 4881 4882 protected Claim.DiagnosisComponent parseClaimDiagnosisComponent(XmlPullParser xpp, Claim owner) 4883 throws XmlPullParserException, IOException, FHIRFormatError { 4884 Claim.DiagnosisComponent res = new Claim.DiagnosisComponent(); 4885 parseBackboneAttributes(xpp, res); 4886 next(xpp); 4887 int eventType = nextNoWhitespace(xpp); 4888 while (eventType != XmlPullParser.END_TAG) { 4889 if (!parseClaimDiagnosisComponentContent(eventType, xpp, owner, res)) 4890 unknownContent(xpp); 4891 eventType = nextNoWhitespace(xpp); 4892 } 4893 next(xpp); 4894 parseElementClose(res); 4895 return res; 4896 } 4897 4898 protected boolean parseClaimDiagnosisComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4899 Claim.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4900 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 4901 res.setSequenceElement(parsePositiveInt(xpp)); 4902 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { 4903 res.setDiagnosis(parseType("diagnosis", xpp)); 4904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4905 res.getType().add(parseCodeableConcept(xpp)); 4906 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onAdmission")) { 4907 res.setOnAdmission(parseCodeableConcept(xpp)); 4908 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { 4909 res.setPackageCode(parseCodeableConcept(xpp)); 4910 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4911 return false; 4912 return true; 4913 } 4914 4915 protected Claim.ProcedureComponent parseClaimProcedureComponent(XmlPullParser xpp, Claim owner) 4916 throws XmlPullParserException, IOException, FHIRFormatError { 4917 Claim.ProcedureComponent res = new Claim.ProcedureComponent(); 4918 parseBackboneAttributes(xpp, res); 4919 next(xpp); 4920 int eventType = nextNoWhitespace(xpp); 4921 while (eventType != XmlPullParser.END_TAG) { 4922 if (!parseClaimProcedureComponentContent(eventType, xpp, owner, res)) 4923 unknownContent(xpp); 4924 eventType = nextNoWhitespace(xpp); 4925 } 4926 next(xpp); 4927 parseElementClose(res); 4928 return res; 4929 } 4930 4931 protected boolean parseClaimProcedureComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4932 Claim.ProcedureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4933 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 4934 res.setSequenceElement(parsePositiveInt(xpp)); 4935 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 4936 res.getType().add(parseCodeableConcept(xpp)); 4937 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 4938 res.setDateElement(parseDateTime(xpp)); 4939 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { 4940 res.setProcedure(parseType("procedure", xpp)); 4941 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 4942 res.getUdi().add(parseReference(xpp)); 4943 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4944 return false; 4945 return true; 4946 } 4947 4948 protected Claim.InsuranceComponent parseClaimInsuranceComponent(XmlPullParser xpp, Claim owner) 4949 throws XmlPullParserException, IOException, FHIRFormatError { 4950 Claim.InsuranceComponent res = new Claim.InsuranceComponent(); 4951 parseBackboneAttributes(xpp, res); 4952 next(xpp); 4953 int eventType = nextNoWhitespace(xpp); 4954 while (eventType != XmlPullParser.END_TAG) { 4955 if (!parseClaimInsuranceComponentContent(eventType, xpp, owner, res)) 4956 unknownContent(xpp); 4957 eventType = nextNoWhitespace(xpp); 4958 } 4959 next(xpp); 4960 parseElementClose(res); 4961 return res; 4962 } 4963 4964 protected boolean parseClaimInsuranceComponentContent(int eventType, XmlPullParser xpp, Claim owner, 4965 Claim.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 4966 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 4967 res.setSequenceElement(parsePositiveInt(xpp)); 4968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { 4969 res.setFocalElement(parseBoolean(xpp)); 4970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 4971 res.setIdentifier(parseIdentifier(xpp)); 4972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 4973 res.setCoverage(parseReference(xpp)); 4974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { 4975 res.setBusinessArrangementElement(parseString(xpp)); 4976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { 4977 res.getPreAuthRef().add(parseString(xpp)); 4978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { 4979 res.setClaimResponse(parseReference(xpp)); 4980 } else if (!parseBackboneElementContent(eventType, xpp, res)) 4981 return false; 4982 return true; 4983 } 4984 4985 protected Claim.AccidentComponent parseClaimAccidentComponent(XmlPullParser xpp, Claim owner) 4986 throws XmlPullParserException, IOException, FHIRFormatError { 4987 Claim.AccidentComponent res = new Claim.AccidentComponent(); 4988 parseBackboneAttributes(xpp, res); 4989 next(xpp); 4990 int eventType = nextNoWhitespace(xpp); 4991 while (eventType != XmlPullParser.END_TAG) { 4992 if (!parseClaimAccidentComponentContent(eventType, xpp, owner, res)) 4993 unknownContent(xpp); 4994 eventType = nextNoWhitespace(xpp); 4995 } 4996 next(xpp); 4997 parseElementClose(res); 4998 return res; 4999 } 5000 5001 protected boolean parseClaimAccidentComponentContent(int eventType, XmlPullParser xpp, Claim owner, 5002 Claim.AccidentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5003 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 5004 res.setDateElement(parseDate(xpp)); 5005 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 5006 res.setType(parseCodeableConcept(xpp)); 5007 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 5008 res.setLocation(parseType("location", xpp)); 5009 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5010 return false; 5011 return true; 5012 } 5013 5014 protected Claim.ItemComponent parseClaimItemComponent(XmlPullParser xpp, Claim owner) 5015 throws XmlPullParserException, IOException, FHIRFormatError { 5016 Claim.ItemComponent res = new Claim.ItemComponent(); 5017 parseBackboneAttributes(xpp, res); 5018 next(xpp); 5019 int eventType = nextNoWhitespace(xpp); 5020 while (eventType != XmlPullParser.END_TAG) { 5021 if (!parseClaimItemComponentContent(eventType, xpp, owner, res)) 5022 unknownContent(xpp); 5023 eventType = nextNoWhitespace(xpp); 5024 } 5025 next(xpp); 5026 parseElementClose(res); 5027 return res; 5028 } 5029 5030 protected boolean parseClaimItemComponentContent(int eventType, XmlPullParser xpp, Claim owner, 5031 Claim.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5032 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 5033 res.setSequenceElement(parsePositiveInt(xpp)); 5034 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamSequence")) { 5035 res.getCareTeamSequence().add(parsePositiveInt(xpp)); 5036 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisSequence")) { 5037 res.getDiagnosisSequence().add(parsePositiveInt(xpp)); 5038 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureSequence")) { 5039 res.getProcedureSequence().add(parsePositiveInt(xpp)); 5040 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationSequence")) { 5041 res.getInformationSequence().add(parsePositiveInt(xpp)); 5042 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 5043 res.setRevenue(parseCodeableConcept(xpp)); 5044 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 5045 res.setCategory(parseCodeableConcept(xpp)); 5046 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5047 res.setProductOrService(parseCodeableConcept(xpp)); 5048 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5049 res.getModifier().add(parseCodeableConcept(xpp)); 5050 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 5051 res.getProgramCode().add(parseCodeableConcept(xpp)); 5052 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 5053 res.setServiced(parseType("serviced", xpp)); 5054 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 5055 res.setLocation(parseType("location", xpp)); 5056 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5057 res.setQuantity(parseQuantity(xpp)); 5058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5059 res.setUnitPrice(parseMoney(xpp)); 5060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5061 res.setFactorElement(parseDecimal(xpp)); 5062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5063 res.setNet(parseMoney(xpp)); 5064 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 5065 res.getUdi().add(parseReference(xpp)); 5066 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 5067 res.setBodySite(parseCodeableConcept(xpp)); 5068 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { 5069 res.getSubSite().add(parseCodeableConcept(xpp)); 5070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 5071 res.getEncounter().add(parseReference(xpp)); 5072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 5073 res.getDetail().add(parseClaimDetailComponent(xpp, owner)); 5074 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5075 return false; 5076 return true; 5077 } 5078 5079 protected Claim.DetailComponent parseClaimDetailComponent(XmlPullParser xpp, Claim owner) 5080 throws XmlPullParserException, IOException, FHIRFormatError { 5081 Claim.DetailComponent res = new Claim.DetailComponent(); 5082 parseBackboneAttributes(xpp, res); 5083 next(xpp); 5084 int eventType = nextNoWhitespace(xpp); 5085 while (eventType != XmlPullParser.END_TAG) { 5086 if (!parseClaimDetailComponentContent(eventType, xpp, owner, res)) 5087 unknownContent(xpp); 5088 eventType = nextNoWhitespace(xpp); 5089 } 5090 next(xpp); 5091 parseElementClose(res); 5092 return res; 5093 } 5094 5095 protected boolean parseClaimDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, 5096 Claim.DetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5097 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 5098 res.setSequenceElement(parsePositiveInt(xpp)); 5099 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 5100 res.setRevenue(parseCodeableConcept(xpp)); 5101 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 5102 res.setCategory(parseCodeableConcept(xpp)); 5103 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5104 res.setProductOrService(parseCodeableConcept(xpp)); 5105 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5106 res.getModifier().add(parseCodeableConcept(xpp)); 5107 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 5108 res.getProgramCode().add(parseCodeableConcept(xpp)); 5109 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5110 res.setQuantity(parseQuantity(xpp)); 5111 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5112 res.setUnitPrice(parseMoney(xpp)); 5113 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5114 res.setFactorElement(parseDecimal(xpp)); 5115 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5116 res.setNet(parseMoney(xpp)); 5117 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 5118 res.getUdi().add(parseReference(xpp)); 5119 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { 5120 res.getSubDetail().add(parseClaimSubDetailComponent(xpp, owner)); 5121 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5122 return false; 5123 return true; 5124 } 5125 5126 protected Claim.SubDetailComponent parseClaimSubDetailComponent(XmlPullParser xpp, Claim owner) 5127 throws XmlPullParserException, IOException, FHIRFormatError { 5128 Claim.SubDetailComponent res = new Claim.SubDetailComponent(); 5129 parseBackboneAttributes(xpp, res); 5130 next(xpp); 5131 int eventType = nextNoWhitespace(xpp); 5132 while (eventType != XmlPullParser.END_TAG) { 5133 if (!parseClaimSubDetailComponentContent(eventType, xpp, owner, res)) 5134 unknownContent(xpp); 5135 eventType = nextNoWhitespace(xpp); 5136 } 5137 next(xpp); 5138 parseElementClose(res); 5139 return res; 5140 } 5141 5142 protected boolean parseClaimSubDetailComponentContent(int eventType, XmlPullParser xpp, Claim owner, 5143 Claim.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5144 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 5145 res.setSequenceElement(parsePositiveInt(xpp)); 5146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 5147 res.setRevenue(parseCodeableConcept(xpp)); 5148 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 5149 res.setCategory(parseCodeableConcept(xpp)); 5150 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5151 res.setProductOrService(parseCodeableConcept(xpp)); 5152 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5153 res.getModifier().add(parseCodeableConcept(xpp)); 5154 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 5155 res.getProgramCode().add(parseCodeableConcept(xpp)); 5156 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5157 res.setQuantity(parseQuantity(xpp)); 5158 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5159 res.setUnitPrice(parseMoney(xpp)); 5160 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5161 res.setFactorElement(parseDecimal(xpp)); 5162 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5163 res.setNet(parseMoney(xpp)); 5164 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 5165 res.getUdi().add(parseReference(xpp)); 5166 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5167 return false; 5168 return true; 5169 } 5170 5171 protected ClaimResponse parseClaimResponse(XmlPullParser xpp) 5172 throws XmlPullParserException, IOException, FHIRFormatError { 5173 ClaimResponse res = new ClaimResponse(); 5174 parseDomainResourceAttributes(xpp, res); 5175 next(xpp); 5176 int eventType = nextNoWhitespace(xpp); 5177 while (eventType != XmlPullParser.END_TAG) { 5178 if (!parseClaimResponseContent(eventType, xpp, res)) 5179 unknownContent(xpp); 5180 eventType = nextNoWhitespace(xpp); 5181 } 5182 next(xpp); 5183 parseElementClose(res); 5184 return res; 5185 } 5186 5187 protected boolean parseClaimResponseContent(int eventType, XmlPullParser xpp, ClaimResponse res) 5188 throws XmlPullParserException, IOException, FHIRFormatError { 5189 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 5190 res.getIdentifier().add(parseIdentifier(xpp)); 5191 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 5192 res.setStatusElement(parseEnumeration(xpp, ClaimResponse.ClaimResponseStatus.NULL, 5193 new ClaimResponse.ClaimResponseStatusEnumFactory())); 5194 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 5195 res.setType(parseCodeableConcept(xpp)); 5196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 5197 res.setSubType(parseCodeableConcept(xpp)); 5198 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 5199 res.setUseElement(parseEnumeration(xpp, ClaimResponse.Use.NULL, new ClaimResponse.UseEnumFactory())); 5200 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 5201 res.setPatient(parseReference(xpp)); 5202 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 5203 res.setCreatedElement(parseDateTime(xpp)); 5204 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 5205 res.setInsurer(parseReference(xpp)); 5206 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { 5207 res.setRequestor(parseReference(xpp)); 5208 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 5209 res.setRequest(parseReference(xpp)); 5210 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 5211 res.setOutcomeElement(parseEnumeration(xpp, ClaimResponse.RemittanceOutcome.NULL, 5212 new ClaimResponse.RemittanceOutcomeEnumFactory())); 5213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { 5214 res.setDispositionElement(parseString(xpp)); 5215 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { 5216 res.setPreAuthRefElement(parseString(xpp)); 5217 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthPeriod")) { 5218 res.setPreAuthPeriod(parsePeriod(xpp)); 5219 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payeeType")) { 5220 res.setPayeeType(parseCodeableConcept(xpp)); 5221 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 5222 res.getItem().add(parseClaimResponseItemComponent(xpp, res)); 5223 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { 5224 res.getAddItem().add(parseClaimResponseAddedItemComponent(xpp, res)); 5225 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5226 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, res)); 5227 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { 5228 res.getTotal().add(parseClaimResponseTotalComponent(xpp, res)); 5229 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { 5230 res.setPayment(parseClaimResponsePaymentComponent(xpp, res)); 5231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserve")) { 5232 res.setFundsReserve(parseCodeableConcept(xpp)); 5233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("formCode")) { 5234 res.setFormCode(parseCodeableConcept(xpp)); 5235 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { 5236 res.setForm(parseAttachment(xpp)); 5237 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { 5238 res.getProcessNote().add(parseClaimResponseNoteComponent(xpp, res)); 5239 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationRequest")) { 5240 res.getCommunicationRequest().add(parseReference(xpp)); 5241 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 5242 res.getInsurance().add(parseClaimResponseInsuranceComponent(xpp, res)); 5243 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { 5244 res.getError().add(parseClaimResponseErrorComponent(xpp, res)); 5245 } else if (!parseDomainResourceContent(eventType, xpp, res)) 5246 return false; 5247 return true; 5248 } 5249 5250 protected ClaimResponse.ItemComponent parseClaimResponseItemComponent(XmlPullParser xpp, ClaimResponse owner) 5251 throws XmlPullParserException, IOException, FHIRFormatError { 5252 ClaimResponse.ItemComponent res = new ClaimResponse.ItemComponent(); 5253 parseBackboneAttributes(xpp, res); 5254 next(xpp); 5255 int eventType = nextNoWhitespace(xpp); 5256 while (eventType != XmlPullParser.END_TAG) { 5257 if (!parseClaimResponseItemComponentContent(eventType, xpp, owner, res)) 5258 unknownContent(xpp); 5259 eventType = nextNoWhitespace(xpp); 5260 } 5261 next(xpp); 5262 parseElementClose(res); 5263 return res; 5264 } 5265 5266 protected boolean parseClaimResponseItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5267 ClaimResponse.ItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5268 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemSequence")) { 5269 res.setItemSequenceElement(parsePositiveInt(xpp)); 5270 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5271 res.getNoteNumber().add(parsePositiveInt(xpp)); 5272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5273 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 5275 res.getDetail().add(parseClaimResponseItemDetailComponent(xpp, owner)); 5276 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5277 return false; 5278 return true; 5279 } 5280 5281 protected ClaimResponse.AdjudicationComponent parseClaimResponseAdjudicationComponent(XmlPullParser xpp, 5282 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5283 ClaimResponse.AdjudicationComponent res = new ClaimResponse.AdjudicationComponent(); 5284 parseBackboneAttributes(xpp, res); 5285 next(xpp); 5286 int eventType = nextNoWhitespace(xpp); 5287 while (eventType != XmlPullParser.END_TAG) { 5288 if (!parseClaimResponseAdjudicationComponentContent(eventType, xpp, owner, res)) 5289 unknownContent(xpp); 5290 eventType = nextNoWhitespace(xpp); 5291 } 5292 next(xpp); 5293 parseElementClose(res); 5294 return res; 5295 } 5296 5297 protected boolean parseClaimResponseAdjudicationComponentContent(int eventType, XmlPullParser xpp, 5298 ClaimResponse owner, ClaimResponse.AdjudicationComponent res) 5299 throws XmlPullParserException, IOException, FHIRFormatError { 5300 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 5301 res.setCategory(parseCodeableConcept(xpp)); 5302 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 5303 res.setReason(parseCodeableConcept(xpp)); 5304 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 5305 res.setAmount(parseMoney(xpp)); 5306 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 5307 res.setValueElement(parseDecimal(xpp)); 5308 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5309 return false; 5310 return true; 5311 } 5312 5313 protected ClaimResponse.ItemDetailComponent parseClaimResponseItemDetailComponent(XmlPullParser xpp, 5314 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5315 ClaimResponse.ItemDetailComponent res = new ClaimResponse.ItemDetailComponent(); 5316 parseBackboneAttributes(xpp, res); 5317 next(xpp); 5318 int eventType = nextNoWhitespace(xpp); 5319 while (eventType != XmlPullParser.END_TAG) { 5320 if (!parseClaimResponseItemDetailComponentContent(eventType, xpp, owner, res)) 5321 unknownContent(xpp); 5322 eventType = nextNoWhitespace(xpp); 5323 } 5324 next(xpp); 5325 parseElementClose(res); 5326 return res; 5327 } 5328 5329 protected boolean parseClaimResponseItemDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5330 ClaimResponse.ItemDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5331 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequence")) { 5332 res.setDetailSequenceElement(parsePositiveInt(xpp)); 5333 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5334 res.getNoteNumber().add(parsePositiveInt(xpp)); 5335 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5336 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5337 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { 5338 res.getSubDetail().add(parseClaimResponseSubDetailComponent(xpp, owner)); 5339 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5340 return false; 5341 return true; 5342 } 5343 5344 protected ClaimResponse.SubDetailComponent parseClaimResponseSubDetailComponent(XmlPullParser xpp, 5345 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5346 ClaimResponse.SubDetailComponent res = new ClaimResponse.SubDetailComponent(); 5347 parseBackboneAttributes(xpp, res); 5348 next(xpp); 5349 int eventType = nextNoWhitespace(xpp); 5350 while (eventType != XmlPullParser.END_TAG) { 5351 if (!parseClaimResponseSubDetailComponentContent(eventType, xpp, owner, res)) 5352 unknownContent(xpp); 5353 eventType = nextNoWhitespace(xpp); 5354 } 5355 next(xpp); 5356 parseElementClose(res); 5357 return res; 5358 } 5359 5360 protected boolean parseClaimResponseSubDetailComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5361 ClaimResponse.SubDetailComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5362 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetailSequence")) { 5363 res.setSubDetailSequenceElement(parsePositiveInt(xpp)); 5364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5365 res.getNoteNumber().add(parsePositiveInt(xpp)); 5366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5367 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5368 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5369 return false; 5370 return true; 5371 } 5372 5373 protected ClaimResponse.AddedItemComponent parseClaimResponseAddedItemComponent(XmlPullParser xpp, 5374 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5375 ClaimResponse.AddedItemComponent res = new ClaimResponse.AddedItemComponent(); 5376 parseBackboneAttributes(xpp, res); 5377 next(xpp); 5378 int eventType = nextNoWhitespace(xpp); 5379 while (eventType != XmlPullParser.END_TAG) { 5380 if (!parseClaimResponseAddedItemComponentContent(eventType, xpp, owner, res)) 5381 unknownContent(xpp); 5382 eventType = nextNoWhitespace(xpp); 5383 } 5384 next(xpp); 5385 parseElementClose(res); 5386 return res; 5387 } 5388 5389 protected boolean parseClaimResponseAddedItemComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5390 ClaimResponse.AddedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5391 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemSequence")) { 5392 res.getItemSequence().add(parsePositiveInt(xpp)); 5393 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequence")) { 5394 res.getDetailSequence().add(parsePositiveInt(xpp)); 5395 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subdetailSequence")) { 5396 res.getSubdetailSequence().add(parsePositiveInt(xpp)); 5397 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 5398 res.getProvider().add(parseReference(xpp)); 5399 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5400 res.setProductOrService(parseCodeableConcept(xpp)); 5401 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5402 res.getModifier().add(parseCodeableConcept(xpp)); 5403 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 5404 res.getProgramCode().add(parseCodeableConcept(xpp)); 5405 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 5406 res.setServiced(parseType("serviced", xpp)); 5407 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 5408 res.setLocation(parseType("location", xpp)); 5409 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5410 res.setQuantity(parseQuantity(xpp)); 5411 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5412 res.setUnitPrice(parseMoney(xpp)); 5413 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5414 res.setFactorElement(parseDecimal(xpp)); 5415 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5416 res.setNet(parseMoney(xpp)); 5417 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 5418 res.setBodySite(parseCodeableConcept(xpp)); 5419 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { 5420 res.getSubSite().add(parseCodeableConcept(xpp)); 5421 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5422 res.getNoteNumber().add(parsePositiveInt(xpp)); 5423 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5424 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5425 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 5426 res.getDetail().add(parseClaimResponseAddedItemDetailComponent(xpp, owner)); 5427 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5428 return false; 5429 return true; 5430 } 5431 5432 protected ClaimResponse.AddedItemDetailComponent parseClaimResponseAddedItemDetailComponent(XmlPullParser xpp, 5433 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5434 ClaimResponse.AddedItemDetailComponent res = new ClaimResponse.AddedItemDetailComponent(); 5435 parseBackboneAttributes(xpp, res); 5436 next(xpp); 5437 int eventType = nextNoWhitespace(xpp); 5438 while (eventType != XmlPullParser.END_TAG) { 5439 if (!parseClaimResponseAddedItemDetailComponentContent(eventType, xpp, owner, res)) 5440 unknownContent(xpp); 5441 eventType = nextNoWhitespace(xpp); 5442 } 5443 next(xpp); 5444 parseElementClose(res); 5445 return res; 5446 } 5447 5448 protected boolean parseClaimResponseAddedItemDetailComponentContent(int eventType, XmlPullParser xpp, 5449 ClaimResponse owner, ClaimResponse.AddedItemDetailComponent res) 5450 throws XmlPullParserException, IOException, FHIRFormatError { 5451 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5452 res.setProductOrService(parseCodeableConcept(xpp)); 5453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5454 res.getModifier().add(parseCodeableConcept(xpp)); 5455 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5456 res.setQuantity(parseQuantity(xpp)); 5457 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5458 res.setUnitPrice(parseMoney(xpp)); 5459 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5460 res.setFactorElement(parseDecimal(xpp)); 5461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5462 res.setNet(parseMoney(xpp)); 5463 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5464 res.getNoteNumber().add(parsePositiveInt(xpp)); 5465 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5466 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5467 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { 5468 res.getSubDetail().add(parseClaimResponseAddedItemSubDetailComponent(xpp, owner)); 5469 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5470 return false; 5471 return true; 5472 } 5473 5474 protected ClaimResponse.AddedItemSubDetailComponent parseClaimResponseAddedItemSubDetailComponent(XmlPullParser xpp, 5475 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5476 ClaimResponse.AddedItemSubDetailComponent res = new ClaimResponse.AddedItemSubDetailComponent(); 5477 parseBackboneAttributes(xpp, res); 5478 next(xpp); 5479 int eventType = nextNoWhitespace(xpp); 5480 while (eventType != XmlPullParser.END_TAG) { 5481 if (!parseClaimResponseAddedItemSubDetailComponentContent(eventType, xpp, owner, res)) 5482 unknownContent(xpp); 5483 eventType = nextNoWhitespace(xpp); 5484 } 5485 next(xpp); 5486 parseElementClose(res); 5487 return res; 5488 } 5489 5490 protected boolean parseClaimResponseAddedItemSubDetailComponentContent(int eventType, XmlPullParser xpp, 5491 ClaimResponse owner, ClaimResponse.AddedItemSubDetailComponent res) 5492 throws XmlPullParserException, IOException, FHIRFormatError { 5493 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 5494 res.setProductOrService(parseCodeableConcept(xpp)); 5495 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 5496 res.getModifier().add(parseCodeableConcept(xpp)); 5497 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 5498 res.setQuantity(parseQuantity(xpp)); 5499 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 5500 res.setUnitPrice(parseMoney(xpp)); 5501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 5502 res.setFactorElement(parseDecimal(xpp)); 5503 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 5504 res.setNet(parseMoney(xpp)); 5505 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 5506 res.getNoteNumber().add(parsePositiveInt(xpp)); 5507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 5508 res.getAdjudication().add(parseClaimResponseAdjudicationComponent(xpp, owner)); 5509 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5510 return false; 5511 return true; 5512 } 5513 5514 protected ClaimResponse.TotalComponent parseClaimResponseTotalComponent(XmlPullParser xpp, ClaimResponse owner) 5515 throws XmlPullParserException, IOException, FHIRFormatError { 5516 ClaimResponse.TotalComponent res = new ClaimResponse.TotalComponent(); 5517 parseBackboneAttributes(xpp, res); 5518 next(xpp); 5519 int eventType = nextNoWhitespace(xpp); 5520 while (eventType != XmlPullParser.END_TAG) { 5521 if (!parseClaimResponseTotalComponentContent(eventType, xpp, owner, res)) 5522 unknownContent(xpp); 5523 eventType = nextNoWhitespace(xpp); 5524 } 5525 next(xpp); 5526 parseElementClose(res); 5527 return res; 5528 } 5529 5530 protected boolean parseClaimResponseTotalComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5531 ClaimResponse.TotalComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5532 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 5533 res.setCategory(parseCodeableConcept(xpp)); 5534 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 5535 res.setAmount(parseMoney(xpp)); 5536 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5537 return false; 5538 return true; 5539 } 5540 5541 protected ClaimResponse.PaymentComponent parseClaimResponsePaymentComponent(XmlPullParser xpp, ClaimResponse owner) 5542 throws XmlPullParserException, IOException, FHIRFormatError { 5543 ClaimResponse.PaymentComponent res = new ClaimResponse.PaymentComponent(); 5544 parseBackboneAttributes(xpp, res); 5545 next(xpp); 5546 int eventType = nextNoWhitespace(xpp); 5547 while (eventType != XmlPullParser.END_TAG) { 5548 if (!parseClaimResponsePaymentComponentContent(eventType, xpp, owner, res)) 5549 unknownContent(xpp); 5550 eventType = nextNoWhitespace(xpp); 5551 } 5552 next(xpp); 5553 parseElementClose(res); 5554 return res; 5555 } 5556 5557 protected boolean parseClaimResponsePaymentComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5558 ClaimResponse.PaymentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5559 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 5560 res.setType(parseCodeableConcept(xpp)); 5561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { 5562 res.setAdjustment(parseMoney(xpp)); 5563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { 5564 res.setAdjustmentReason(parseCodeableConcept(xpp)); 5565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 5566 res.setDateElement(parseDate(xpp)); 5567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 5568 res.setAmount(parseMoney(xpp)); 5569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 5570 res.setIdentifier(parseIdentifier(xpp)); 5571 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5572 return false; 5573 return true; 5574 } 5575 5576 protected ClaimResponse.NoteComponent parseClaimResponseNoteComponent(XmlPullParser xpp, ClaimResponse owner) 5577 throws XmlPullParserException, IOException, FHIRFormatError { 5578 ClaimResponse.NoteComponent res = new ClaimResponse.NoteComponent(); 5579 parseBackboneAttributes(xpp, res); 5580 next(xpp); 5581 int eventType = nextNoWhitespace(xpp); 5582 while (eventType != XmlPullParser.END_TAG) { 5583 if (!parseClaimResponseNoteComponentContent(eventType, xpp, owner, res)) 5584 unknownContent(xpp); 5585 eventType = nextNoWhitespace(xpp); 5586 } 5587 next(xpp); 5588 parseElementClose(res); 5589 return res; 5590 } 5591 5592 protected boolean parseClaimResponseNoteComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5593 ClaimResponse.NoteComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5594 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 5595 res.setNumberElement(parsePositiveInt(xpp)); 5596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 5597 res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); 5598 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 5599 res.setTextElement(parseString(xpp)); 5600 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 5601 res.setLanguage(parseCodeableConcept(xpp)); 5602 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5603 return false; 5604 return true; 5605 } 5606 5607 protected ClaimResponse.InsuranceComponent parseClaimResponseInsuranceComponent(XmlPullParser xpp, 5608 ClaimResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 5609 ClaimResponse.InsuranceComponent res = new ClaimResponse.InsuranceComponent(); 5610 parseBackboneAttributes(xpp, res); 5611 next(xpp); 5612 int eventType = nextNoWhitespace(xpp); 5613 while (eventType != XmlPullParser.END_TAG) { 5614 if (!parseClaimResponseInsuranceComponentContent(eventType, xpp, owner, res)) 5615 unknownContent(xpp); 5616 eventType = nextNoWhitespace(xpp); 5617 } 5618 next(xpp); 5619 parseElementClose(res); 5620 return res; 5621 } 5622 5623 protected boolean parseClaimResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5624 ClaimResponse.InsuranceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5625 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 5626 res.setSequenceElement(parsePositiveInt(xpp)); 5627 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { 5628 res.setFocalElement(parseBoolean(xpp)); 5629 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 5630 res.setCoverage(parseReference(xpp)); 5631 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { 5632 res.setBusinessArrangementElement(parseString(xpp)); 5633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { 5634 res.setClaimResponse(parseReference(xpp)); 5635 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5636 return false; 5637 return true; 5638 } 5639 5640 protected ClaimResponse.ErrorComponent parseClaimResponseErrorComponent(XmlPullParser xpp, ClaimResponse owner) 5641 throws XmlPullParserException, IOException, FHIRFormatError { 5642 ClaimResponse.ErrorComponent res = new ClaimResponse.ErrorComponent(); 5643 parseBackboneAttributes(xpp, res); 5644 next(xpp); 5645 int eventType = nextNoWhitespace(xpp); 5646 while (eventType != XmlPullParser.END_TAG) { 5647 if (!parseClaimResponseErrorComponentContent(eventType, xpp, owner, res)) 5648 unknownContent(xpp); 5649 eventType = nextNoWhitespace(xpp); 5650 } 5651 next(xpp); 5652 parseElementClose(res); 5653 return res; 5654 } 5655 5656 protected boolean parseClaimResponseErrorComponentContent(int eventType, XmlPullParser xpp, ClaimResponse owner, 5657 ClaimResponse.ErrorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5658 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemSequence")) { 5659 res.setItemSequenceElement(parsePositiveInt(xpp)); 5660 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequence")) { 5661 res.setDetailSequenceElement(parsePositiveInt(xpp)); 5662 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetailSequence")) { 5663 res.setSubDetailSequenceElement(parsePositiveInt(xpp)); 5664 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5665 res.setCode(parseCodeableConcept(xpp)); 5666 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5667 return false; 5668 return true; 5669 } 5670 5671 protected ClinicalImpression parseClinicalImpression(XmlPullParser xpp) 5672 throws XmlPullParserException, IOException, FHIRFormatError { 5673 ClinicalImpression res = new ClinicalImpression(); 5674 parseDomainResourceAttributes(xpp, res); 5675 next(xpp); 5676 int eventType = nextNoWhitespace(xpp); 5677 while (eventType != XmlPullParser.END_TAG) { 5678 if (!parseClinicalImpressionContent(eventType, xpp, res)) 5679 unknownContent(xpp); 5680 eventType = nextNoWhitespace(xpp); 5681 } 5682 next(xpp); 5683 parseElementClose(res); 5684 return res; 5685 } 5686 5687 protected boolean parseClinicalImpressionContent(int eventType, XmlPullParser xpp, ClinicalImpression res) 5688 throws XmlPullParserException, IOException, FHIRFormatError { 5689 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 5690 res.getIdentifier().add(parseIdentifier(xpp)); 5691 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 5692 res.setStatusElement(parseEnumeration(xpp, ClinicalImpression.ClinicalImpressionStatus.NULL, 5693 new ClinicalImpression.ClinicalImpressionStatusEnumFactory())); 5694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 5695 res.setStatusReason(parseCodeableConcept(xpp)); 5696 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5697 res.setCode(parseCodeableConcept(xpp)); 5698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 5699 res.setDescriptionElement(parseString(xpp)); 5700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 5701 res.setSubject(parseReference(xpp)); 5702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 5703 res.setEncounter(parseReference(xpp)); 5704 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { 5705 res.setEffective(parseType("effective", xpp)); 5706 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 5707 res.setDateElement(parseDateTime(xpp)); 5708 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessor")) { 5709 res.setAssessor(parseReference(xpp)); 5710 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("previous")) { 5711 res.setPrevious(parseReference(xpp)); 5712 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("problem")) { 5713 res.getProblem().add(parseReference(xpp)); 5714 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("investigation")) { 5715 res.getInvestigation().add(parseClinicalImpressionClinicalImpressionInvestigationComponent(xpp, res)); 5716 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { 5717 res.getProtocol().add(parseUri(xpp)); 5718 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { 5719 res.setSummaryElement(parseString(xpp)); 5720 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("finding")) { 5721 res.getFinding().add(parseClinicalImpressionClinicalImpressionFindingComponent(xpp, res)); 5722 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisCodeableConcept")) { 5723 res.getPrognosisCodeableConcept().add(parseCodeableConcept(xpp)); 5724 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prognosisReference")) { 5725 res.getPrognosisReference().add(parseReference(xpp)); 5726 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 5727 res.getSupportingInfo().add(parseReference(xpp)); 5728 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 5729 res.getNote().add(parseAnnotation(xpp)); 5730 } else if (!parseDomainResourceContent(eventType, xpp, res)) 5731 return false; 5732 return true; 5733 } 5734 5735 protected ClinicalImpression.ClinicalImpressionInvestigationComponent parseClinicalImpressionClinicalImpressionInvestigationComponent( 5736 XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { 5737 ClinicalImpression.ClinicalImpressionInvestigationComponent res = new ClinicalImpression.ClinicalImpressionInvestigationComponent(); 5738 parseBackboneAttributes(xpp, res); 5739 next(xpp); 5740 int eventType = nextNoWhitespace(xpp); 5741 while (eventType != XmlPullParser.END_TAG) { 5742 if (!parseClinicalImpressionClinicalImpressionInvestigationComponentContent(eventType, xpp, owner, res)) 5743 unknownContent(xpp); 5744 eventType = nextNoWhitespace(xpp); 5745 } 5746 next(xpp); 5747 parseElementClose(res); 5748 return res; 5749 } 5750 5751 protected boolean parseClinicalImpressionClinicalImpressionInvestigationComponentContent(int eventType, 5752 XmlPullParser xpp, ClinicalImpression owner, ClinicalImpression.ClinicalImpressionInvestigationComponent res) 5753 throws XmlPullParserException, IOException, FHIRFormatError { 5754 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5755 res.setCode(parseCodeableConcept(xpp)); 5756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 5757 res.getItem().add(parseReference(xpp)); 5758 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5759 return false; 5760 return true; 5761 } 5762 5763 protected ClinicalImpression.ClinicalImpressionFindingComponent parseClinicalImpressionClinicalImpressionFindingComponent( 5764 XmlPullParser xpp, ClinicalImpression owner) throws XmlPullParserException, IOException, FHIRFormatError { 5765 ClinicalImpression.ClinicalImpressionFindingComponent res = new ClinicalImpression.ClinicalImpressionFindingComponent(); 5766 parseBackboneAttributes(xpp, res); 5767 next(xpp); 5768 int eventType = nextNoWhitespace(xpp); 5769 while (eventType != XmlPullParser.END_TAG) { 5770 if (!parseClinicalImpressionClinicalImpressionFindingComponentContent(eventType, xpp, owner, res)) 5771 unknownContent(xpp); 5772 eventType = nextNoWhitespace(xpp); 5773 } 5774 next(xpp); 5775 parseElementClose(res); 5776 return res; 5777 } 5778 5779 protected boolean parseClinicalImpressionClinicalImpressionFindingComponentContent(int eventType, XmlPullParser xpp, 5780 ClinicalImpression owner, ClinicalImpression.ClinicalImpressionFindingComponent res) 5781 throws XmlPullParserException, IOException, FHIRFormatError { 5782 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemCodeableConcept")) { 5783 res.setItemCodeableConcept(parseCodeableConcept(xpp)); 5784 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemReference")) { 5785 res.setItemReference(parseReference(xpp)); 5786 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { 5787 res.setBasisElement(parseString(xpp)); 5788 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5789 return false; 5790 return true; 5791 } 5792 5793 protected CodeSystem parseCodeSystem(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 5794 CodeSystem res = new CodeSystem(); 5795 parseDomainResourceAttributes(xpp, res); 5796 next(xpp); 5797 int eventType = nextNoWhitespace(xpp); 5798 while (eventType != XmlPullParser.END_TAG) { 5799 if (!parseCodeSystemContent(eventType, xpp, res)) 5800 unknownContent(xpp); 5801 eventType = nextNoWhitespace(xpp); 5802 } 5803 next(xpp); 5804 parseElementClose(res); 5805 return res; 5806 } 5807 5808 protected boolean parseCodeSystemContent(int eventType, XmlPullParser xpp, CodeSystem res) 5809 throws XmlPullParserException, IOException, FHIRFormatError { 5810 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 5811 res.setUrlElement(parseUri(xpp)); 5812 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 5813 res.getIdentifier().add(parseIdentifier(xpp)); 5814 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 5815 res.setVersionElement(parseString(xpp)); 5816 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 5817 res.setNameElement(parseString(xpp)); 5818 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 5819 res.setTitleElement(parseString(xpp)); 5820 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 5821 res.setStatusElement( 5822 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 5823 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 5824 res.setExperimentalElement(parseBoolean(xpp)); 5825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 5826 res.setDateElement(parseDateTime(xpp)); 5827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 5828 res.setPublisherElement(parseString(xpp)); 5829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 5830 res.getContact().add(parseContactDetail(xpp)); 5831 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 5832 res.setDescriptionElement(parseMarkdown(xpp)); 5833 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 5834 res.getUseContext().add(parseUsageContext(xpp)); 5835 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 5836 res.getJurisdiction().add(parseCodeableConcept(xpp)); 5837 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 5838 res.setPurposeElement(parseMarkdown(xpp)); 5839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 5840 res.setCopyrightElement(parseMarkdown(xpp)); 5841 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caseSensitive")) { 5842 res.setCaseSensitiveElement(parseBoolean(xpp)); 5843 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { 5844 res.setValueSetElement(parseCanonical(xpp)); 5845 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hierarchyMeaning")) { 5846 res.setHierarchyMeaningElement(parseEnumeration(xpp, CodeSystem.CodeSystemHierarchyMeaning.NULL, 5847 new CodeSystem.CodeSystemHierarchyMeaningEnumFactory())); 5848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositional")) { 5849 res.setCompositionalElement(parseBoolean(xpp)); 5850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionNeeded")) { 5851 res.setVersionNeededElement(parseBoolean(xpp)); 5852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { 5853 res.setContentElement(parseEnumeration(xpp, CodeSystem.CodeSystemContentMode.NULL, 5854 new CodeSystem.CodeSystemContentModeEnumFactory())); 5855 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplements")) { 5856 res.setSupplementsElement(parseCanonical(xpp)); 5857 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { 5858 res.setCountElement(parseUnsignedInt(xpp)); 5859 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { 5860 res.getFilter().add(parseCodeSystemCodeSystemFilterComponent(xpp, res)); 5861 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 5862 res.getProperty().add(parseCodeSystemPropertyComponent(xpp, res)); 5863 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { 5864 res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, res)); 5865 } else if (!parseDomainResourceContent(eventType, xpp, res)) 5866 return false; 5867 return true; 5868 } 5869 5870 protected CodeSystem.CodeSystemFilterComponent parseCodeSystemCodeSystemFilterComponent(XmlPullParser xpp, 5871 CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { 5872 CodeSystem.CodeSystemFilterComponent res = new CodeSystem.CodeSystemFilterComponent(); 5873 parseBackboneAttributes(xpp, res); 5874 next(xpp); 5875 int eventType = nextNoWhitespace(xpp); 5876 while (eventType != XmlPullParser.END_TAG) { 5877 if (!parseCodeSystemCodeSystemFilterComponentContent(eventType, xpp, owner, res)) 5878 unknownContent(xpp); 5879 eventType = nextNoWhitespace(xpp); 5880 } 5881 next(xpp); 5882 parseElementClose(res); 5883 return res; 5884 } 5885 5886 protected boolean parseCodeSystemCodeSystemFilterComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, 5887 CodeSystem.CodeSystemFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5888 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5889 res.setCodeElement(parseCode(xpp)); 5890 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 5891 res.setDescriptionElement(parseString(xpp)); 5892 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { 5893 res.getOperator() 5894 .add(parseEnumeration(xpp, CodeSystem.FilterOperator.NULL, new CodeSystem.FilterOperatorEnumFactory())); 5895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 5896 res.setValueElement(parseString(xpp)); 5897 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5898 return false; 5899 return true; 5900 } 5901 5902 protected CodeSystem.PropertyComponent parseCodeSystemPropertyComponent(XmlPullParser xpp, CodeSystem owner) 5903 throws XmlPullParserException, IOException, FHIRFormatError { 5904 CodeSystem.PropertyComponent res = new CodeSystem.PropertyComponent(); 5905 parseBackboneAttributes(xpp, res); 5906 next(xpp); 5907 int eventType = nextNoWhitespace(xpp); 5908 while (eventType != XmlPullParser.END_TAG) { 5909 if (!parseCodeSystemPropertyComponentContent(eventType, xpp, owner, res)) 5910 unknownContent(xpp); 5911 eventType = nextNoWhitespace(xpp); 5912 } 5913 next(xpp); 5914 parseElementClose(res); 5915 return res; 5916 } 5917 5918 protected boolean parseCodeSystemPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, 5919 CodeSystem.PropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5920 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5921 res.setCodeElement(parseCode(xpp)); 5922 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 5923 res.setUriElement(parseUri(xpp)); 5924 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 5925 res.setDescriptionElement(parseString(xpp)); 5926 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 5927 res.setTypeElement(parseEnumeration(xpp, CodeSystem.PropertyType.NULL, new CodeSystem.PropertyTypeEnumFactory())); 5928 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5929 return false; 5930 return true; 5931 } 5932 5933 protected CodeSystem.ConceptDefinitionComponent parseCodeSystemConceptDefinitionComponent(XmlPullParser xpp, 5934 CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { 5935 CodeSystem.ConceptDefinitionComponent res = new CodeSystem.ConceptDefinitionComponent(); 5936 parseBackboneAttributes(xpp, res); 5937 next(xpp); 5938 int eventType = nextNoWhitespace(xpp); 5939 while (eventType != XmlPullParser.END_TAG) { 5940 if (!parseCodeSystemConceptDefinitionComponentContent(eventType, xpp, owner, res)) 5941 unknownContent(xpp); 5942 eventType = nextNoWhitespace(xpp); 5943 } 5944 next(xpp); 5945 parseElementClose(res); 5946 return res; 5947 } 5948 5949 protected boolean parseCodeSystemConceptDefinitionComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, 5950 CodeSystem.ConceptDefinitionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 5951 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 5952 res.setCodeElement(parseCode(xpp)); 5953 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 5954 res.setDisplayElement(parseString(xpp)); 5955 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 5956 res.setDefinitionElement(parseString(xpp)); 5957 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { 5958 res.getDesignation().add(parseCodeSystemConceptDefinitionDesignationComponent(xpp, owner)); 5959 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 5960 res.getProperty().add(parseCodeSystemConceptPropertyComponent(xpp, owner)); 5961 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { 5962 res.getConcept().add(parseCodeSystemConceptDefinitionComponent(xpp, owner)); 5963 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5964 return false; 5965 return true; 5966 } 5967 5968 protected CodeSystem.ConceptDefinitionDesignationComponent parseCodeSystemConceptDefinitionDesignationComponent( 5969 XmlPullParser xpp, CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { 5970 CodeSystem.ConceptDefinitionDesignationComponent res = new CodeSystem.ConceptDefinitionDesignationComponent(); 5971 parseBackboneAttributes(xpp, res); 5972 next(xpp); 5973 int eventType = nextNoWhitespace(xpp); 5974 while (eventType != XmlPullParser.END_TAG) { 5975 if (!parseCodeSystemConceptDefinitionDesignationComponentContent(eventType, xpp, owner, res)) 5976 unknownContent(xpp); 5977 eventType = nextNoWhitespace(xpp); 5978 } 5979 next(xpp); 5980 parseElementClose(res); 5981 return res; 5982 } 5983 5984 protected boolean parseCodeSystemConceptDefinitionDesignationComponentContent(int eventType, XmlPullParser xpp, 5985 CodeSystem owner, CodeSystem.ConceptDefinitionDesignationComponent res) 5986 throws XmlPullParserException, IOException, FHIRFormatError { 5987 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 5988 res.setLanguageElement(parseCode(xpp)); 5989 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 5990 res.setUse(parseCoding(xpp)); 5991 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 5992 res.setValueElement(parseString(xpp)); 5993 } else if (!parseBackboneElementContent(eventType, xpp, res)) 5994 return false; 5995 return true; 5996 } 5997 5998 protected CodeSystem.ConceptPropertyComponent parseCodeSystemConceptPropertyComponent(XmlPullParser xpp, 5999 CodeSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { 6000 CodeSystem.ConceptPropertyComponent res = new CodeSystem.ConceptPropertyComponent(); 6001 parseBackboneAttributes(xpp, res); 6002 next(xpp); 6003 int eventType = nextNoWhitespace(xpp); 6004 while (eventType != XmlPullParser.END_TAG) { 6005 if (!parseCodeSystemConceptPropertyComponentContent(eventType, xpp, owner, res)) 6006 unknownContent(xpp); 6007 eventType = nextNoWhitespace(xpp); 6008 } 6009 next(xpp); 6010 parseElementClose(res); 6011 return res; 6012 } 6013 6014 protected boolean parseCodeSystemConceptPropertyComponentContent(int eventType, XmlPullParser xpp, CodeSystem owner, 6015 CodeSystem.ConceptPropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6016 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6017 res.setCodeElement(parseCode(xpp)); 6018 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 6019 res.setValue(parseType("value", xpp)); 6020 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6021 return false; 6022 return true; 6023 } 6024 6025 protected Communication parseCommunication(XmlPullParser xpp) 6026 throws XmlPullParserException, IOException, FHIRFormatError { 6027 Communication res = new Communication(); 6028 parseDomainResourceAttributes(xpp, res); 6029 next(xpp); 6030 int eventType = nextNoWhitespace(xpp); 6031 while (eventType != XmlPullParser.END_TAG) { 6032 if (!parseCommunicationContent(eventType, xpp, res)) 6033 unknownContent(xpp); 6034 eventType = nextNoWhitespace(xpp); 6035 } 6036 next(xpp); 6037 parseElementClose(res); 6038 return res; 6039 } 6040 6041 protected boolean parseCommunicationContent(int eventType, XmlPullParser xpp, Communication res) 6042 throws XmlPullParserException, IOException, FHIRFormatError { 6043 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6044 res.getIdentifier().add(parseIdentifier(xpp)); 6045 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 6046 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 6047 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 6048 res.getInstantiatesUri().add(parseUri(xpp)); 6049 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 6050 res.getBasedOn().add(parseReference(xpp)); 6051 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 6052 res.getPartOf().add(parseReference(xpp)); 6053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inResponseTo")) { 6054 res.getInResponseTo().add(parseReference(xpp)); 6055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6056 res.setStatusElement(parseEnumeration(xpp, Communication.CommunicationStatus.NULL, 6057 new Communication.CommunicationStatusEnumFactory())); 6058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 6059 res.setStatusReason(parseCodeableConcept(xpp)); 6060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 6061 res.getCategory().add(parseCodeableConcept(xpp)); 6062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 6063 res.setPriorityElement(parseEnumeration(xpp, Communication.CommunicationPriority.NULL, 6064 new Communication.CommunicationPriorityEnumFactory())); 6065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { 6066 res.getMedium().add(parseCodeableConcept(xpp)); 6067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 6068 res.setSubject(parseReference(xpp)); 6069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 6070 res.setTopic(parseCodeableConcept(xpp)); 6071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("about")) { 6072 res.getAbout().add(parseReference(xpp)); 6073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 6074 res.setEncounter(parseReference(xpp)); 6075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sent")) { 6076 res.setSentElement(parseDateTime(xpp)); 6077 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("received")) { 6078 res.setReceivedElement(parseDateTime(xpp)); 6079 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 6080 res.getRecipient().add(parseReference(xpp)); 6081 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { 6082 res.setSender(parseReference(xpp)); 6083 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 6084 res.getReasonCode().add(parseCodeableConcept(xpp)); 6085 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 6086 res.getReasonReference().add(parseReference(xpp)); 6087 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { 6088 res.getPayload().add(parseCommunicationCommunicationPayloadComponent(xpp, res)); 6089 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 6090 res.getNote().add(parseAnnotation(xpp)); 6091 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6092 return false; 6093 return true; 6094 } 6095 6096 protected Communication.CommunicationPayloadComponent parseCommunicationCommunicationPayloadComponent( 6097 XmlPullParser xpp, Communication owner) throws XmlPullParserException, IOException, FHIRFormatError { 6098 Communication.CommunicationPayloadComponent res = new Communication.CommunicationPayloadComponent(); 6099 parseBackboneAttributes(xpp, res); 6100 next(xpp); 6101 int eventType = nextNoWhitespace(xpp); 6102 while (eventType != XmlPullParser.END_TAG) { 6103 if (!parseCommunicationCommunicationPayloadComponentContent(eventType, xpp, owner, res)) 6104 unknownContent(xpp); 6105 eventType = nextNoWhitespace(xpp); 6106 } 6107 next(xpp); 6108 parseElementClose(res); 6109 return res; 6110 } 6111 6112 protected boolean parseCommunicationCommunicationPayloadComponentContent(int eventType, XmlPullParser xpp, 6113 Communication owner, Communication.CommunicationPayloadComponent res) 6114 throws XmlPullParserException, IOException, FHIRFormatError { 6115 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { 6116 res.setContent(parseType("content", xpp)); 6117 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6118 return false; 6119 return true; 6120 } 6121 6122 protected CommunicationRequest parseCommunicationRequest(XmlPullParser xpp) 6123 throws XmlPullParserException, IOException, FHIRFormatError { 6124 CommunicationRequest res = new CommunicationRequest(); 6125 parseDomainResourceAttributes(xpp, res); 6126 next(xpp); 6127 int eventType = nextNoWhitespace(xpp); 6128 while (eventType != XmlPullParser.END_TAG) { 6129 if (!parseCommunicationRequestContent(eventType, xpp, res)) 6130 unknownContent(xpp); 6131 eventType = nextNoWhitespace(xpp); 6132 } 6133 next(xpp); 6134 parseElementClose(res); 6135 return res; 6136 } 6137 6138 protected boolean parseCommunicationRequestContent(int eventType, XmlPullParser xpp, CommunicationRequest res) 6139 throws XmlPullParserException, IOException, FHIRFormatError { 6140 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6141 res.getIdentifier().add(parseIdentifier(xpp)); 6142 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 6143 res.getBasedOn().add(parseReference(xpp)); 6144 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 6145 res.getReplaces().add(parseReference(xpp)); 6146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { 6147 res.setGroupIdentifier(parseIdentifier(xpp)); 6148 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6149 res.setStatusElement(parseEnumeration(xpp, CommunicationRequest.CommunicationRequestStatus.NULL, 6150 new CommunicationRequest.CommunicationRequestStatusEnumFactory())); 6151 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 6152 res.setStatusReason(parseCodeableConcept(xpp)); 6153 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 6154 res.getCategory().add(parseCodeableConcept(xpp)); 6155 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 6156 res.setPriorityElement(parseEnumeration(xpp, CommunicationRequest.CommunicationPriority.NULL, 6157 new CommunicationRequest.CommunicationPriorityEnumFactory())); 6158 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 6159 res.setDoNotPerformElement(parseBoolean(xpp)); 6160 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medium")) { 6161 res.getMedium().add(parseCodeableConcept(xpp)); 6162 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 6163 res.setSubject(parseReference(xpp)); 6164 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("about")) { 6165 res.getAbout().add(parseReference(xpp)); 6166 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 6167 res.setEncounter(parseReference(xpp)); 6168 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { 6169 res.getPayload().add(parseCommunicationRequestCommunicationRequestPayloadComponent(xpp, res)); 6170 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 6171 res.setOccurrence(parseType("occurrence", xpp)); 6172 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 6173 res.setAuthoredOnElement(parseDateTime(xpp)); 6174 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 6175 res.setRequester(parseReference(xpp)); 6176 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 6177 res.getRecipient().add(parseReference(xpp)); 6178 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { 6179 res.setSender(parseReference(xpp)); 6180 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 6181 res.getReasonCode().add(parseCodeableConcept(xpp)); 6182 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 6183 res.getReasonReference().add(parseReference(xpp)); 6184 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 6185 res.getNote().add(parseAnnotation(xpp)); 6186 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6187 return false; 6188 return true; 6189 } 6190 6191 protected CommunicationRequest.CommunicationRequestPayloadComponent parseCommunicationRequestCommunicationRequestPayloadComponent( 6192 XmlPullParser xpp, CommunicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 6193 CommunicationRequest.CommunicationRequestPayloadComponent res = new CommunicationRequest.CommunicationRequestPayloadComponent(); 6194 parseBackboneAttributes(xpp, res); 6195 next(xpp); 6196 int eventType = nextNoWhitespace(xpp); 6197 while (eventType != XmlPullParser.END_TAG) { 6198 if (!parseCommunicationRequestCommunicationRequestPayloadComponentContent(eventType, xpp, owner, res)) 6199 unknownContent(xpp); 6200 eventType = nextNoWhitespace(xpp); 6201 } 6202 next(xpp); 6203 parseElementClose(res); 6204 return res; 6205 } 6206 6207 protected boolean parseCommunicationRequestCommunicationRequestPayloadComponentContent(int eventType, 6208 XmlPullParser xpp, CommunicationRequest owner, CommunicationRequest.CommunicationRequestPayloadComponent res) 6209 throws XmlPullParserException, IOException, FHIRFormatError { 6210 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { 6211 res.setContent(parseType("content", xpp)); 6212 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6213 return false; 6214 return true; 6215 } 6216 6217 protected CompartmentDefinition parseCompartmentDefinition(XmlPullParser xpp) 6218 throws XmlPullParserException, IOException, FHIRFormatError { 6219 CompartmentDefinition res = new CompartmentDefinition(); 6220 parseDomainResourceAttributes(xpp, res); 6221 next(xpp); 6222 int eventType = nextNoWhitespace(xpp); 6223 while (eventType != XmlPullParser.END_TAG) { 6224 if (!parseCompartmentDefinitionContent(eventType, xpp, res)) 6225 unknownContent(xpp); 6226 eventType = nextNoWhitespace(xpp); 6227 } 6228 next(xpp); 6229 parseElementClose(res); 6230 return res; 6231 } 6232 6233 protected boolean parseCompartmentDefinitionContent(int eventType, XmlPullParser xpp, CompartmentDefinition res) 6234 throws XmlPullParserException, IOException, FHIRFormatError { 6235 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 6236 res.setUrlElement(parseUri(xpp)); 6237 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 6238 res.setVersionElement(parseString(xpp)); 6239 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 6240 res.setNameElement(parseString(xpp)); 6241 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6242 res.setStatusElement( 6243 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 6244 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 6245 res.setExperimentalElement(parseBoolean(xpp)); 6246 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 6247 res.setDateElement(parseDateTime(xpp)); 6248 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 6249 res.setPublisherElement(parseString(xpp)); 6250 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 6251 res.getContact().add(parseContactDetail(xpp)); 6252 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 6253 res.setDescriptionElement(parseMarkdown(xpp)); 6254 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 6255 res.getUseContext().add(parseUsageContext(xpp)); 6256 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 6257 res.setPurposeElement(parseMarkdown(xpp)); 6258 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6259 res.setCodeElement(parseEnumeration(xpp, CompartmentDefinition.CompartmentType.NULL, 6260 new CompartmentDefinition.CompartmentTypeEnumFactory())); 6261 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("search")) { 6262 res.setSearchElement(parseBoolean(xpp)); 6263 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 6264 res.getResource().add(parseCompartmentDefinitionCompartmentDefinitionResourceComponent(xpp, res)); 6265 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6266 return false; 6267 return true; 6268 } 6269 6270 protected CompartmentDefinition.CompartmentDefinitionResourceComponent parseCompartmentDefinitionCompartmentDefinitionResourceComponent( 6271 XmlPullParser xpp, CompartmentDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 6272 CompartmentDefinition.CompartmentDefinitionResourceComponent res = new CompartmentDefinition.CompartmentDefinitionResourceComponent(); 6273 parseBackboneAttributes(xpp, res); 6274 next(xpp); 6275 int eventType = nextNoWhitespace(xpp); 6276 while (eventType != XmlPullParser.END_TAG) { 6277 if (!parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(eventType, xpp, owner, res)) 6278 unknownContent(xpp); 6279 eventType = nextNoWhitespace(xpp); 6280 } 6281 next(xpp); 6282 parseElementClose(res); 6283 return res; 6284 } 6285 6286 protected boolean parseCompartmentDefinitionCompartmentDefinitionResourceComponentContent(int eventType, 6287 XmlPullParser xpp, CompartmentDefinition owner, CompartmentDefinition.CompartmentDefinitionResourceComponent res) 6288 throws XmlPullParserException, IOException, FHIRFormatError { 6289 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6290 res.setCodeElement(parseCode(xpp)); 6291 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("param")) { 6292 res.getParam().add(parseString(xpp)); 6293 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 6294 res.setDocumentationElement(parseString(xpp)); 6295 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6296 return false; 6297 return true; 6298 } 6299 6300 protected Composition parseComposition(XmlPullParser xpp) 6301 throws XmlPullParserException, IOException, FHIRFormatError { 6302 Composition res = new Composition(); 6303 parseDomainResourceAttributes(xpp, res); 6304 next(xpp); 6305 int eventType = nextNoWhitespace(xpp); 6306 while (eventType != XmlPullParser.END_TAG) { 6307 if (!parseCompositionContent(eventType, xpp, res)) 6308 unknownContent(xpp); 6309 eventType = nextNoWhitespace(xpp); 6310 } 6311 next(xpp); 6312 parseElementClose(res); 6313 return res; 6314 } 6315 6316 protected boolean parseCompositionContent(int eventType, XmlPullParser xpp, Composition res) 6317 throws XmlPullParserException, IOException, FHIRFormatError { 6318 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6319 res.setIdentifier(parseIdentifier(xpp)); 6320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6321 res.setStatusElement( 6322 parseEnumeration(xpp, Composition.CompositionStatus.NULL, new Composition.CompositionStatusEnumFactory())); 6323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 6324 res.setType(parseCodeableConcept(xpp)); 6325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 6326 res.getCategory().add(parseCodeableConcept(xpp)); 6327 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 6328 res.setSubject(parseReference(xpp)); 6329 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 6330 res.setEncounter(parseReference(xpp)); 6331 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 6332 res.setDateElement(parseDateTime(xpp)); 6333 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 6334 res.getAuthor().add(parseReference(xpp)); 6335 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 6336 res.setTitleElement(parseString(xpp)); 6337 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("confidentiality")) { 6338 res.setConfidentialityElement(parseEnumeration(xpp, Composition.DocumentConfidentiality.NULL, 6339 new Composition.DocumentConfidentialityEnumFactory())); 6340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attester")) { 6341 res.getAttester().add(parseCompositionCompositionAttesterComponent(xpp, res)); 6342 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { 6343 res.setCustodian(parseReference(xpp)); 6344 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { 6345 res.getRelatesTo().add(parseCompositionCompositionRelatesToComponent(xpp, res)); 6346 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { 6347 res.getEvent().add(parseCompositionCompositionEventComponent(xpp, res)); 6348 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { 6349 res.getSection().add(parseCompositionSectionComponent(xpp, res)); 6350 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6351 return false; 6352 return true; 6353 } 6354 6355 protected Composition.CompositionAttesterComponent parseCompositionCompositionAttesterComponent(XmlPullParser xpp, 6356 Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { 6357 Composition.CompositionAttesterComponent res = new Composition.CompositionAttesterComponent(); 6358 parseBackboneAttributes(xpp, res); 6359 next(xpp); 6360 int eventType = nextNoWhitespace(xpp); 6361 while (eventType != XmlPullParser.END_TAG) { 6362 if (!parseCompositionCompositionAttesterComponentContent(eventType, xpp, owner, res)) 6363 unknownContent(xpp); 6364 eventType = nextNoWhitespace(xpp); 6365 } 6366 next(xpp); 6367 parseElementClose(res); 6368 return res; 6369 } 6370 6371 protected boolean parseCompositionCompositionAttesterComponentContent(int eventType, XmlPullParser xpp, 6372 Composition owner, Composition.CompositionAttesterComponent res) 6373 throws XmlPullParserException, IOException, FHIRFormatError { 6374 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 6375 res.setModeElement(parseEnumeration(xpp, Composition.CompositionAttestationMode.NULL, 6376 new Composition.CompositionAttestationModeEnumFactory())); 6377 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { 6378 res.setTimeElement(parseDateTime(xpp)); 6379 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 6380 res.setParty(parseReference(xpp)); 6381 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6382 return false; 6383 return true; 6384 } 6385 6386 protected Composition.CompositionRelatesToComponent parseCompositionCompositionRelatesToComponent(XmlPullParser xpp, 6387 Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { 6388 Composition.CompositionRelatesToComponent res = new Composition.CompositionRelatesToComponent(); 6389 parseBackboneAttributes(xpp, res); 6390 next(xpp); 6391 int eventType = nextNoWhitespace(xpp); 6392 while (eventType != XmlPullParser.END_TAG) { 6393 if (!parseCompositionCompositionRelatesToComponentContent(eventType, xpp, owner, res)) 6394 unknownContent(xpp); 6395 eventType = nextNoWhitespace(xpp); 6396 } 6397 next(xpp); 6398 parseElementClose(res); 6399 return res; 6400 } 6401 6402 protected boolean parseCompositionCompositionRelatesToComponentContent(int eventType, XmlPullParser xpp, 6403 Composition owner, Composition.CompositionRelatesToComponent res) 6404 throws XmlPullParserException, IOException, FHIRFormatError { 6405 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6406 res.setCodeElement(parseEnumeration(xpp, Composition.DocumentRelationshipType.NULL, 6407 new Composition.DocumentRelationshipTypeEnumFactory())); 6408 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { 6409 res.setTarget(parseType("target", xpp)); 6410 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6411 return false; 6412 return true; 6413 } 6414 6415 protected Composition.CompositionEventComponent parseCompositionCompositionEventComponent(XmlPullParser xpp, 6416 Composition owner) throws XmlPullParserException, IOException, FHIRFormatError { 6417 Composition.CompositionEventComponent res = new Composition.CompositionEventComponent(); 6418 parseBackboneAttributes(xpp, res); 6419 next(xpp); 6420 int eventType = nextNoWhitespace(xpp); 6421 while (eventType != XmlPullParser.END_TAG) { 6422 if (!parseCompositionCompositionEventComponentContent(eventType, xpp, owner, res)) 6423 unknownContent(xpp); 6424 eventType = nextNoWhitespace(xpp); 6425 } 6426 next(xpp); 6427 parseElementClose(res); 6428 return res; 6429 } 6430 6431 protected boolean parseCompositionCompositionEventComponentContent(int eventType, XmlPullParser xpp, 6432 Composition owner, Composition.CompositionEventComponent res) 6433 throws XmlPullParserException, IOException, FHIRFormatError { 6434 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6435 res.getCode().add(parseCodeableConcept(xpp)); 6436 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 6437 res.setPeriod(parsePeriod(xpp)); 6438 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 6439 res.getDetail().add(parseReference(xpp)); 6440 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6441 return false; 6442 return true; 6443 } 6444 6445 protected Composition.SectionComponent parseCompositionSectionComponent(XmlPullParser xpp, Composition owner) 6446 throws XmlPullParserException, IOException, FHIRFormatError { 6447 Composition.SectionComponent res = new Composition.SectionComponent(); 6448 parseBackboneAttributes(xpp, res); 6449 next(xpp); 6450 int eventType = nextNoWhitespace(xpp); 6451 while (eventType != XmlPullParser.END_TAG) { 6452 if (!parseCompositionSectionComponentContent(eventType, xpp, owner, res)) 6453 unknownContent(xpp); 6454 eventType = nextNoWhitespace(xpp); 6455 } 6456 next(xpp); 6457 parseElementClose(res); 6458 return res; 6459 } 6460 6461 protected boolean parseCompositionSectionComponentContent(int eventType, XmlPullParser xpp, Composition owner, 6462 Composition.SectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6463 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 6464 res.setTitleElement(parseString(xpp)); 6465 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6466 res.setCode(parseCodeableConcept(xpp)); 6467 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 6468 res.getAuthor().add(parseReference(xpp)); 6469 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 6470 res.setFocus(parseReference(xpp)); 6471 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 6472 res.setText(parseNarrative(xpp)); 6473 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 6474 res.setModeElement(parseEnumeration(xpp, Composition.SectionMode.NULL, new Composition.SectionModeEnumFactory())); 6475 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { 6476 res.setOrderedBy(parseCodeableConcept(xpp)); 6477 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { 6478 res.getEntry().add(parseReference(xpp)); 6479 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { 6480 res.setEmptyReason(parseCodeableConcept(xpp)); 6481 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("section")) { 6482 res.getSection().add(parseCompositionSectionComponent(xpp, owner)); 6483 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6484 return false; 6485 return true; 6486 } 6487 6488 protected ConceptMap parseConceptMap(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 6489 ConceptMap res = new ConceptMap(); 6490 parseDomainResourceAttributes(xpp, res); 6491 next(xpp); 6492 int eventType = nextNoWhitespace(xpp); 6493 while (eventType != XmlPullParser.END_TAG) { 6494 if (!parseConceptMapContent(eventType, xpp, res)) 6495 unknownContent(xpp); 6496 eventType = nextNoWhitespace(xpp); 6497 } 6498 next(xpp); 6499 parseElementClose(res); 6500 return res; 6501 } 6502 6503 protected boolean parseConceptMapContent(int eventType, XmlPullParser xpp, ConceptMap res) 6504 throws XmlPullParserException, IOException, FHIRFormatError { 6505 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 6506 res.setUrlElement(parseUri(xpp)); 6507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6508 res.setIdentifier(parseIdentifier(xpp)); 6509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 6510 res.setVersionElement(parseString(xpp)); 6511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 6512 res.setNameElement(parseString(xpp)); 6513 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 6514 res.setTitleElement(parseString(xpp)); 6515 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6516 res.setStatusElement( 6517 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 6518 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 6519 res.setExperimentalElement(parseBoolean(xpp)); 6520 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 6521 res.setDateElement(parseDateTime(xpp)); 6522 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 6523 res.setPublisherElement(parseString(xpp)); 6524 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 6525 res.getContact().add(parseContactDetail(xpp)); 6526 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 6527 res.setDescriptionElement(parseMarkdown(xpp)); 6528 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 6529 res.getUseContext().add(parseUsageContext(xpp)); 6530 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 6531 res.getJurisdiction().add(parseCodeableConcept(xpp)); 6532 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 6533 res.setPurposeElement(parseMarkdown(xpp)); 6534 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 6535 res.setCopyrightElement(parseMarkdown(xpp)); 6536 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { 6537 res.setSource(parseType("source", xpp)); 6538 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "target")) { 6539 res.setTarget(parseType("target", xpp)); 6540 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 6541 res.getGroup().add(parseConceptMapConceptMapGroupComponent(xpp, res)); 6542 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6543 return false; 6544 return true; 6545 } 6546 6547 protected ConceptMap.ConceptMapGroupComponent parseConceptMapConceptMapGroupComponent(XmlPullParser xpp, 6548 ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 6549 ConceptMap.ConceptMapGroupComponent res = new ConceptMap.ConceptMapGroupComponent(); 6550 parseBackboneAttributes(xpp, res); 6551 next(xpp); 6552 int eventType = nextNoWhitespace(xpp); 6553 while (eventType != XmlPullParser.END_TAG) { 6554 if (!parseConceptMapConceptMapGroupComponentContent(eventType, xpp, owner, res)) 6555 unknownContent(xpp); 6556 eventType = nextNoWhitespace(xpp); 6557 } 6558 next(xpp); 6559 parseElementClose(res); 6560 return res; 6561 } 6562 6563 protected boolean parseConceptMapConceptMapGroupComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, 6564 ConceptMap.ConceptMapGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6565 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 6566 res.setSourceElement(parseUri(xpp)); 6567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceVersion")) { 6568 res.setSourceVersionElement(parseString(xpp)); 6569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 6570 res.setTargetElement(parseUri(xpp)); 6571 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetVersion")) { 6572 res.setTargetVersionElement(parseString(xpp)); 6573 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 6574 res.getElement().add(parseConceptMapSourceElementComponent(xpp, owner)); 6575 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unmapped")) { 6576 res.setUnmapped(parseConceptMapConceptMapGroupUnmappedComponent(xpp, owner)); 6577 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6578 return false; 6579 return true; 6580 } 6581 6582 protected ConceptMap.SourceElementComponent parseConceptMapSourceElementComponent(XmlPullParser xpp, ConceptMap owner) 6583 throws XmlPullParserException, IOException, FHIRFormatError { 6584 ConceptMap.SourceElementComponent res = new ConceptMap.SourceElementComponent(); 6585 parseBackboneAttributes(xpp, res); 6586 next(xpp); 6587 int eventType = nextNoWhitespace(xpp); 6588 while (eventType != XmlPullParser.END_TAG) { 6589 if (!parseConceptMapSourceElementComponentContent(eventType, xpp, owner, res)) 6590 unknownContent(xpp); 6591 eventType = nextNoWhitespace(xpp); 6592 } 6593 next(xpp); 6594 parseElementClose(res); 6595 return res; 6596 } 6597 6598 protected boolean parseConceptMapSourceElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, 6599 ConceptMap.SourceElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6600 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6601 res.setCodeElement(parseCode(xpp)); 6602 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 6603 res.setDisplayElement(parseString(xpp)); 6604 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 6605 res.getTarget().add(parseConceptMapTargetElementComponent(xpp, owner)); 6606 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6607 return false; 6608 return true; 6609 } 6610 6611 protected ConceptMap.TargetElementComponent parseConceptMapTargetElementComponent(XmlPullParser xpp, ConceptMap owner) 6612 throws XmlPullParserException, IOException, FHIRFormatError { 6613 ConceptMap.TargetElementComponent res = new ConceptMap.TargetElementComponent(); 6614 parseBackboneAttributes(xpp, res); 6615 next(xpp); 6616 int eventType = nextNoWhitespace(xpp); 6617 while (eventType != XmlPullParser.END_TAG) { 6618 if (!parseConceptMapTargetElementComponentContent(eventType, xpp, owner, res)) 6619 unknownContent(xpp); 6620 eventType = nextNoWhitespace(xpp); 6621 } 6622 next(xpp); 6623 parseElementClose(res); 6624 return res; 6625 } 6626 6627 protected boolean parseConceptMapTargetElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, 6628 ConceptMap.TargetElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6629 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6630 res.setCodeElement(parseCode(xpp)); 6631 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 6632 res.setDisplayElement(parseString(xpp)); 6633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("equivalence")) { 6634 res.setEquivalenceElement(parseEnumeration(xpp, Enumerations.ConceptMapEquivalence.NULL, 6635 new Enumerations.ConceptMapEquivalenceEnumFactory())); 6636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 6637 res.setCommentElement(parseString(xpp)); 6638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependsOn")) { 6639 res.getDependsOn().add(parseConceptMapOtherElementComponent(xpp, owner)); 6640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { 6641 res.getProduct().add(parseConceptMapOtherElementComponent(xpp, owner)); 6642 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6643 return false; 6644 return true; 6645 } 6646 6647 protected ConceptMap.OtherElementComponent parseConceptMapOtherElementComponent(XmlPullParser xpp, ConceptMap owner) 6648 throws XmlPullParserException, IOException, FHIRFormatError { 6649 ConceptMap.OtherElementComponent res = new ConceptMap.OtherElementComponent(); 6650 parseBackboneAttributes(xpp, res); 6651 next(xpp); 6652 int eventType = nextNoWhitespace(xpp); 6653 while (eventType != XmlPullParser.END_TAG) { 6654 if (!parseConceptMapOtherElementComponentContent(eventType, xpp, owner, res)) 6655 unknownContent(xpp); 6656 eventType = nextNoWhitespace(xpp); 6657 } 6658 next(xpp); 6659 parseElementClose(res); 6660 return res; 6661 } 6662 6663 protected boolean parseConceptMapOtherElementComponentContent(int eventType, XmlPullParser xpp, ConceptMap owner, 6664 ConceptMap.OtherElementComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6665 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 6666 res.setPropertyElement(parseUri(xpp)); 6667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 6668 res.setSystemElement(parseCanonical(xpp)); 6669 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 6670 res.setValueElement(parseString(xpp)); 6671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 6672 res.setDisplayElement(parseString(xpp)); 6673 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6674 return false; 6675 return true; 6676 } 6677 6678 protected ConceptMap.ConceptMapGroupUnmappedComponent parseConceptMapConceptMapGroupUnmappedComponent( 6679 XmlPullParser xpp, ConceptMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 6680 ConceptMap.ConceptMapGroupUnmappedComponent res = new ConceptMap.ConceptMapGroupUnmappedComponent(); 6681 parseBackboneAttributes(xpp, res); 6682 next(xpp); 6683 int eventType = nextNoWhitespace(xpp); 6684 while (eventType != XmlPullParser.END_TAG) { 6685 if (!parseConceptMapConceptMapGroupUnmappedComponentContent(eventType, xpp, owner, res)) 6686 unknownContent(xpp); 6687 eventType = nextNoWhitespace(xpp); 6688 } 6689 next(xpp); 6690 parseElementClose(res); 6691 return res; 6692 } 6693 6694 protected boolean parseConceptMapConceptMapGroupUnmappedComponentContent(int eventType, XmlPullParser xpp, 6695 ConceptMap owner, ConceptMap.ConceptMapGroupUnmappedComponent res) 6696 throws XmlPullParserException, IOException, FHIRFormatError { 6697 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 6698 res.setModeElement(parseEnumeration(xpp, ConceptMap.ConceptMapGroupUnmappedMode.NULL, 6699 new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory())); 6700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6701 res.setCodeElement(parseCode(xpp)); 6702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 6703 res.setDisplayElement(parseString(xpp)); 6704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 6705 res.setUrlElement(parseCanonical(xpp)); 6706 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6707 return false; 6708 return true; 6709 } 6710 6711 protected Condition parseCondition(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 6712 Condition res = new Condition(); 6713 parseDomainResourceAttributes(xpp, res); 6714 next(xpp); 6715 int eventType = nextNoWhitespace(xpp); 6716 while (eventType != XmlPullParser.END_TAG) { 6717 if (!parseConditionContent(eventType, xpp, res)) 6718 unknownContent(xpp); 6719 eventType = nextNoWhitespace(xpp); 6720 } 6721 next(xpp); 6722 parseElementClose(res); 6723 return res; 6724 } 6725 6726 protected boolean parseConditionContent(int eventType, XmlPullParser xpp, Condition res) 6727 throws XmlPullParserException, IOException, FHIRFormatError { 6728 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6729 res.getIdentifier().add(parseIdentifier(xpp)); 6730 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalStatus")) { 6731 res.setClinicalStatus(parseCodeableConcept(xpp)); 6732 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationStatus")) { 6733 res.setVerificationStatus(parseCodeableConcept(xpp)); 6734 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 6735 res.getCategory().add(parseCodeableConcept(xpp)); 6736 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 6737 res.setSeverity(parseCodeableConcept(xpp)); 6738 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6739 res.setCode(parseCodeableConcept(xpp)); 6740 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 6741 res.getBodySite().add(parseCodeableConcept(xpp)); 6742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 6743 res.setSubject(parseReference(xpp)); 6744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 6745 res.setEncounter(parseReference(xpp)); 6746 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { 6747 res.setOnset(parseType("onset", xpp)); 6748 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "abatement")) { 6749 res.setAbatement(parseType("abatement", xpp)); 6750 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedDate")) { 6751 res.setRecordedDateElement(parseDateTime(xpp)); 6752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { 6753 res.setRecorder(parseReference(xpp)); 6754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { 6755 res.setAsserter(parseReference(xpp)); 6756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stage")) { 6757 res.getStage().add(parseConditionConditionStageComponent(xpp, res)); 6758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evidence")) { 6759 res.getEvidence().add(parseConditionConditionEvidenceComponent(xpp, res)); 6760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 6761 res.getNote().add(parseAnnotation(xpp)); 6762 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6763 return false; 6764 return true; 6765 } 6766 6767 protected Condition.ConditionStageComponent parseConditionConditionStageComponent(XmlPullParser xpp, Condition owner) 6768 throws XmlPullParserException, IOException, FHIRFormatError { 6769 Condition.ConditionStageComponent res = new Condition.ConditionStageComponent(); 6770 parseBackboneAttributes(xpp, res); 6771 next(xpp); 6772 int eventType = nextNoWhitespace(xpp); 6773 while (eventType != XmlPullParser.END_TAG) { 6774 if (!parseConditionConditionStageComponentContent(eventType, xpp, owner, res)) 6775 unknownContent(xpp); 6776 eventType = nextNoWhitespace(xpp); 6777 } 6778 next(xpp); 6779 parseElementClose(res); 6780 return res; 6781 } 6782 6783 protected boolean parseConditionConditionStageComponentContent(int eventType, XmlPullParser xpp, Condition owner, 6784 Condition.ConditionStageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6785 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("summary")) { 6786 res.setSummary(parseCodeableConcept(xpp)); 6787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assessment")) { 6788 res.getAssessment().add(parseReference(xpp)); 6789 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 6790 res.setType(parseCodeableConcept(xpp)); 6791 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6792 return false; 6793 return true; 6794 } 6795 6796 protected Condition.ConditionEvidenceComponent parseConditionConditionEvidenceComponent(XmlPullParser xpp, 6797 Condition owner) throws XmlPullParserException, IOException, FHIRFormatError { 6798 Condition.ConditionEvidenceComponent res = new Condition.ConditionEvidenceComponent(); 6799 parseBackboneAttributes(xpp, res); 6800 next(xpp); 6801 int eventType = nextNoWhitespace(xpp); 6802 while (eventType != XmlPullParser.END_TAG) { 6803 if (!parseConditionConditionEvidenceComponentContent(eventType, xpp, owner, res)) 6804 unknownContent(xpp); 6805 eventType = nextNoWhitespace(xpp); 6806 } 6807 next(xpp); 6808 parseElementClose(res); 6809 return res; 6810 } 6811 6812 protected boolean parseConditionConditionEvidenceComponentContent(int eventType, XmlPullParser xpp, Condition owner, 6813 Condition.ConditionEvidenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6814 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6815 res.getCode().add(parseCodeableConcept(xpp)); 6816 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 6817 res.getDetail().add(parseReference(xpp)); 6818 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6819 return false; 6820 return true; 6821 } 6822 6823 protected Consent parseConsent(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 6824 Consent res = new Consent(); 6825 parseDomainResourceAttributes(xpp, res); 6826 next(xpp); 6827 int eventType = nextNoWhitespace(xpp); 6828 while (eventType != XmlPullParser.END_TAG) { 6829 if (!parseConsentContent(eventType, xpp, res)) 6830 unknownContent(xpp); 6831 eventType = nextNoWhitespace(xpp); 6832 } 6833 next(xpp); 6834 parseElementClose(res); 6835 return res; 6836 } 6837 6838 protected boolean parseConsentContent(int eventType, XmlPullParser xpp, Consent res) 6839 throws XmlPullParserException, IOException, FHIRFormatError { 6840 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 6841 res.getIdentifier().add(parseIdentifier(xpp)); 6842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 6843 res.setStatusElement(parseEnumeration(xpp, Consent.ConsentState.NULL, new Consent.ConsentStateEnumFactory())); 6844 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scope")) { 6845 res.setScope(parseCodeableConcept(xpp)); 6846 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 6847 res.getCategory().add(parseCodeableConcept(xpp)); 6848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 6849 res.setPatient(parseReference(xpp)); 6850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { 6851 res.setDateTimeElement(parseDateTime(xpp)); 6852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 6853 res.getPerformer().add(parseReference(xpp)); 6854 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 6855 res.getOrganization().add(parseReference(xpp)); 6856 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "source")) { 6857 res.setSource(parseType("source", xpp)); 6858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { 6859 res.getPolicy().add(parseConsentConsentPolicyComponent(xpp, res)); 6860 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyRule")) { 6861 res.setPolicyRule(parseCodeableConcept(xpp)); 6862 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verification")) { 6863 res.getVerification().add(parseConsentConsentVerificationComponent(xpp, res)); 6864 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { 6865 res.setProvision(parseConsentprovisionComponent(xpp, res)); 6866 } else if (!parseDomainResourceContent(eventType, xpp, res)) 6867 return false; 6868 return true; 6869 } 6870 6871 protected Consent.ConsentPolicyComponent parseConsentConsentPolicyComponent(XmlPullParser xpp, Consent owner) 6872 throws XmlPullParserException, IOException, FHIRFormatError { 6873 Consent.ConsentPolicyComponent res = new Consent.ConsentPolicyComponent(); 6874 parseBackboneAttributes(xpp, res); 6875 next(xpp); 6876 int eventType = nextNoWhitespace(xpp); 6877 while (eventType != XmlPullParser.END_TAG) { 6878 if (!parseConsentConsentPolicyComponentContent(eventType, xpp, owner, res)) 6879 unknownContent(xpp); 6880 eventType = nextNoWhitespace(xpp); 6881 } 6882 next(xpp); 6883 parseElementClose(res); 6884 return res; 6885 } 6886 6887 protected boolean parseConsentConsentPolicyComponentContent(int eventType, XmlPullParser xpp, Consent owner, 6888 Consent.ConsentPolicyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6889 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 6890 res.setAuthorityElement(parseUri(xpp)); 6891 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 6892 res.setUriElement(parseUri(xpp)); 6893 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6894 return false; 6895 return true; 6896 } 6897 6898 protected Consent.ConsentVerificationComponent parseConsentConsentVerificationComponent(XmlPullParser xpp, 6899 Consent owner) throws XmlPullParserException, IOException, FHIRFormatError { 6900 Consent.ConsentVerificationComponent res = new Consent.ConsentVerificationComponent(); 6901 parseBackboneAttributes(xpp, res); 6902 next(xpp); 6903 int eventType = nextNoWhitespace(xpp); 6904 while (eventType != XmlPullParser.END_TAG) { 6905 if (!parseConsentConsentVerificationComponentContent(eventType, xpp, owner, res)) 6906 unknownContent(xpp); 6907 eventType = nextNoWhitespace(xpp); 6908 } 6909 next(xpp); 6910 parseElementClose(res); 6911 return res; 6912 } 6913 6914 protected boolean parseConsentConsentVerificationComponentContent(int eventType, XmlPullParser xpp, Consent owner, 6915 Consent.ConsentVerificationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6916 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verified")) { 6917 res.setVerifiedElement(parseBoolean(xpp)); 6918 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verifiedWith")) { 6919 res.setVerifiedWith(parseReference(xpp)); 6920 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("verificationDate")) { 6921 res.setVerificationDateElement(parseDateTime(xpp)); 6922 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6923 return false; 6924 return true; 6925 } 6926 6927 protected Consent.ProvisionComponent parseConsentprovisionComponent(XmlPullParser xpp, Consent owner) 6928 throws XmlPullParserException, IOException, FHIRFormatError { 6929 Consent.ProvisionComponent res = new Consent.ProvisionComponent(); 6930 parseBackboneAttributes(xpp, res); 6931 next(xpp); 6932 int eventType = nextNoWhitespace(xpp); 6933 while (eventType != XmlPullParser.END_TAG) { 6934 if (!parseConsentprovisionComponentContent(eventType, xpp, owner, res)) 6935 unknownContent(xpp); 6936 eventType = nextNoWhitespace(xpp); 6937 } 6938 next(xpp); 6939 parseElementClose(res); 6940 return res; 6941 } 6942 6943 protected boolean parseConsentprovisionComponentContent(int eventType, XmlPullParser xpp, Consent owner, 6944 Consent.ProvisionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6945 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 6946 res.setTypeElement( 6947 parseEnumeration(xpp, Consent.ConsentProvisionType.NULL, new Consent.ConsentProvisionTypeEnumFactory())); 6948 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 6949 res.setPeriod(parsePeriod(xpp)); 6950 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 6951 res.getActor().add(parseConsentprovisionActorComponent(xpp, owner)); 6952 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 6953 res.getAction().add(parseCodeableConcept(xpp)); 6954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { 6955 res.getSecurityLabel().add(parseCoding(xpp)); 6956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 6957 res.getPurpose().add(parseCoding(xpp)); 6958 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 6959 res.getClass_().add(parseCoding(xpp)); 6960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 6961 res.getCode().add(parseCodeableConcept(xpp)); 6962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataPeriod")) { 6963 res.setDataPeriod(parsePeriod(xpp)); 6964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("data")) { 6965 res.getData().add(parseConsentprovisionDataComponent(xpp, owner)); 6966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provision")) { 6967 res.getProvision().add(parseConsentprovisionComponent(xpp, owner)); 6968 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6969 return false; 6970 return true; 6971 } 6972 6973 protected Consent.provisionActorComponent parseConsentprovisionActorComponent(XmlPullParser xpp, Consent owner) 6974 throws XmlPullParserException, IOException, FHIRFormatError { 6975 Consent.provisionActorComponent res = new Consent.provisionActorComponent(); 6976 parseBackboneAttributes(xpp, res); 6977 next(xpp); 6978 int eventType = nextNoWhitespace(xpp); 6979 while (eventType != XmlPullParser.END_TAG) { 6980 if (!parseConsentprovisionActorComponentContent(eventType, xpp, owner, res)) 6981 unknownContent(xpp); 6982 eventType = nextNoWhitespace(xpp); 6983 } 6984 next(xpp); 6985 parseElementClose(res); 6986 return res; 6987 } 6988 6989 protected boolean parseConsentprovisionActorComponentContent(int eventType, XmlPullParser xpp, Consent owner, 6990 Consent.provisionActorComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 6991 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 6992 res.setRole(parseCodeableConcept(xpp)); 6993 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 6994 res.setReference(parseReference(xpp)); 6995 } else if (!parseBackboneElementContent(eventType, xpp, res)) 6996 return false; 6997 return true; 6998 } 6999 7000 protected Consent.provisionDataComponent parseConsentprovisionDataComponent(XmlPullParser xpp, Consent owner) 7001 throws XmlPullParserException, IOException, FHIRFormatError { 7002 Consent.provisionDataComponent res = new Consent.provisionDataComponent(); 7003 parseBackboneAttributes(xpp, res); 7004 next(xpp); 7005 int eventType = nextNoWhitespace(xpp); 7006 while (eventType != XmlPullParser.END_TAG) { 7007 if (!parseConsentprovisionDataComponentContent(eventType, xpp, owner, res)) 7008 unknownContent(xpp); 7009 eventType = nextNoWhitespace(xpp); 7010 } 7011 next(xpp); 7012 parseElementClose(res); 7013 return res; 7014 } 7015 7016 protected boolean parseConsentprovisionDataComponentContent(int eventType, XmlPullParser xpp, Consent owner, 7017 Consent.provisionDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7018 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("meaning")) { 7019 res.setMeaningElement( 7020 parseEnumeration(xpp, Consent.ConsentDataMeaning.NULL, new Consent.ConsentDataMeaningEnumFactory())); 7021 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 7022 res.setReference(parseReference(xpp)); 7023 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7024 return false; 7025 return true; 7026 } 7027 7028 protected Contract parseContract(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 7029 Contract res = new Contract(); 7030 parseDomainResourceAttributes(xpp, res); 7031 next(xpp); 7032 int eventType = nextNoWhitespace(xpp); 7033 while (eventType != XmlPullParser.END_TAG) { 7034 if (!parseContractContent(eventType, xpp, res)) 7035 unknownContent(xpp); 7036 eventType = nextNoWhitespace(xpp); 7037 } 7038 next(xpp); 7039 parseElementClose(res); 7040 return res; 7041 } 7042 7043 protected boolean parseContractContent(int eventType, XmlPullParser xpp, Contract res) 7044 throws XmlPullParserException, IOException, FHIRFormatError { 7045 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7046 res.getIdentifier().add(parseIdentifier(xpp)); 7047 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 7048 res.setUrlElement(parseUri(xpp)); 7049 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 7050 res.setVersionElement(parseString(xpp)); 7051 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 7052 res.setStatusElement( 7053 parseEnumeration(xpp, Contract.ContractStatus.NULL, new Contract.ContractStatusEnumFactory())); 7054 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legalState")) { 7055 res.setLegalState(parseCodeableConcept(xpp)); 7056 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 7057 res.setInstantiatesCanonical(parseReference(xpp)); 7058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 7059 res.setInstantiatesUriElement(parseUri(xpp)); 7060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentDerivative")) { 7061 res.setContentDerivative(parseCodeableConcept(xpp)); 7062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 7063 res.setIssuedElement(parseDateTime(xpp)); 7064 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { 7065 res.setApplies(parsePeriod(xpp)); 7066 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationType")) { 7067 res.setExpirationType(parseCodeableConcept(xpp)); 7068 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 7069 res.getSubject().add(parseReference(xpp)); 7070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 7071 res.getAuthority().add(parseReference(xpp)); 7072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { 7073 res.getDomain().add(parseReference(xpp)); 7074 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 7075 res.getSite().add(parseReference(xpp)); 7076 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 7077 res.setNameElement(parseString(xpp)); 7078 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 7079 res.setTitleElement(parseString(xpp)); 7080 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 7081 res.setSubtitleElement(parseString(xpp)); 7082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 7083 res.getAlias().add(parseString(xpp)); 7084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 7085 res.setAuthor(parseReference(xpp)); 7086 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scope")) { 7087 res.setScope(parseCodeableConcept(xpp)); 7088 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "topic")) { 7089 res.setTopic(parseType("topic", xpp)); 7090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7091 res.setType(parseCodeableConcept(xpp)); 7092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 7093 res.getSubType().add(parseCodeableConcept(xpp)); 7094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentDefinition")) { 7095 res.setContentDefinition(parseContractContentDefinitionComponent(xpp, res)); 7096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { 7097 res.getTerm().add(parseContractTermComponent(xpp, res)); 7098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 7099 res.getSupportingInfo().add(parseReference(xpp)); 7100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { 7101 res.getRelevantHistory().add(parseReference(xpp)); 7102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signer")) { 7103 res.getSigner().add(parseContractSignatoryComponent(xpp, res)); 7104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("friendly")) { 7105 res.getFriendly().add(parseContractFriendlyLanguageComponent(xpp, res)); 7106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legal")) { 7107 res.getLegal().add(parseContractLegalLanguageComponent(xpp, res)); 7108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { 7109 res.getRule().add(parseContractComputableLanguageComponent(xpp, res)); 7110 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "legallyBinding")) { 7111 res.setLegallyBinding(parseType("legallyBinding", xpp)); 7112 } else if (!parseDomainResourceContent(eventType, xpp, res)) 7113 return false; 7114 return true; 7115 } 7116 7117 protected Contract.ContentDefinitionComponent parseContractContentDefinitionComponent(XmlPullParser xpp, 7118 Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { 7119 Contract.ContentDefinitionComponent res = new Contract.ContentDefinitionComponent(); 7120 parseBackboneAttributes(xpp, res); 7121 next(xpp); 7122 int eventType = nextNoWhitespace(xpp); 7123 while (eventType != XmlPullParser.END_TAG) { 7124 if (!parseContractContentDefinitionComponentContent(eventType, xpp, owner, res)) 7125 unknownContent(xpp); 7126 eventType = nextNoWhitespace(xpp); 7127 } 7128 next(xpp); 7129 parseElementClose(res); 7130 return res; 7131 } 7132 7133 protected boolean parseContractContentDefinitionComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7134 Contract.ContentDefinitionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7135 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7136 res.setType(parseCodeableConcept(xpp)); 7137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 7138 res.setSubType(parseCodeableConcept(xpp)); 7139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 7140 res.setPublisher(parseReference(xpp)); 7141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publicationDate")) { 7142 res.setPublicationDateElement(parseDateTime(xpp)); 7143 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publicationStatus")) { 7144 res.setPublicationStatusElement(parseEnumeration(xpp, Contract.ContractPublicationStatus.NULL, 7145 new Contract.ContractPublicationStatusEnumFactory())); 7146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 7147 res.setCopyrightElement(parseMarkdown(xpp)); 7148 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7149 return false; 7150 return true; 7151 } 7152 7153 protected Contract.TermComponent parseContractTermComponent(XmlPullParser xpp, Contract owner) 7154 throws XmlPullParserException, IOException, FHIRFormatError { 7155 Contract.TermComponent res = new Contract.TermComponent(); 7156 parseBackboneAttributes(xpp, res); 7157 next(xpp); 7158 int eventType = nextNoWhitespace(xpp); 7159 while (eventType != XmlPullParser.END_TAG) { 7160 if (!parseContractTermComponentContent(eventType, xpp, owner, res)) 7161 unknownContent(xpp); 7162 eventType = nextNoWhitespace(xpp); 7163 } 7164 next(xpp); 7165 parseElementClose(res); 7166 return res; 7167 } 7168 7169 protected boolean parseContractTermComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7170 Contract.TermComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7171 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7172 res.setIdentifier(parseIdentifier(xpp)); 7173 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 7174 res.setIssuedElement(parseDateTime(xpp)); 7175 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applies")) { 7176 res.setApplies(parsePeriod(xpp)); 7177 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "topic")) { 7178 res.setTopic(parseType("topic", xpp)); 7179 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7180 res.setType(parseCodeableConcept(xpp)); 7181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 7182 res.setSubType(parseCodeableConcept(xpp)); 7183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 7184 res.setTextElement(parseString(xpp)); 7185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { 7186 res.getSecurityLabel().add(parseContractSecurityLabelComponent(xpp, owner)); 7187 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offer")) { 7188 res.setOffer(parseContractContractOfferComponent(xpp, owner)); 7189 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asset")) { 7190 res.getAsset().add(parseContractContractAssetComponent(xpp, owner)); 7191 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 7192 res.getAction().add(parseContractActionComponent(xpp, owner)); 7193 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 7194 res.getGroup().add(parseContractTermComponent(xpp, owner)); 7195 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7196 return false; 7197 return true; 7198 } 7199 7200 protected Contract.SecurityLabelComponent parseContractSecurityLabelComponent(XmlPullParser xpp, Contract owner) 7201 throws XmlPullParserException, IOException, FHIRFormatError { 7202 Contract.SecurityLabelComponent res = new Contract.SecurityLabelComponent(); 7203 parseBackboneAttributes(xpp, res); 7204 next(xpp); 7205 int eventType = nextNoWhitespace(xpp); 7206 while (eventType != XmlPullParser.END_TAG) { 7207 if (!parseContractSecurityLabelComponentContent(eventType, xpp, owner, res)) 7208 unknownContent(xpp); 7209 eventType = nextNoWhitespace(xpp); 7210 } 7211 next(xpp); 7212 parseElementClose(res); 7213 return res; 7214 } 7215 7216 protected boolean parseContractSecurityLabelComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7217 Contract.SecurityLabelComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7218 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 7219 res.getNumber().add(parseUnsignedInt(xpp)); 7220 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 7221 res.setClassification(parseCoding(xpp)); 7222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 7223 res.getCategory().add(parseCoding(xpp)); 7224 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("control")) { 7225 res.getControl().add(parseCoding(xpp)); 7226 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7227 return false; 7228 return true; 7229 } 7230 7231 protected Contract.ContractOfferComponent parseContractContractOfferComponent(XmlPullParser xpp, Contract owner) 7232 throws XmlPullParserException, IOException, FHIRFormatError { 7233 Contract.ContractOfferComponent res = new Contract.ContractOfferComponent(); 7234 parseBackboneAttributes(xpp, res); 7235 next(xpp); 7236 int eventType = nextNoWhitespace(xpp); 7237 while (eventType != XmlPullParser.END_TAG) { 7238 if (!parseContractContractOfferComponentContent(eventType, xpp, owner, res)) 7239 unknownContent(xpp); 7240 eventType = nextNoWhitespace(xpp); 7241 } 7242 next(xpp); 7243 parseElementClose(res); 7244 return res; 7245 } 7246 7247 protected boolean parseContractContractOfferComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7248 Contract.ContractOfferComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7249 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7250 res.getIdentifier().add(parseIdentifier(xpp)); 7251 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 7252 res.getParty().add(parseContractContractPartyComponent(xpp, owner)); 7253 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 7254 res.setTopic(parseReference(xpp)); 7255 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7256 res.setType(parseCodeableConcept(xpp)); 7257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("decision")) { 7258 res.setDecision(parseCodeableConcept(xpp)); 7259 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("decisionMode")) { 7260 res.getDecisionMode().add(parseCodeableConcept(xpp)); 7261 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answer")) { 7262 res.getAnswer().add(parseContractAnswerComponent(xpp, owner)); 7263 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 7264 res.setTextElement(parseString(xpp)); 7265 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 7266 res.getLinkId().add(parseString(xpp)); 7267 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabelNumber")) { 7268 res.getSecurityLabelNumber().add(parseUnsignedInt(xpp)); 7269 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7270 return false; 7271 return true; 7272 } 7273 7274 protected Contract.ContractPartyComponent parseContractContractPartyComponent(XmlPullParser xpp, Contract owner) 7275 throws XmlPullParserException, IOException, FHIRFormatError { 7276 Contract.ContractPartyComponent res = new Contract.ContractPartyComponent(); 7277 parseBackboneAttributes(xpp, res); 7278 next(xpp); 7279 int eventType = nextNoWhitespace(xpp); 7280 while (eventType != XmlPullParser.END_TAG) { 7281 if (!parseContractContractPartyComponentContent(eventType, xpp, owner, res)) 7282 unknownContent(xpp); 7283 eventType = nextNoWhitespace(xpp); 7284 } 7285 next(xpp); 7286 parseElementClose(res); 7287 return res; 7288 } 7289 7290 protected boolean parseContractContractPartyComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7291 Contract.ContractPartyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7292 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 7293 res.getReference().add(parseReference(xpp)); 7294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 7295 res.setRole(parseCodeableConcept(xpp)); 7296 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7297 return false; 7298 return true; 7299 } 7300 7301 protected Contract.AnswerComponent parseContractAnswerComponent(XmlPullParser xpp, Contract owner) 7302 throws XmlPullParserException, IOException, FHIRFormatError { 7303 Contract.AnswerComponent res = new Contract.AnswerComponent(); 7304 parseBackboneAttributes(xpp, res); 7305 next(xpp); 7306 int eventType = nextNoWhitespace(xpp); 7307 while (eventType != XmlPullParser.END_TAG) { 7308 if (!parseContractAnswerComponentContent(eventType, xpp, owner, res)) 7309 unknownContent(xpp); 7310 eventType = nextNoWhitespace(xpp); 7311 } 7312 next(xpp); 7313 parseElementClose(res); 7314 return res; 7315 } 7316 7317 protected boolean parseContractAnswerComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7318 Contract.AnswerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7319 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 7320 res.setValue(parseType("value", xpp)); 7321 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7322 return false; 7323 return true; 7324 } 7325 7326 protected Contract.ContractAssetComponent parseContractContractAssetComponent(XmlPullParser xpp, Contract owner) 7327 throws XmlPullParserException, IOException, FHIRFormatError { 7328 Contract.ContractAssetComponent res = new Contract.ContractAssetComponent(); 7329 parseBackboneAttributes(xpp, res); 7330 next(xpp); 7331 int eventType = nextNoWhitespace(xpp); 7332 while (eventType != XmlPullParser.END_TAG) { 7333 if (!parseContractContractAssetComponentContent(eventType, xpp, owner, res)) 7334 unknownContent(xpp); 7335 eventType = nextNoWhitespace(xpp); 7336 } 7337 next(xpp); 7338 parseElementClose(res); 7339 return res; 7340 } 7341 7342 protected boolean parseContractContractAssetComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7343 Contract.ContractAssetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7344 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scope")) { 7345 res.setScope(parseCodeableConcept(xpp)); 7346 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7347 res.getType().add(parseCodeableConcept(xpp)); 7348 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeReference")) { 7349 res.getTypeReference().add(parseReference(xpp)); 7350 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { 7351 res.getSubtype().add(parseCodeableConcept(xpp)); 7352 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 7353 res.setRelationship(parseCoding(xpp)); 7354 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 7355 res.getContext().add(parseContractAssetContextComponent(xpp, owner)); 7356 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 7357 res.setConditionElement(parseString(xpp)); 7358 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("periodType")) { 7359 res.getPeriodType().add(parseCodeableConcept(xpp)); 7360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 7361 res.getPeriod().add(parsePeriod(xpp)); 7362 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usePeriod")) { 7363 res.getUsePeriod().add(parsePeriod(xpp)); 7364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 7365 res.setTextElement(parseString(xpp)); 7366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 7367 res.getLinkId().add(parseString(xpp)); 7368 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answer")) { 7369 res.getAnswer().add(parseContractAnswerComponent(xpp, owner)); 7370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabelNumber")) { 7371 res.getSecurityLabelNumber().add(parseUnsignedInt(xpp)); 7372 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valuedItem")) { 7373 res.getValuedItem().add(parseContractValuedItemComponent(xpp, owner)); 7374 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7375 return false; 7376 return true; 7377 } 7378 7379 protected Contract.AssetContextComponent parseContractAssetContextComponent(XmlPullParser xpp, Contract owner) 7380 throws XmlPullParserException, IOException, FHIRFormatError { 7381 Contract.AssetContextComponent res = new Contract.AssetContextComponent(); 7382 parseBackboneAttributes(xpp, res); 7383 next(xpp); 7384 int eventType = nextNoWhitespace(xpp); 7385 while (eventType != XmlPullParser.END_TAG) { 7386 if (!parseContractAssetContextComponentContent(eventType, xpp, owner, res)) 7387 unknownContent(xpp); 7388 eventType = nextNoWhitespace(xpp); 7389 } 7390 next(xpp); 7391 parseElementClose(res); 7392 return res; 7393 } 7394 7395 protected boolean parseContractAssetContextComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7396 Contract.AssetContextComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7397 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 7398 res.setReference(parseReference(xpp)); 7399 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 7400 res.getCode().add(parseCodeableConcept(xpp)); 7401 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 7402 res.setTextElement(parseString(xpp)); 7403 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7404 return false; 7405 return true; 7406 } 7407 7408 protected Contract.ValuedItemComponent parseContractValuedItemComponent(XmlPullParser xpp, Contract owner) 7409 throws XmlPullParserException, IOException, FHIRFormatError { 7410 Contract.ValuedItemComponent res = new Contract.ValuedItemComponent(); 7411 parseBackboneAttributes(xpp, res); 7412 next(xpp); 7413 int eventType = nextNoWhitespace(xpp); 7414 while (eventType != XmlPullParser.END_TAG) { 7415 if (!parseContractValuedItemComponentContent(eventType, xpp, owner, res)) 7416 unknownContent(xpp); 7417 eventType = nextNoWhitespace(xpp); 7418 } 7419 next(xpp); 7420 parseElementClose(res); 7421 return res; 7422 } 7423 7424 protected boolean parseContractValuedItemComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7425 Contract.ValuedItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7426 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "entity")) { 7427 res.setEntity(parseType("entity", xpp)); 7428 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7429 res.setIdentifier(parseIdentifier(xpp)); 7430 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectiveTime")) { 7431 res.setEffectiveTimeElement(parseDateTime(xpp)); 7432 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 7433 res.setQuantity(parseQuantity(xpp)); 7434 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 7435 res.setUnitPrice(parseMoney(xpp)); 7436 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 7437 res.setFactorElement(parseDecimal(xpp)); 7438 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("points")) { 7439 res.setPointsElement(parseDecimal(xpp)); 7440 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 7441 res.setNet(parseMoney(xpp)); 7442 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { 7443 res.setPaymentElement(parseString(xpp)); 7444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentDate")) { 7445 res.setPaymentDateElement(parseDateTime(xpp)); 7446 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 7447 res.setResponsible(parseReference(xpp)); 7448 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 7449 res.setRecipient(parseReference(xpp)); 7450 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 7451 res.getLinkId().add(parseString(xpp)); 7452 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabelNumber")) { 7453 res.getSecurityLabelNumber().add(parseUnsignedInt(xpp)); 7454 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7455 return false; 7456 return true; 7457 } 7458 7459 protected Contract.ActionComponent parseContractActionComponent(XmlPullParser xpp, Contract owner) 7460 throws XmlPullParserException, IOException, FHIRFormatError { 7461 Contract.ActionComponent res = new Contract.ActionComponent(); 7462 parseBackboneAttributes(xpp, res); 7463 next(xpp); 7464 int eventType = nextNoWhitespace(xpp); 7465 while (eventType != XmlPullParser.END_TAG) { 7466 if (!parseContractActionComponentContent(eventType, xpp, owner, res)) 7467 unknownContent(xpp); 7468 eventType = nextNoWhitespace(xpp); 7469 } 7470 next(xpp); 7471 parseElementClose(res); 7472 return res; 7473 } 7474 7475 protected boolean parseContractActionComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7476 Contract.ActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7477 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 7478 res.setDoNotPerformElement(parseBoolean(xpp)); 7479 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7480 res.setType(parseCodeableConcept(xpp)); 7481 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 7482 res.getSubject().add(parseContractActionSubjectComponent(xpp, owner)); 7483 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 7484 res.setIntent(parseCodeableConcept(xpp)); 7485 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 7486 res.getLinkId().add(parseString(xpp)); 7487 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 7488 res.setStatus(parseCodeableConcept(xpp)); 7489 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 7490 res.setContext(parseReference(xpp)); 7491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextLinkId")) { 7492 res.getContextLinkId().add(parseString(xpp)); 7493 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 7494 res.setOccurrence(parseType("occurrence", xpp)); 7495 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 7496 res.getRequester().add(parseReference(xpp)); 7497 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requesterLinkId")) { 7498 res.getRequesterLinkId().add(parseString(xpp)); 7499 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { 7500 res.getPerformerType().add(parseCodeableConcept(xpp)); 7501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerRole")) { 7502 res.setPerformerRole(parseCodeableConcept(xpp)); 7503 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 7504 res.setPerformer(parseReference(xpp)); 7505 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerLinkId")) { 7506 res.getPerformerLinkId().add(parseString(xpp)); 7507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 7508 res.getReasonCode().add(parseCodeableConcept(xpp)); 7509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 7510 res.getReasonReference().add(parseReference(xpp)); 7511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 7512 res.getReason().add(parseString(xpp)); 7513 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonLinkId")) { 7514 res.getReasonLinkId().add(parseString(xpp)); 7515 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 7516 res.getNote().add(parseAnnotation(xpp)); 7517 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabelNumber")) { 7518 res.getSecurityLabelNumber().add(parseUnsignedInt(xpp)); 7519 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7520 return false; 7521 return true; 7522 } 7523 7524 protected Contract.ActionSubjectComponent parseContractActionSubjectComponent(XmlPullParser xpp, Contract owner) 7525 throws XmlPullParserException, IOException, FHIRFormatError { 7526 Contract.ActionSubjectComponent res = new Contract.ActionSubjectComponent(); 7527 parseBackboneAttributes(xpp, res); 7528 next(xpp); 7529 int eventType = nextNoWhitespace(xpp); 7530 while (eventType != XmlPullParser.END_TAG) { 7531 if (!parseContractActionSubjectComponentContent(eventType, xpp, owner, res)) 7532 unknownContent(xpp); 7533 eventType = nextNoWhitespace(xpp); 7534 } 7535 next(xpp); 7536 parseElementClose(res); 7537 return res; 7538 } 7539 7540 protected boolean parseContractActionSubjectComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7541 Contract.ActionSubjectComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7542 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 7543 res.getReference().add(parseReference(xpp)); 7544 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 7545 res.setRole(parseCodeableConcept(xpp)); 7546 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7547 return false; 7548 return true; 7549 } 7550 7551 protected Contract.SignatoryComponent parseContractSignatoryComponent(XmlPullParser xpp, Contract owner) 7552 throws XmlPullParserException, IOException, FHIRFormatError { 7553 Contract.SignatoryComponent res = new Contract.SignatoryComponent(); 7554 parseBackboneAttributes(xpp, res); 7555 next(xpp); 7556 int eventType = nextNoWhitespace(xpp); 7557 while (eventType != XmlPullParser.END_TAG) { 7558 if (!parseContractSignatoryComponentContent(eventType, xpp, owner, res)) 7559 unknownContent(xpp); 7560 eventType = nextNoWhitespace(xpp); 7561 } 7562 next(xpp); 7563 parseElementClose(res); 7564 return res; 7565 } 7566 7567 protected boolean parseContractSignatoryComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7568 Contract.SignatoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7569 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7570 res.setType(parseCoding(xpp)); 7571 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 7572 res.setParty(parseReference(xpp)); 7573 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { 7574 res.getSignature().add(parseSignature(xpp)); 7575 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7576 return false; 7577 return true; 7578 } 7579 7580 protected Contract.FriendlyLanguageComponent parseContractFriendlyLanguageComponent(XmlPullParser xpp, Contract owner) 7581 throws XmlPullParserException, IOException, FHIRFormatError { 7582 Contract.FriendlyLanguageComponent res = new Contract.FriendlyLanguageComponent(); 7583 parseBackboneAttributes(xpp, res); 7584 next(xpp); 7585 int eventType = nextNoWhitespace(xpp); 7586 while (eventType != XmlPullParser.END_TAG) { 7587 if (!parseContractFriendlyLanguageComponentContent(eventType, xpp, owner, res)) 7588 unknownContent(xpp); 7589 eventType = nextNoWhitespace(xpp); 7590 } 7591 next(xpp); 7592 parseElementClose(res); 7593 return res; 7594 } 7595 7596 protected boolean parseContractFriendlyLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7597 Contract.FriendlyLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7598 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { 7599 res.setContent(parseType("content", xpp)); 7600 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7601 return false; 7602 return true; 7603 } 7604 7605 protected Contract.LegalLanguageComponent parseContractLegalLanguageComponent(XmlPullParser xpp, Contract owner) 7606 throws XmlPullParserException, IOException, FHIRFormatError { 7607 Contract.LegalLanguageComponent res = new Contract.LegalLanguageComponent(); 7608 parseBackboneAttributes(xpp, res); 7609 next(xpp); 7610 int eventType = nextNoWhitespace(xpp); 7611 while (eventType != XmlPullParser.END_TAG) { 7612 if (!parseContractLegalLanguageComponentContent(eventType, xpp, owner, res)) 7613 unknownContent(xpp); 7614 eventType = nextNoWhitespace(xpp); 7615 } 7616 next(xpp); 7617 parseElementClose(res); 7618 return res; 7619 } 7620 7621 protected boolean parseContractLegalLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7622 Contract.LegalLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7623 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { 7624 res.setContent(parseType("content", xpp)); 7625 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7626 return false; 7627 return true; 7628 } 7629 7630 protected Contract.ComputableLanguageComponent parseContractComputableLanguageComponent(XmlPullParser xpp, 7631 Contract owner) throws XmlPullParserException, IOException, FHIRFormatError { 7632 Contract.ComputableLanguageComponent res = new Contract.ComputableLanguageComponent(); 7633 parseBackboneAttributes(xpp, res); 7634 next(xpp); 7635 int eventType = nextNoWhitespace(xpp); 7636 while (eventType != XmlPullParser.END_TAG) { 7637 if (!parseContractComputableLanguageComponentContent(eventType, xpp, owner, res)) 7638 unknownContent(xpp); 7639 eventType = nextNoWhitespace(xpp); 7640 } 7641 next(xpp); 7642 parseElementClose(res); 7643 return res; 7644 } 7645 7646 protected boolean parseContractComputableLanguageComponentContent(int eventType, XmlPullParser xpp, Contract owner, 7647 Contract.ComputableLanguageComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7648 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "content")) { 7649 res.setContent(parseType("content", xpp)); 7650 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7651 return false; 7652 return true; 7653 } 7654 7655 protected Coverage parseCoverage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 7656 Coverage res = new Coverage(); 7657 parseDomainResourceAttributes(xpp, res); 7658 next(xpp); 7659 int eventType = nextNoWhitespace(xpp); 7660 while (eventType != XmlPullParser.END_TAG) { 7661 if (!parseCoverageContent(eventType, xpp, res)) 7662 unknownContent(xpp); 7663 eventType = nextNoWhitespace(xpp); 7664 } 7665 next(xpp); 7666 parseElementClose(res); 7667 return res; 7668 } 7669 7670 protected boolean parseCoverageContent(int eventType, XmlPullParser xpp, Coverage res) 7671 throws XmlPullParserException, IOException, FHIRFormatError { 7672 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7673 res.getIdentifier().add(parseIdentifier(xpp)); 7674 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 7675 res.setStatusElement( 7676 parseEnumeration(xpp, Coverage.CoverageStatus.NULL, new Coverage.CoverageStatusEnumFactory())); 7677 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7678 res.setType(parseCodeableConcept(xpp)); 7679 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policyHolder")) { 7680 res.setPolicyHolder(parseReference(xpp)); 7681 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriber")) { 7682 res.setSubscriber(parseReference(xpp)); 7683 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subscriberId")) { 7684 res.setSubscriberIdElement(parseString(xpp)); 7685 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("beneficiary")) { 7686 res.setBeneficiary(parseReference(xpp)); 7687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { 7688 res.setDependentElement(parseString(xpp)); 7689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 7690 res.setRelationship(parseCodeableConcept(xpp)); 7691 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 7692 res.setPeriod(parsePeriod(xpp)); 7693 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payor")) { 7694 res.getPayor().add(parseReference(xpp)); 7695 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 7696 res.getClass_().add(parseCoverageClassComponent(xpp, res)); 7697 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("order")) { 7698 res.setOrderElement(parsePositiveInt(xpp)); 7699 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 7700 res.setNetworkElement(parseString(xpp)); 7701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("costToBeneficiary")) { 7702 res.getCostToBeneficiary().add(parseCoverageCostToBeneficiaryComponent(xpp, res)); 7703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subrogation")) { 7704 res.setSubrogationElement(parseBoolean(xpp)); 7705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contract")) { 7706 res.getContract().add(parseReference(xpp)); 7707 } else if (!parseDomainResourceContent(eventType, xpp, res)) 7708 return false; 7709 return true; 7710 } 7711 7712 protected Coverage.ClassComponent parseCoverageClassComponent(XmlPullParser xpp, Coverage owner) 7713 throws XmlPullParserException, IOException, FHIRFormatError { 7714 Coverage.ClassComponent res = new Coverage.ClassComponent(); 7715 parseBackboneAttributes(xpp, res); 7716 next(xpp); 7717 int eventType = nextNoWhitespace(xpp); 7718 while (eventType != XmlPullParser.END_TAG) { 7719 if (!parseCoverageClassComponentContent(eventType, xpp, owner, res)) 7720 unknownContent(xpp); 7721 eventType = nextNoWhitespace(xpp); 7722 } 7723 next(xpp); 7724 parseElementClose(res); 7725 return res; 7726 } 7727 7728 protected boolean parseCoverageClassComponentContent(int eventType, XmlPullParser xpp, Coverage owner, 7729 Coverage.ClassComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7730 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7731 res.setType(parseCodeableConcept(xpp)); 7732 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 7733 res.setValueElement(parseString(xpp)); 7734 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 7735 res.setNameElement(parseString(xpp)); 7736 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7737 return false; 7738 return true; 7739 } 7740 7741 protected Coverage.CostToBeneficiaryComponent parseCoverageCostToBeneficiaryComponent(XmlPullParser xpp, 7742 Coverage owner) throws XmlPullParserException, IOException, FHIRFormatError { 7743 Coverage.CostToBeneficiaryComponent res = new Coverage.CostToBeneficiaryComponent(); 7744 parseBackboneAttributes(xpp, res); 7745 next(xpp); 7746 int eventType = nextNoWhitespace(xpp); 7747 while (eventType != XmlPullParser.END_TAG) { 7748 if (!parseCoverageCostToBeneficiaryComponentContent(eventType, xpp, owner, res)) 7749 unknownContent(xpp); 7750 eventType = nextNoWhitespace(xpp); 7751 } 7752 next(xpp); 7753 parseElementClose(res); 7754 return res; 7755 } 7756 7757 protected boolean parseCoverageCostToBeneficiaryComponentContent(int eventType, XmlPullParser xpp, Coverage owner, 7758 Coverage.CostToBeneficiaryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7759 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7760 res.setType(parseCodeableConcept(xpp)); 7761 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 7762 res.setValue(parseType("value", xpp)); 7763 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exception")) { 7764 res.getException().add(parseCoverageExemptionComponent(xpp, owner)); 7765 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7766 return false; 7767 return true; 7768 } 7769 7770 protected Coverage.ExemptionComponent parseCoverageExemptionComponent(XmlPullParser xpp, Coverage owner) 7771 throws XmlPullParserException, IOException, FHIRFormatError { 7772 Coverage.ExemptionComponent res = new Coverage.ExemptionComponent(); 7773 parseBackboneAttributes(xpp, res); 7774 next(xpp); 7775 int eventType = nextNoWhitespace(xpp); 7776 while (eventType != XmlPullParser.END_TAG) { 7777 if (!parseCoverageExemptionComponentContent(eventType, xpp, owner, res)) 7778 unknownContent(xpp); 7779 eventType = nextNoWhitespace(xpp); 7780 } 7781 next(xpp); 7782 parseElementClose(res); 7783 return res; 7784 } 7785 7786 protected boolean parseCoverageExemptionComponentContent(int eventType, XmlPullParser xpp, Coverage owner, 7787 Coverage.ExemptionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 7788 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 7789 res.setType(parseCodeableConcept(xpp)); 7790 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 7791 res.setPeriod(parsePeriod(xpp)); 7792 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7793 return false; 7794 return true; 7795 } 7796 7797 protected CoverageEligibilityRequest parseCoverageEligibilityRequest(XmlPullParser xpp) 7798 throws XmlPullParserException, IOException, FHIRFormatError { 7799 CoverageEligibilityRequest res = new CoverageEligibilityRequest(); 7800 parseDomainResourceAttributes(xpp, res); 7801 next(xpp); 7802 int eventType = nextNoWhitespace(xpp); 7803 while (eventType != XmlPullParser.END_TAG) { 7804 if (!parseCoverageEligibilityRequestContent(eventType, xpp, res)) 7805 unknownContent(xpp); 7806 eventType = nextNoWhitespace(xpp); 7807 } 7808 next(xpp); 7809 parseElementClose(res); 7810 return res; 7811 } 7812 7813 protected boolean parseCoverageEligibilityRequestContent(int eventType, XmlPullParser xpp, 7814 CoverageEligibilityRequest res) throws XmlPullParserException, IOException, FHIRFormatError { 7815 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 7816 res.getIdentifier().add(parseIdentifier(xpp)); 7817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 7818 res.setStatusElement(parseEnumeration(xpp, CoverageEligibilityRequest.EligibilityRequestStatus.NULL, 7819 new CoverageEligibilityRequest.EligibilityRequestStatusEnumFactory())); 7820 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 7821 res.setPriority(parseCodeableConcept(xpp)); 7822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 7823 res.getPurpose().add(parseEnumeration(xpp, CoverageEligibilityRequest.EligibilityRequestPurpose.NULL, 7824 new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory())); 7825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 7826 res.setPatient(parseReference(xpp)); 7827 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 7828 res.setServiced(parseType("serviced", xpp)); 7829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 7830 res.setCreatedElement(parseDateTime(xpp)); 7831 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { 7832 res.setEnterer(parseReference(xpp)); 7833 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 7834 res.setProvider(parseReference(xpp)); 7835 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 7836 res.setInsurer(parseReference(xpp)); 7837 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { 7838 res.setFacility(parseReference(xpp)); 7839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 7840 res.getSupportingInfo().add(parseCoverageEligibilityRequestSupportingInformationComponent(xpp, res)); 7841 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 7842 res.getInsurance().add(parseCoverageEligibilityRequestInsuranceComponent(xpp, res)); 7843 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 7844 res.getItem().add(parseCoverageEligibilityRequestDetailsComponent(xpp, res)); 7845 } else if (!parseDomainResourceContent(eventType, xpp, res)) 7846 return false; 7847 return true; 7848 } 7849 7850 protected CoverageEligibilityRequest.SupportingInformationComponent parseCoverageEligibilityRequestSupportingInformationComponent( 7851 XmlPullParser xpp, CoverageEligibilityRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 7852 CoverageEligibilityRequest.SupportingInformationComponent res = new CoverageEligibilityRequest.SupportingInformationComponent(); 7853 parseBackboneAttributes(xpp, res); 7854 next(xpp); 7855 int eventType = nextNoWhitespace(xpp); 7856 while (eventType != XmlPullParser.END_TAG) { 7857 if (!parseCoverageEligibilityRequestSupportingInformationComponentContent(eventType, xpp, owner, res)) 7858 unknownContent(xpp); 7859 eventType = nextNoWhitespace(xpp); 7860 } 7861 next(xpp); 7862 parseElementClose(res); 7863 return res; 7864 } 7865 7866 protected boolean parseCoverageEligibilityRequestSupportingInformationComponentContent(int eventType, 7867 XmlPullParser xpp, CoverageEligibilityRequest owner, 7868 CoverageEligibilityRequest.SupportingInformationComponent res) 7869 throws XmlPullParserException, IOException, FHIRFormatError { 7870 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 7871 res.setSequenceElement(parsePositiveInt(xpp)); 7872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("information")) { 7873 res.setInformation(parseReference(xpp)); 7874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appliesToAll")) { 7875 res.setAppliesToAllElement(parseBoolean(xpp)); 7876 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7877 return false; 7878 return true; 7879 } 7880 7881 protected CoverageEligibilityRequest.InsuranceComponent parseCoverageEligibilityRequestInsuranceComponent( 7882 XmlPullParser xpp, CoverageEligibilityRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 7883 CoverageEligibilityRequest.InsuranceComponent res = new CoverageEligibilityRequest.InsuranceComponent(); 7884 parseBackboneAttributes(xpp, res); 7885 next(xpp); 7886 int eventType = nextNoWhitespace(xpp); 7887 while (eventType != XmlPullParser.END_TAG) { 7888 if (!parseCoverageEligibilityRequestInsuranceComponentContent(eventType, xpp, owner, res)) 7889 unknownContent(xpp); 7890 eventType = nextNoWhitespace(xpp); 7891 } 7892 next(xpp); 7893 parseElementClose(res); 7894 return res; 7895 } 7896 7897 protected boolean parseCoverageEligibilityRequestInsuranceComponentContent(int eventType, XmlPullParser xpp, 7898 CoverageEligibilityRequest owner, CoverageEligibilityRequest.InsuranceComponent res) 7899 throws XmlPullParserException, IOException, FHIRFormatError { 7900 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { 7901 res.setFocalElement(parseBoolean(xpp)); 7902 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 7903 res.setCoverage(parseReference(xpp)); 7904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessArrangement")) { 7905 res.setBusinessArrangementElement(parseString(xpp)); 7906 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7907 return false; 7908 return true; 7909 } 7910 7911 protected CoverageEligibilityRequest.DetailsComponent parseCoverageEligibilityRequestDetailsComponent( 7912 XmlPullParser xpp, CoverageEligibilityRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 7913 CoverageEligibilityRequest.DetailsComponent res = new CoverageEligibilityRequest.DetailsComponent(); 7914 parseBackboneAttributes(xpp, res); 7915 next(xpp); 7916 int eventType = nextNoWhitespace(xpp); 7917 while (eventType != XmlPullParser.END_TAG) { 7918 if (!parseCoverageEligibilityRequestDetailsComponentContent(eventType, xpp, owner, res)) 7919 unknownContent(xpp); 7920 eventType = nextNoWhitespace(xpp); 7921 } 7922 next(xpp); 7923 parseElementClose(res); 7924 return res; 7925 } 7926 7927 protected boolean parseCoverageEligibilityRequestDetailsComponentContent(int eventType, XmlPullParser xpp, 7928 CoverageEligibilityRequest owner, CoverageEligibilityRequest.DetailsComponent res) 7929 throws XmlPullParserException, IOException, FHIRFormatError { 7930 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfoSequence")) { 7931 res.getSupportingInfoSequence().add(parsePositiveInt(xpp)); 7932 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 7933 res.setCategory(parseCodeableConcept(xpp)); 7934 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 7935 res.setProductOrService(parseCodeableConcept(xpp)); 7936 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 7937 res.getModifier().add(parseCodeableConcept(xpp)); 7938 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 7939 res.setProvider(parseReference(xpp)); 7940 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 7941 res.setQuantity(parseQuantity(xpp)); 7942 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 7943 res.setUnitPrice(parseMoney(xpp)); 7944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { 7945 res.setFacility(parseReference(xpp)); 7946 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { 7947 res.getDiagnosis().add(parseCoverageEligibilityRequestDiagnosisComponent(xpp, owner)); 7948 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 7949 res.getDetail().add(parseReference(xpp)); 7950 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7951 return false; 7952 return true; 7953 } 7954 7955 protected CoverageEligibilityRequest.DiagnosisComponent parseCoverageEligibilityRequestDiagnosisComponent( 7956 XmlPullParser xpp, CoverageEligibilityRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 7957 CoverageEligibilityRequest.DiagnosisComponent res = new CoverageEligibilityRequest.DiagnosisComponent(); 7958 parseBackboneAttributes(xpp, res); 7959 next(xpp); 7960 int eventType = nextNoWhitespace(xpp); 7961 while (eventType != XmlPullParser.END_TAG) { 7962 if (!parseCoverageEligibilityRequestDiagnosisComponentContent(eventType, xpp, owner, res)) 7963 unknownContent(xpp); 7964 eventType = nextNoWhitespace(xpp); 7965 } 7966 next(xpp); 7967 parseElementClose(res); 7968 return res; 7969 } 7970 7971 protected boolean parseCoverageEligibilityRequestDiagnosisComponentContent(int eventType, XmlPullParser xpp, 7972 CoverageEligibilityRequest owner, CoverageEligibilityRequest.DiagnosisComponent res) 7973 throws XmlPullParserException, IOException, FHIRFormatError { 7974 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { 7975 res.setDiagnosis(parseType("diagnosis", xpp)); 7976 } else if (!parseBackboneElementContent(eventType, xpp, res)) 7977 return false; 7978 return true; 7979 } 7980 7981 protected CoverageEligibilityResponse parseCoverageEligibilityResponse(XmlPullParser xpp) 7982 throws XmlPullParserException, IOException, FHIRFormatError { 7983 CoverageEligibilityResponse res = new CoverageEligibilityResponse(); 7984 parseDomainResourceAttributes(xpp, res); 7985 next(xpp); 7986 int eventType = nextNoWhitespace(xpp); 7987 while (eventType != XmlPullParser.END_TAG) { 7988 if (!parseCoverageEligibilityResponseContent(eventType, xpp, res)) 7989 unknownContent(xpp); 7990 eventType = nextNoWhitespace(xpp); 7991 } 7992 next(xpp); 7993 parseElementClose(res); 7994 return res; 7995 } 7996 7997 protected boolean parseCoverageEligibilityResponseContent(int eventType, XmlPullParser xpp, 7998 CoverageEligibilityResponse res) throws XmlPullParserException, IOException, FHIRFormatError { 7999 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8000 res.getIdentifier().add(parseIdentifier(xpp)); 8001 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 8002 res.setStatusElement(parseEnumeration(xpp, CoverageEligibilityResponse.EligibilityResponseStatus.NULL, 8003 new CoverageEligibilityResponse.EligibilityResponseStatusEnumFactory())); 8004 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 8005 res.getPurpose().add(parseEnumeration(xpp, CoverageEligibilityResponse.EligibilityResponsePurpose.NULL, 8006 new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory())); 8007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 8008 res.setPatient(parseReference(xpp)); 8009 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 8010 res.setServiced(parseType("serviced", xpp)); 8011 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 8012 res.setCreatedElement(parseDateTime(xpp)); 8013 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { 8014 res.setRequestor(parseReference(xpp)); 8015 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 8016 res.setRequest(parseReference(xpp)); 8017 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 8018 res.setOutcomeElement( 8019 parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); 8020 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { 8021 res.setDispositionElement(parseString(xpp)); 8022 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 8023 res.setInsurer(parseReference(xpp)); 8024 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 8025 res.getInsurance().add(parseCoverageEligibilityResponseInsuranceComponent(xpp, res)); 8026 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { 8027 res.setPreAuthRefElement(parseString(xpp)); 8028 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { 8029 res.setForm(parseCodeableConcept(xpp)); 8030 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { 8031 res.getError().add(parseCoverageEligibilityResponseErrorsComponent(xpp, res)); 8032 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8033 return false; 8034 return true; 8035 } 8036 8037 protected CoverageEligibilityResponse.InsuranceComponent parseCoverageEligibilityResponseInsuranceComponent( 8038 XmlPullParser xpp, CoverageEligibilityResponse owner) 8039 throws XmlPullParserException, IOException, FHIRFormatError { 8040 CoverageEligibilityResponse.InsuranceComponent res = new CoverageEligibilityResponse.InsuranceComponent(); 8041 parseBackboneAttributes(xpp, res); 8042 next(xpp); 8043 int eventType = nextNoWhitespace(xpp); 8044 while (eventType != XmlPullParser.END_TAG) { 8045 if (!parseCoverageEligibilityResponseInsuranceComponentContent(eventType, xpp, owner, res)) 8046 unknownContent(xpp); 8047 eventType = nextNoWhitespace(xpp); 8048 } 8049 next(xpp); 8050 parseElementClose(res); 8051 return res; 8052 } 8053 8054 protected boolean parseCoverageEligibilityResponseInsuranceComponentContent(int eventType, XmlPullParser xpp, 8055 CoverageEligibilityResponse owner, CoverageEligibilityResponse.InsuranceComponent res) 8056 throws XmlPullParserException, IOException, FHIRFormatError { 8057 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 8058 res.setCoverage(parseReference(xpp)); 8059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inforce")) { 8060 res.setInforceElement(parseBoolean(xpp)); 8061 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitPeriod")) { 8062 res.setBenefitPeriod(parsePeriod(xpp)); 8063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 8064 res.getItem().add(parseCoverageEligibilityResponseItemsComponent(xpp, owner)); 8065 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8066 return false; 8067 return true; 8068 } 8069 8070 protected CoverageEligibilityResponse.ItemsComponent parseCoverageEligibilityResponseItemsComponent(XmlPullParser xpp, 8071 CoverageEligibilityResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 8072 CoverageEligibilityResponse.ItemsComponent res = new CoverageEligibilityResponse.ItemsComponent(); 8073 parseBackboneAttributes(xpp, res); 8074 next(xpp); 8075 int eventType = nextNoWhitespace(xpp); 8076 while (eventType != XmlPullParser.END_TAG) { 8077 if (!parseCoverageEligibilityResponseItemsComponentContent(eventType, xpp, owner, res)) 8078 unknownContent(xpp); 8079 eventType = nextNoWhitespace(xpp); 8080 } 8081 next(xpp); 8082 parseElementClose(res); 8083 return res; 8084 } 8085 8086 protected boolean parseCoverageEligibilityResponseItemsComponentContent(int eventType, XmlPullParser xpp, 8087 CoverageEligibilityResponse owner, CoverageEligibilityResponse.ItemsComponent res) 8088 throws XmlPullParserException, IOException, FHIRFormatError { 8089 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 8090 res.setCategory(parseCodeableConcept(xpp)); 8091 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 8092 res.setProductOrService(parseCodeableConcept(xpp)); 8093 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 8094 res.getModifier().add(parseCodeableConcept(xpp)); 8095 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 8096 res.setProvider(parseReference(xpp)); 8097 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { 8098 res.setExcludedElement(parseBoolean(xpp)); 8099 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 8100 res.setNameElement(parseString(xpp)); 8101 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 8102 res.setDescriptionElement(parseString(xpp)); 8103 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 8104 res.setNetwork(parseCodeableConcept(xpp)); 8105 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { 8106 res.setUnit(parseCodeableConcept(xpp)); 8107 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { 8108 res.setTerm(parseCodeableConcept(xpp)); 8109 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefit")) { 8110 res.getBenefit().add(parseCoverageEligibilityResponseBenefitComponent(xpp, owner)); 8111 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizationRequired")) { 8112 res.setAuthorizationRequiredElement(parseBoolean(xpp)); 8113 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizationSupporting")) { 8114 res.getAuthorizationSupporting().add(parseCodeableConcept(xpp)); 8115 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizationUrl")) { 8116 res.setAuthorizationUrlElement(parseUri(xpp)); 8117 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8118 return false; 8119 return true; 8120 } 8121 8122 protected CoverageEligibilityResponse.BenefitComponent parseCoverageEligibilityResponseBenefitComponent( 8123 XmlPullParser xpp, CoverageEligibilityResponse owner) 8124 throws XmlPullParserException, IOException, FHIRFormatError { 8125 CoverageEligibilityResponse.BenefitComponent res = new CoverageEligibilityResponse.BenefitComponent(); 8126 parseBackboneAttributes(xpp, res); 8127 next(xpp); 8128 int eventType = nextNoWhitespace(xpp); 8129 while (eventType != XmlPullParser.END_TAG) { 8130 if (!parseCoverageEligibilityResponseBenefitComponentContent(eventType, xpp, owner, res)) 8131 unknownContent(xpp); 8132 eventType = nextNoWhitespace(xpp); 8133 } 8134 next(xpp); 8135 parseElementClose(res); 8136 return res; 8137 } 8138 8139 protected boolean parseCoverageEligibilityResponseBenefitComponentContent(int eventType, XmlPullParser xpp, 8140 CoverageEligibilityResponse owner, CoverageEligibilityResponse.BenefitComponent res) 8141 throws XmlPullParserException, IOException, FHIRFormatError { 8142 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8143 res.setType(parseCodeableConcept(xpp)); 8144 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { 8145 res.setAllowed(parseType("allowed", xpp)); 8146 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { 8147 res.setUsed(parseType("used", xpp)); 8148 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8149 return false; 8150 return true; 8151 } 8152 8153 protected CoverageEligibilityResponse.ErrorsComponent parseCoverageEligibilityResponseErrorsComponent( 8154 XmlPullParser xpp, CoverageEligibilityResponse owner) 8155 throws XmlPullParserException, IOException, FHIRFormatError { 8156 CoverageEligibilityResponse.ErrorsComponent res = new CoverageEligibilityResponse.ErrorsComponent(); 8157 parseBackboneAttributes(xpp, res); 8158 next(xpp); 8159 int eventType = nextNoWhitespace(xpp); 8160 while (eventType != XmlPullParser.END_TAG) { 8161 if (!parseCoverageEligibilityResponseErrorsComponentContent(eventType, xpp, owner, res)) 8162 unknownContent(xpp); 8163 eventType = nextNoWhitespace(xpp); 8164 } 8165 next(xpp); 8166 parseElementClose(res); 8167 return res; 8168 } 8169 8170 protected boolean parseCoverageEligibilityResponseErrorsComponentContent(int eventType, XmlPullParser xpp, 8171 CoverageEligibilityResponse owner, CoverageEligibilityResponse.ErrorsComponent res) 8172 throws XmlPullParserException, IOException, FHIRFormatError { 8173 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 8174 res.setCode(parseCodeableConcept(xpp)); 8175 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8176 return false; 8177 return true; 8178 } 8179 8180 protected DetectedIssue parseDetectedIssue(XmlPullParser xpp) 8181 throws XmlPullParserException, IOException, FHIRFormatError { 8182 DetectedIssue res = new DetectedIssue(); 8183 parseDomainResourceAttributes(xpp, res); 8184 next(xpp); 8185 int eventType = nextNoWhitespace(xpp); 8186 while (eventType != XmlPullParser.END_TAG) { 8187 if (!parseDetectedIssueContent(eventType, xpp, res)) 8188 unknownContent(xpp); 8189 eventType = nextNoWhitespace(xpp); 8190 } 8191 next(xpp); 8192 parseElementClose(res); 8193 return res; 8194 } 8195 8196 protected boolean parseDetectedIssueContent(int eventType, XmlPullParser xpp, DetectedIssue res) 8197 throws XmlPullParserException, IOException, FHIRFormatError { 8198 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8199 res.getIdentifier().add(parseIdentifier(xpp)); 8200 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 8201 res.setStatusElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueStatus.NULL, 8202 new DetectedIssue.DetectedIssueStatusEnumFactory())); 8203 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 8204 res.setCode(parseCodeableConcept(xpp)); 8205 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 8206 res.setSeverityElement(parseEnumeration(xpp, DetectedIssue.DetectedIssueSeverity.NULL, 8207 new DetectedIssue.DetectedIssueSeverityEnumFactory())); 8208 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 8209 res.setPatient(parseReference(xpp)); 8210 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "identified")) { 8211 res.setIdentified(parseType("identified", xpp)); 8212 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 8213 res.setAuthor(parseReference(xpp)); 8214 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implicated")) { 8215 res.getImplicated().add(parseReference(xpp)); 8216 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evidence")) { 8217 res.getEvidence().add(parseDetectedIssueDetectedIssueEvidenceComponent(xpp, res)); 8218 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 8219 res.setDetailElement(parseString(xpp)); 8220 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 8221 res.setReferenceElement(parseUri(xpp)); 8222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { 8223 res.getMitigation().add(parseDetectedIssueDetectedIssueMitigationComponent(xpp, res)); 8224 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8225 return false; 8226 return true; 8227 } 8228 8229 protected DetectedIssue.DetectedIssueEvidenceComponent parseDetectedIssueDetectedIssueEvidenceComponent( 8230 XmlPullParser xpp, DetectedIssue owner) throws XmlPullParserException, IOException, FHIRFormatError { 8231 DetectedIssue.DetectedIssueEvidenceComponent res = new DetectedIssue.DetectedIssueEvidenceComponent(); 8232 parseBackboneAttributes(xpp, res); 8233 next(xpp); 8234 int eventType = nextNoWhitespace(xpp); 8235 while (eventType != XmlPullParser.END_TAG) { 8236 if (!parseDetectedIssueDetectedIssueEvidenceComponentContent(eventType, xpp, owner, res)) 8237 unknownContent(xpp); 8238 eventType = nextNoWhitespace(xpp); 8239 } 8240 next(xpp); 8241 parseElementClose(res); 8242 return res; 8243 } 8244 8245 protected boolean parseDetectedIssueDetectedIssueEvidenceComponentContent(int eventType, XmlPullParser xpp, 8246 DetectedIssue owner, DetectedIssue.DetectedIssueEvidenceComponent res) 8247 throws XmlPullParserException, IOException, FHIRFormatError { 8248 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 8249 res.getCode().add(parseCodeableConcept(xpp)); 8250 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 8251 res.getDetail().add(parseReference(xpp)); 8252 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8253 return false; 8254 return true; 8255 } 8256 8257 protected DetectedIssue.DetectedIssueMitigationComponent parseDetectedIssueDetectedIssueMitigationComponent( 8258 XmlPullParser xpp, DetectedIssue owner) throws XmlPullParserException, IOException, FHIRFormatError { 8259 DetectedIssue.DetectedIssueMitigationComponent res = new DetectedIssue.DetectedIssueMitigationComponent(); 8260 parseBackboneAttributes(xpp, res); 8261 next(xpp); 8262 int eventType = nextNoWhitespace(xpp); 8263 while (eventType != XmlPullParser.END_TAG) { 8264 if (!parseDetectedIssueDetectedIssueMitigationComponentContent(eventType, xpp, owner, res)) 8265 unknownContent(xpp); 8266 eventType = nextNoWhitespace(xpp); 8267 } 8268 next(xpp); 8269 parseElementClose(res); 8270 return res; 8271 } 8272 8273 protected boolean parseDetectedIssueDetectedIssueMitigationComponentContent(int eventType, XmlPullParser xpp, 8274 DetectedIssue owner, DetectedIssue.DetectedIssueMitigationComponent res) 8275 throws XmlPullParserException, IOException, FHIRFormatError { 8276 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 8277 res.setAction(parseCodeableConcept(xpp)); 8278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 8279 res.setDateElement(parseDateTime(xpp)); 8280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 8281 res.setAuthor(parseReference(xpp)); 8282 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8283 return false; 8284 return true; 8285 } 8286 8287 protected Device parseDevice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 8288 Device res = new Device(); 8289 parseDomainResourceAttributes(xpp, res); 8290 next(xpp); 8291 int eventType = nextNoWhitespace(xpp); 8292 while (eventType != XmlPullParser.END_TAG) { 8293 if (!parseDeviceContent(eventType, xpp, res)) 8294 unknownContent(xpp); 8295 eventType = nextNoWhitespace(xpp); 8296 } 8297 next(xpp); 8298 parseElementClose(res); 8299 return res; 8300 } 8301 8302 protected boolean parseDeviceContent(int eventType, XmlPullParser xpp, Device res) 8303 throws XmlPullParserException, IOException, FHIRFormatError { 8304 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8305 res.getIdentifier().add(parseIdentifier(xpp)); 8306 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 8307 res.setDefinition(parseReference(xpp)); 8308 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udiCarrier")) { 8309 res.getUdiCarrier().add(parseDeviceDeviceUdiCarrierComponent(xpp, res)); 8310 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 8311 res.setStatusElement( 8312 parseEnumeration(xpp, Device.FHIRDeviceStatus.NULL, new Device.FHIRDeviceStatusEnumFactory())); 8313 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 8314 res.getStatusReason().add(parseCodeableConcept(xpp)); 8315 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("distinctIdentifier")) { 8316 res.setDistinctIdentifierElement(parseString(xpp)); 8317 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 8318 res.setManufacturerElement(parseString(xpp)); 8319 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufactureDate")) { 8320 res.setManufactureDateElement(parseDateTime(xpp)); 8321 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { 8322 res.setExpirationDateElement(parseDateTime(xpp)); 8323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { 8324 res.setLotNumberElement(parseString(xpp)); 8325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serialNumber")) { 8326 res.setSerialNumberElement(parseString(xpp)); 8327 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceName")) { 8328 res.getDeviceName().add(parseDeviceDeviceDeviceNameComponent(xpp, res)); 8329 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modelNumber")) { 8330 res.setModelNumberElement(parseString(xpp)); 8331 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partNumber")) { 8332 res.setPartNumberElement(parseString(xpp)); 8333 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8334 res.setType(parseCodeableConcept(xpp)); 8335 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialization")) { 8336 res.getSpecialization().add(parseDeviceDeviceSpecializationComponent(xpp, res)); 8337 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 8338 res.getVersion().add(parseDeviceDeviceVersionComponent(xpp, res)); 8339 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 8340 res.getProperty().add(parseDeviceDevicePropertyComponent(xpp, res)); 8341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 8342 res.setPatient(parseReference(xpp)); 8343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { 8344 res.setOwner(parseReference(xpp)); 8345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 8346 res.getContact().add(parseContactPoint(xpp)); 8347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 8348 res.setLocation(parseReference(xpp)); 8349 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 8350 res.setUrlElement(parseUri(xpp)); 8351 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 8352 res.getNote().add(parseAnnotation(xpp)); 8353 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("safety")) { 8354 res.getSafety().add(parseCodeableConcept(xpp)); 8355 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 8356 res.setParent(parseReference(xpp)); 8357 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8358 return false; 8359 return true; 8360 } 8361 8362 protected Device.DeviceUdiCarrierComponent parseDeviceDeviceUdiCarrierComponent(XmlPullParser xpp, Device owner) 8363 throws XmlPullParserException, IOException, FHIRFormatError { 8364 Device.DeviceUdiCarrierComponent res = new Device.DeviceUdiCarrierComponent(); 8365 parseBackboneAttributes(xpp, res); 8366 next(xpp); 8367 int eventType = nextNoWhitespace(xpp); 8368 while (eventType != XmlPullParser.END_TAG) { 8369 if (!parseDeviceDeviceUdiCarrierComponentContent(eventType, xpp, owner, res)) 8370 unknownContent(xpp); 8371 eventType = nextNoWhitespace(xpp); 8372 } 8373 next(xpp); 8374 parseElementClose(res); 8375 return res; 8376 } 8377 8378 protected boolean parseDeviceDeviceUdiCarrierComponentContent(int eventType, XmlPullParser xpp, Device owner, 8379 Device.DeviceUdiCarrierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 8380 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceIdentifier")) { 8381 res.setDeviceIdentifierElement(parseString(xpp)); 8382 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { 8383 res.setIssuerElement(parseUri(xpp)); 8384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 8385 res.setJurisdictionElement(parseUri(xpp)); 8386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierAIDC")) { 8387 res.setCarrierAIDCElement(parseBase64Binary(xpp)); 8388 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("carrierHRF")) { 8389 res.setCarrierHRFElement(parseString(xpp)); 8390 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entryType")) { 8391 res.setEntryTypeElement(parseEnumeration(xpp, Device.UDIEntryType.NULL, new Device.UDIEntryTypeEnumFactory())); 8392 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8393 return false; 8394 return true; 8395 } 8396 8397 protected Device.DeviceDeviceNameComponent parseDeviceDeviceDeviceNameComponent(XmlPullParser xpp, Device owner) 8398 throws XmlPullParserException, IOException, FHIRFormatError { 8399 Device.DeviceDeviceNameComponent res = new Device.DeviceDeviceNameComponent(); 8400 parseBackboneAttributes(xpp, res); 8401 next(xpp); 8402 int eventType = nextNoWhitespace(xpp); 8403 while (eventType != XmlPullParser.END_TAG) { 8404 if (!parseDeviceDeviceDeviceNameComponentContent(eventType, xpp, owner, res)) 8405 unknownContent(xpp); 8406 eventType = nextNoWhitespace(xpp); 8407 } 8408 next(xpp); 8409 parseElementClose(res); 8410 return res; 8411 } 8412 8413 protected boolean parseDeviceDeviceDeviceNameComponentContent(int eventType, XmlPullParser xpp, Device owner, 8414 Device.DeviceDeviceNameComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 8415 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 8416 res.setNameElement(parseString(xpp)); 8417 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8418 res.setTypeElement(parseEnumeration(xpp, Device.DeviceNameType.NULL, new Device.DeviceNameTypeEnumFactory())); 8419 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8420 return false; 8421 return true; 8422 } 8423 8424 protected Device.DeviceSpecializationComponent parseDeviceDeviceSpecializationComponent(XmlPullParser xpp, 8425 Device owner) throws XmlPullParserException, IOException, FHIRFormatError { 8426 Device.DeviceSpecializationComponent res = new Device.DeviceSpecializationComponent(); 8427 parseBackboneAttributes(xpp, res); 8428 next(xpp); 8429 int eventType = nextNoWhitespace(xpp); 8430 while (eventType != XmlPullParser.END_TAG) { 8431 if (!parseDeviceDeviceSpecializationComponentContent(eventType, xpp, owner, res)) 8432 unknownContent(xpp); 8433 eventType = nextNoWhitespace(xpp); 8434 } 8435 next(xpp); 8436 parseElementClose(res); 8437 return res; 8438 } 8439 8440 protected boolean parseDeviceDeviceSpecializationComponentContent(int eventType, XmlPullParser xpp, Device owner, 8441 Device.DeviceSpecializationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 8442 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("systemType")) { 8443 res.setSystemType(parseCodeableConcept(xpp)); 8444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 8445 res.setVersionElement(parseString(xpp)); 8446 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8447 return false; 8448 return true; 8449 } 8450 8451 protected Device.DeviceVersionComponent parseDeviceDeviceVersionComponent(XmlPullParser xpp, Device owner) 8452 throws XmlPullParserException, IOException, FHIRFormatError { 8453 Device.DeviceVersionComponent res = new Device.DeviceVersionComponent(); 8454 parseBackboneAttributes(xpp, res); 8455 next(xpp); 8456 int eventType = nextNoWhitespace(xpp); 8457 while (eventType != XmlPullParser.END_TAG) { 8458 if (!parseDeviceDeviceVersionComponentContent(eventType, xpp, owner, res)) 8459 unknownContent(xpp); 8460 eventType = nextNoWhitespace(xpp); 8461 } 8462 next(xpp); 8463 parseElementClose(res); 8464 return res; 8465 } 8466 8467 protected boolean parseDeviceDeviceVersionComponentContent(int eventType, XmlPullParser xpp, Device owner, 8468 Device.DeviceVersionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 8469 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8470 res.setType(parseCodeableConcept(xpp)); 8471 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { 8472 res.setComponent(parseIdentifier(xpp)); 8473 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 8474 res.setValueElement(parseString(xpp)); 8475 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8476 return false; 8477 return true; 8478 } 8479 8480 protected Device.DevicePropertyComponent parseDeviceDevicePropertyComponent(XmlPullParser xpp, Device owner) 8481 throws XmlPullParserException, IOException, FHIRFormatError { 8482 Device.DevicePropertyComponent res = new Device.DevicePropertyComponent(); 8483 parseBackboneAttributes(xpp, res); 8484 next(xpp); 8485 int eventType = nextNoWhitespace(xpp); 8486 while (eventType != XmlPullParser.END_TAG) { 8487 if (!parseDeviceDevicePropertyComponentContent(eventType, xpp, owner, res)) 8488 unknownContent(xpp); 8489 eventType = nextNoWhitespace(xpp); 8490 } 8491 next(xpp); 8492 parseElementClose(res); 8493 return res; 8494 } 8495 8496 protected boolean parseDeviceDevicePropertyComponentContent(int eventType, XmlPullParser xpp, Device owner, 8497 Device.DevicePropertyComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 8498 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8499 res.setType(parseCodeableConcept(xpp)); 8500 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueQuantity")) { 8501 res.getValueQuantity().add(parseQuantity(xpp)); 8502 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCode")) { 8503 res.getValueCode().add(parseCodeableConcept(xpp)); 8504 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8505 return false; 8506 return true; 8507 } 8508 8509 protected DeviceDefinition parseDeviceDefinition(XmlPullParser xpp) 8510 throws XmlPullParserException, IOException, FHIRFormatError { 8511 DeviceDefinition res = new DeviceDefinition(); 8512 parseDomainResourceAttributes(xpp, res); 8513 next(xpp); 8514 int eventType = nextNoWhitespace(xpp); 8515 while (eventType != XmlPullParser.END_TAG) { 8516 if (!parseDeviceDefinitionContent(eventType, xpp, res)) 8517 unknownContent(xpp); 8518 eventType = nextNoWhitespace(xpp); 8519 } 8520 next(xpp); 8521 parseElementClose(res); 8522 return res; 8523 } 8524 8525 protected boolean parseDeviceDefinitionContent(int eventType, XmlPullParser xpp, DeviceDefinition res) 8526 throws XmlPullParserException, IOException, FHIRFormatError { 8527 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8528 res.getIdentifier().add(parseIdentifier(xpp)); 8529 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udiDeviceIdentifier")) { 8530 res.getUdiDeviceIdentifier().add(parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(xpp, res)); 8531 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "manufacturer")) { 8532 res.setManufacturer(parseType("manufacturer", xpp)); 8533 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceName")) { 8534 res.getDeviceName().add(parseDeviceDefinitionDeviceDefinitionDeviceNameComponent(xpp, res)); 8535 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modelNumber")) { 8536 res.setModelNumberElement(parseString(xpp)); 8537 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8538 res.setType(parseCodeableConcept(xpp)); 8539 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialization")) { 8540 res.getSpecialization().add(parseDeviceDefinitionDeviceDefinitionSpecializationComponent(xpp, res)); 8541 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 8542 res.getVersion().add(parseString(xpp)); 8543 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("safety")) { 8544 res.getSafety().add(parseCodeableConcept(xpp)); 8545 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shelfLifeStorage")) { 8546 res.getShelfLifeStorage().add(parseProductShelfLife(xpp)); 8547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalCharacteristics")) { 8548 res.setPhysicalCharacteristics(parseProdCharacteristic(xpp)); 8549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("languageCode")) { 8550 res.getLanguageCode().add(parseCodeableConcept(xpp)); 8551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capability")) { 8552 res.getCapability().add(parseDeviceDefinitionDeviceDefinitionCapabilityComponent(xpp, res)); 8553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 8554 res.getProperty().add(parseDeviceDefinitionDeviceDefinitionPropertyComponent(xpp, res)); 8555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { 8556 res.setOwner(parseReference(xpp)); 8557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 8558 res.getContact().add(parseContactPoint(xpp)); 8559 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 8560 res.setUrlElement(parseUri(xpp)); 8561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onlineInformation")) { 8562 res.setOnlineInformationElement(parseUri(xpp)); 8563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 8564 res.getNote().add(parseAnnotation(xpp)); 8565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 8566 res.setQuantity(parseQuantity(xpp)); 8567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parentDevice")) { 8568 res.setParentDevice(parseReference(xpp)); 8569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("material")) { 8570 res.getMaterial().add(parseDeviceDefinitionDeviceDefinitionMaterialComponent(xpp, res)); 8571 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8572 return false; 8573 return true; 8574 } 8575 8576 protected DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent( 8577 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8578 DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent res = new DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent(); 8579 parseBackboneAttributes(xpp, res); 8580 next(xpp); 8581 int eventType = nextNoWhitespace(xpp); 8582 while (eventType != XmlPullParser.END_TAG) { 8583 if (!parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentContent(eventType, xpp, owner, res)) 8584 unknownContent(xpp); 8585 eventType = nextNoWhitespace(xpp); 8586 } 8587 next(xpp); 8588 parseElementClose(res); 8589 return res; 8590 } 8591 8592 protected boolean parseDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentContent(int eventType, 8593 XmlPullParser xpp, DeviceDefinition owner, DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent res) 8594 throws XmlPullParserException, IOException, FHIRFormatError { 8595 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceIdentifier")) { 8596 res.setDeviceIdentifierElement(parseString(xpp)); 8597 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { 8598 res.setIssuerElement(parseUri(xpp)); 8599 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 8600 res.setJurisdictionElement(parseUri(xpp)); 8601 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8602 return false; 8603 return true; 8604 } 8605 8606 protected DeviceDefinition.DeviceDefinitionDeviceNameComponent parseDeviceDefinitionDeviceDefinitionDeviceNameComponent( 8607 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8608 DeviceDefinition.DeviceDefinitionDeviceNameComponent res = new DeviceDefinition.DeviceDefinitionDeviceNameComponent(); 8609 parseBackboneAttributes(xpp, res); 8610 next(xpp); 8611 int eventType = nextNoWhitespace(xpp); 8612 while (eventType != XmlPullParser.END_TAG) { 8613 if (!parseDeviceDefinitionDeviceDefinitionDeviceNameComponentContent(eventType, xpp, owner, res)) 8614 unknownContent(xpp); 8615 eventType = nextNoWhitespace(xpp); 8616 } 8617 next(xpp); 8618 parseElementClose(res); 8619 return res; 8620 } 8621 8622 protected boolean parseDeviceDefinitionDeviceDefinitionDeviceNameComponentContent(int eventType, XmlPullParser xpp, 8623 DeviceDefinition owner, DeviceDefinition.DeviceDefinitionDeviceNameComponent res) 8624 throws XmlPullParserException, IOException, FHIRFormatError { 8625 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 8626 res.setNameElement(parseString(xpp)); 8627 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8628 res.setTypeElement(parseEnumeration(xpp, DeviceDefinition.DeviceNameType.NULL, 8629 new DeviceDefinition.DeviceNameTypeEnumFactory())); 8630 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8631 return false; 8632 return true; 8633 } 8634 8635 protected DeviceDefinition.DeviceDefinitionSpecializationComponent parseDeviceDefinitionDeviceDefinitionSpecializationComponent( 8636 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8637 DeviceDefinition.DeviceDefinitionSpecializationComponent res = new DeviceDefinition.DeviceDefinitionSpecializationComponent(); 8638 parseBackboneAttributes(xpp, res); 8639 next(xpp); 8640 int eventType = nextNoWhitespace(xpp); 8641 while (eventType != XmlPullParser.END_TAG) { 8642 if (!parseDeviceDefinitionDeviceDefinitionSpecializationComponentContent(eventType, xpp, owner, res)) 8643 unknownContent(xpp); 8644 eventType = nextNoWhitespace(xpp); 8645 } 8646 next(xpp); 8647 parseElementClose(res); 8648 return res; 8649 } 8650 8651 protected boolean parseDeviceDefinitionDeviceDefinitionSpecializationComponentContent(int eventType, 8652 XmlPullParser xpp, DeviceDefinition owner, DeviceDefinition.DeviceDefinitionSpecializationComponent res) 8653 throws XmlPullParserException, IOException, FHIRFormatError { 8654 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("systemType")) { 8655 res.setSystemTypeElement(parseString(xpp)); 8656 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 8657 res.setVersionElement(parseString(xpp)); 8658 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8659 return false; 8660 return true; 8661 } 8662 8663 protected DeviceDefinition.DeviceDefinitionCapabilityComponent parseDeviceDefinitionDeviceDefinitionCapabilityComponent( 8664 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8665 DeviceDefinition.DeviceDefinitionCapabilityComponent res = new DeviceDefinition.DeviceDefinitionCapabilityComponent(); 8666 parseBackboneAttributes(xpp, res); 8667 next(xpp); 8668 int eventType = nextNoWhitespace(xpp); 8669 while (eventType != XmlPullParser.END_TAG) { 8670 if (!parseDeviceDefinitionDeviceDefinitionCapabilityComponentContent(eventType, xpp, owner, res)) 8671 unknownContent(xpp); 8672 eventType = nextNoWhitespace(xpp); 8673 } 8674 next(xpp); 8675 parseElementClose(res); 8676 return res; 8677 } 8678 8679 protected boolean parseDeviceDefinitionDeviceDefinitionCapabilityComponentContent(int eventType, XmlPullParser xpp, 8680 DeviceDefinition owner, DeviceDefinition.DeviceDefinitionCapabilityComponent res) 8681 throws XmlPullParserException, IOException, FHIRFormatError { 8682 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8683 res.setType(parseCodeableConcept(xpp)); 8684 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 8685 res.getDescription().add(parseCodeableConcept(xpp)); 8686 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8687 return false; 8688 return true; 8689 } 8690 8691 protected DeviceDefinition.DeviceDefinitionPropertyComponent parseDeviceDefinitionDeviceDefinitionPropertyComponent( 8692 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8693 DeviceDefinition.DeviceDefinitionPropertyComponent res = new DeviceDefinition.DeviceDefinitionPropertyComponent(); 8694 parseBackboneAttributes(xpp, res); 8695 next(xpp); 8696 int eventType = nextNoWhitespace(xpp); 8697 while (eventType != XmlPullParser.END_TAG) { 8698 if (!parseDeviceDefinitionDeviceDefinitionPropertyComponentContent(eventType, xpp, owner, res)) 8699 unknownContent(xpp); 8700 eventType = nextNoWhitespace(xpp); 8701 } 8702 next(xpp); 8703 parseElementClose(res); 8704 return res; 8705 } 8706 8707 protected boolean parseDeviceDefinitionDeviceDefinitionPropertyComponentContent(int eventType, XmlPullParser xpp, 8708 DeviceDefinition owner, DeviceDefinition.DeviceDefinitionPropertyComponent res) 8709 throws XmlPullParserException, IOException, FHIRFormatError { 8710 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8711 res.setType(parseCodeableConcept(xpp)); 8712 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueQuantity")) { 8713 res.getValueQuantity().add(parseQuantity(xpp)); 8714 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueCode")) { 8715 res.getValueCode().add(parseCodeableConcept(xpp)); 8716 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8717 return false; 8718 return true; 8719 } 8720 8721 protected DeviceDefinition.DeviceDefinitionMaterialComponent parseDeviceDefinitionDeviceDefinitionMaterialComponent( 8722 XmlPullParser xpp, DeviceDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 8723 DeviceDefinition.DeviceDefinitionMaterialComponent res = new DeviceDefinition.DeviceDefinitionMaterialComponent(); 8724 parseBackboneAttributes(xpp, res); 8725 next(xpp); 8726 int eventType = nextNoWhitespace(xpp); 8727 while (eventType != XmlPullParser.END_TAG) { 8728 if (!parseDeviceDefinitionDeviceDefinitionMaterialComponentContent(eventType, xpp, owner, res)) 8729 unknownContent(xpp); 8730 eventType = nextNoWhitespace(xpp); 8731 } 8732 next(xpp); 8733 parseElementClose(res); 8734 return res; 8735 } 8736 8737 protected boolean parseDeviceDefinitionDeviceDefinitionMaterialComponentContent(int eventType, XmlPullParser xpp, 8738 DeviceDefinition owner, DeviceDefinition.DeviceDefinitionMaterialComponent res) 8739 throws XmlPullParserException, IOException, FHIRFormatError { 8740 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { 8741 res.setSubstance(parseCodeableConcept(xpp)); 8742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alternate")) { 8743 res.setAlternateElement(parseBoolean(xpp)); 8744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allergenicIndicator")) { 8745 res.setAllergenicIndicatorElement(parseBoolean(xpp)); 8746 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8747 return false; 8748 return true; 8749 } 8750 8751 protected DeviceMetric parseDeviceMetric(XmlPullParser xpp) 8752 throws XmlPullParserException, IOException, FHIRFormatError { 8753 DeviceMetric res = new DeviceMetric(); 8754 parseDomainResourceAttributes(xpp, res); 8755 next(xpp); 8756 int eventType = nextNoWhitespace(xpp); 8757 while (eventType != XmlPullParser.END_TAG) { 8758 if (!parseDeviceMetricContent(eventType, xpp, res)) 8759 unknownContent(xpp); 8760 eventType = nextNoWhitespace(xpp); 8761 } 8762 next(xpp); 8763 parseElementClose(res); 8764 return res; 8765 } 8766 8767 protected boolean parseDeviceMetricContent(int eventType, XmlPullParser xpp, DeviceMetric res) 8768 throws XmlPullParserException, IOException, FHIRFormatError { 8769 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8770 res.getIdentifier().add(parseIdentifier(xpp)); 8771 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8772 res.setType(parseCodeableConcept(xpp)); 8773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { 8774 res.setUnit(parseCodeableConcept(xpp)); 8775 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 8776 res.setSource(parseReference(xpp)); 8777 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 8778 res.setParent(parseReference(xpp)); 8779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { 8780 res.setOperationalStatusElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricOperationalStatus.NULL, 8781 new DeviceMetric.DeviceMetricOperationalStatusEnumFactory())); 8782 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { 8783 res.setColorElement( 8784 parseEnumeration(xpp, DeviceMetric.DeviceMetricColor.NULL, new DeviceMetric.DeviceMetricColorEnumFactory())); 8785 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 8786 res.setCategoryElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCategory.NULL, 8787 new DeviceMetric.DeviceMetricCategoryEnumFactory())); 8788 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPeriod")) { 8789 res.setMeasurementPeriod(parseTiming(xpp)); 8790 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("calibration")) { 8791 res.getCalibration().add(parseDeviceMetricDeviceMetricCalibrationComponent(xpp, res)); 8792 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8793 return false; 8794 return true; 8795 } 8796 8797 protected DeviceMetric.DeviceMetricCalibrationComponent parseDeviceMetricDeviceMetricCalibrationComponent( 8798 XmlPullParser xpp, DeviceMetric owner) throws XmlPullParserException, IOException, FHIRFormatError { 8799 DeviceMetric.DeviceMetricCalibrationComponent res = new DeviceMetric.DeviceMetricCalibrationComponent(); 8800 parseBackboneAttributes(xpp, res); 8801 next(xpp); 8802 int eventType = nextNoWhitespace(xpp); 8803 while (eventType != XmlPullParser.END_TAG) { 8804 if (!parseDeviceMetricDeviceMetricCalibrationComponentContent(eventType, xpp, owner, res)) 8805 unknownContent(xpp); 8806 eventType = nextNoWhitespace(xpp); 8807 } 8808 next(xpp); 8809 parseElementClose(res); 8810 return res; 8811 } 8812 8813 protected boolean parseDeviceMetricDeviceMetricCalibrationComponentContent(int eventType, XmlPullParser xpp, 8814 DeviceMetric owner, DeviceMetric.DeviceMetricCalibrationComponent res) 8815 throws XmlPullParserException, IOException, FHIRFormatError { 8816 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 8817 res.setTypeElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationType.NULL, 8818 new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory())); 8819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("state")) { 8820 res.setStateElement(parseEnumeration(xpp, DeviceMetric.DeviceMetricCalibrationState.NULL, 8821 new DeviceMetric.DeviceMetricCalibrationStateEnumFactory())); 8822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("time")) { 8823 res.setTimeElement(parseInstant(xpp)); 8824 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8825 return false; 8826 return true; 8827 } 8828 8829 protected DeviceRequest parseDeviceRequest(XmlPullParser xpp) 8830 throws XmlPullParserException, IOException, FHIRFormatError { 8831 DeviceRequest res = new DeviceRequest(); 8832 parseDomainResourceAttributes(xpp, res); 8833 next(xpp); 8834 int eventType = nextNoWhitespace(xpp); 8835 while (eventType != XmlPullParser.END_TAG) { 8836 if (!parseDeviceRequestContent(eventType, xpp, res)) 8837 unknownContent(xpp); 8838 eventType = nextNoWhitespace(xpp); 8839 } 8840 next(xpp); 8841 parseElementClose(res); 8842 return res; 8843 } 8844 8845 protected boolean parseDeviceRequestContent(int eventType, XmlPullParser xpp, DeviceRequest res) 8846 throws XmlPullParserException, IOException, FHIRFormatError { 8847 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8848 res.getIdentifier().add(parseIdentifier(xpp)); 8849 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 8850 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 8851 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 8852 res.getInstantiatesUri().add(parseUri(xpp)); 8853 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 8854 res.getBasedOn().add(parseReference(xpp)); 8855 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorRequest")) { 8856 res.getPriorRequest().add(parseReference(xpp)); 8857 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { 8858 res.setGroupIdentifier(parseIdentifier(xpp)); 8859 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 8860 res.setStatusElement(parseEnumeration(xpp, DeviceRequest.DeviceRequestStatus.NULL, 8861 new DeviceRequest.DeviceRequestStatusEnumFactory())); 8862 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 8863 res.setIntentElement( 8864 parseEnumeration(xpp, DeviceRequest.RequestIntent.NULL, new DeviceRequest.RequestIntentEnumFactory())); 8865 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 8866 res.setPriorityElement( 8867 parseEnumeration(xpp, DeviceRequest.RequestPriority.NULL, new DeviceRequest.RequestPriorityEnumFactory())); 8868 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "code")) { 8869 res.setCode(parseType("code", xpp)); 8870 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 8871 res.getParameter().add(parseDeviceRequestDeviceRequestParameterComponent(xpp, res)); 8872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 8873 res.setSubject(parseReference(xpp)); 8874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 8875 res.setEncounter(parseReference(xpp)); 8876 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 8877 res.setOccurrence(parseType("occurrence", xpp)); 8878 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 8879 res.setAuthoredOnElement(parseDateTime(xpp)); 8880 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 8881 res.setRequester(parseReference(xpp)); 8882 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { 8883 res.setPerformerType(parseCodeableConcept(xpp)); 8884 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 8885 res.setPerformer(parseReference(xpp)); 8886 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 8887 res.getReasonCode().add(parseCodeableConcept(xpp)); 8888 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 8889 res.getReasonReference().add(parseReference(xpp)); 8890 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 8891 res.getInsurance().add(parseReference(xpp)); 8892 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 8893 res.getSupportingInfo().add(parseReference(xpp)); 8894 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 8895 res.getNote().add(parseAnnotation(xpp)); 8896 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { 8897 res.getRelevantHistory().add(parseReference(xpp)); 8898 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8899 return false; 8900 return true; 8901 } 8902 8903 protected DeviceRequest.DeviceRequestParameterComponent parseDeviceRequestDeviceRequestParameterComponent( 8904 XmlPullParser xpp, DeviceRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 8905 DeviceRequest.DeviceRequestParameterComponent res = new DeviceRequest.DeviceRequestParameterComponent(); 8906 parseBackboneAttributes(xpp, res); 8907 next(xpp); 8908 int eventType = nextNoWhitespace(xpp); 8909 while (eventType != XmlPullParser.END_TAG) { 8910 if (!parseDeviceRequestDeviceRequestParameterComponentContent(eventType, xpp, owner, res)) 8911 unknownContent(xpp); 8912 eventType = nextNoWhitespace(xpp); 8913 } 8914 next(xpp); 8915 parseElementClose(res); 8916 return res; 8917 } 8918 8919 protected boolean parseDeviceRequestDeviceRequestParameterComponentContent(int eventType, XmlPullParser xpp, 8920 DeviceRequest owner, DeviceRequest.DeviceRequestParameterComponent res) 8921 throws XmlPullParserException, IOException, FHIRFormatError { 8922 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 8923 res.setCode(parseCodeableConcept(xpp)); 8924 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 8925 res.setValue(parseType("value", xpp)); 8926 } else if (!parseBackboneElementContent(eventType, xpp, res)) 8927 return false; 8928 return true; 8929 } 8930 8931 protected DeviceUseStatement parseDeviceUseStatement(XmlPullParser xpp) 8932 throws XmlPullParserException, IOException, FHIRFormatError { 8933 DeviceUseStatement res = new DeviceUseStatement(); 8934 parseDomainResourceAttributes(xpp, res); 8935 next(xpp); 8936 int eventType = nextNoWhitespace(xpp); 8937 while (eventType != XmlPullParser.END_TAG) { 8938 if (!parseDeviceUseStatementContent(eventType, xpp, res)) 8939 unknownContent(xpp); 8940 eventType = nextNoWhitespace(xpp); 8941 } 8942 next(xpp); 8943 parseElementClose(res); 8944 return res; 8945 } 8946 8947 protected boolean parseDeviceUseStatementContent(int eventType, XmlPullParser xpp, DeviceUseStatement res) 8948 throws XmlPullParserException, IOException, FHIRFormatError { 8949 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 8950 res.getIdentifier().add(parseIdentifier(xpp)); 8951 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 8952 res.getBasedOn().add(parseReference(xpp)); 8953 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 8954 res.setStatusElement(parseEnumeration(xpp, DeviceUseStatement.DeviceUseStatementStatus.NULL, 8955 new DeviceUseStatement.DeviceUseStatementStatusEnumFactory())); 8956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 8957 res.setSubject(parseReference(xpp)); 8958 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { 8959 res.getDerivedFrom().add(parseReference(xpp)); 8960 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 8961 res.setTiming(parseType("timing", xpp)); 8962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recordedOn")) { 8963 res.setRecordedOnElement(parseDateTime(xpp)); 8964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 8965 res.setSource(parseReference(xpp)); 8966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 8967 res.setDevice(parseReference(xpp)); 8968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 8969 res.getReasonCode().add(parseCodeableConcept(xpp)); 8970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 8971 res.getReasonReference().add(parseReference(xpp)); 8972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 8973 res.setBodySite(parseCodeableConcept(xpp)); 8974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 8975 res.getNote().add(parseAnnotation(xpp)); 8976 } else if (!parseDomainResourceContent(eventType, xpp, res)) 8977 return false; 8978 return true; 8979 } 8980 8981 protected DiagnosticReport parseDiagnosticReport(XmlPullParser xpp) 8982 throws XmlPullParserException, IOException, FHIRFormatError { 8983 DiagnosticReport res = new DiagnosticReport(); 8984 parseDomainResourceAttributes(xpp, res); 8985 next(xpp); 8986 int eventType = nextNoWhitespace(xpp); 8987 while (eventType != XmlPullParser.END_TAG) { 8988 if (!parseDiagnosticReportContent(eventType, xpp, res)) 8989 unknownContent(xpp); 8990 eventType = nextNoWhitespace(xpp); 8991 } 8992 next(xpp); 8993 parseElementClose(res); 8994 return res; 8995 } 8996 8997 protected boolean parseDiagnosticReportContent(int eventType, XmlPullParser xpp, DiagnosticReport res) 8998 throws XmlPullParserException, IOException, FHIRFormatError { 8999 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9000 res.getIdentifier().add(parseIdentifier(xpp)); 9001 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 9002 res.getBasedOn().add(parseReference(xpp)); 9003 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9004 res.setStatusElement(parseEnumeration(xpp, DiagnosticReport.DiagnosticReportStatus.NULL, 9005 new DiagnosticReport.DiagnosticReportStatusEnumFactory())); 9006 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 9007 res.getCategory().add(parseCodeableConcept(xpp)); 9008 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 9009 res.setCode(parseCodeableConcept(xpp)); 9010 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 9011 res.setSubject(parseReference(xpp)); 9012 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 9013 res.setEncounter(parseReference(xpp)); 9014 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { 9015 res.setEffective(parseType("effective", xpp)); 9016 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 9017 res.setIssuedElement(parseInstant(xpp)); 9018 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 9019 res.getPerformer().add(parseReference(xpp)); 9020 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultsInterpreter")) { 9021 res.getResultsInterpreter().add(parseReference(xpp)); 9022 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { 9023 res.getSpecimen().add(parseReference(xpp)); 9024 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { 9025 res.getResult().add(parseReference(xpp)); 9026 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("imagingStudy")) { 9027 res.getImagingStudy().add(parseReference(xpp)); 9028 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("media")) { 9029 res.getMedia().add(parseDiagnosticReportDiagnosticReportMediaComponent(xpp, res)); 9030 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conclusion")) { 9031 res.setConclusionElement(parseString(xpp)); 9032 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conclusionCode")) { 9033 res.getConclusionCode().add(parseCodeableConcept(xpp)); 9034 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentedForm")) { 9035 res.getPresentedForm().add(parseAttachment(xpp)); 9036 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9037 return false; 9038 return true; 9039 } 9040 9041 protected DiagnosticReport.DiagnosticReportMediaComponent parseDiagnosticReportDiagnosticReportMediaComponent( 9042 XmlPullParser xpp, DiagnosticReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 9043 DiagnosticReport.DiagnosticReportMediaComponent res = new DiagnosticReport.DiagnosticReportMediaComponent(); 9044 parseBackboneAttributes(xpp, res); 9045 next(xpp); 9046 int eventType = nextNoWhitespace(xpp); 9047 while (eventType != XmlPullParser.END_TAG) { 9048 if (!parseDiagnosticReportDiagnosticReportMediaComponentContent(eventType, xpp, owner, res)) 9049 unknownContent(xpp); 9050 eventType = nextNoWhitespace(xpp); 9051 } 9052 next(xpp); 9053 parseElementClose(res); 9054 return res; 9055 } 9056 9057 protected boolean parseDiagnosticReportDiagnosticReportMediaComponentContent(int eventType, XmlPullParser xpp, 9058 DiagnosticReport owner, DiagnosticReport.DiagnosticReportMediaComponent res) 9059 throws XmlPullParserException, IOException, FHIRFormatError { 9060 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 9061 res.setCommentElement(parseString(xpp)); 9062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 9063 res.setLink(parseReference(xpp)); 9064 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9065 return false; 9066 return true; 9067 } 9068 9069 protected DocumentManifest parseDocumentManifest(XmlPullParser xpp) 9070 throws XmlPullParserException, IOException, FHIRFormatError { 9071 DocumentManifest res = new DocumentManifest(); 9072 parseDomainResourceAttributes(xpp, res); 9073 next(xpp); 9074 int eventType = nextNoWhitespace(xpp); 9075 while (eventType != XmlPullParser.END_TAG) { 9076 if (!parseDocumentManifestContent(eventType, xpp, res)) 9077 unknownContent(xpp); 9078 eventType = nextNoWhitespace(xpp); 9079 } 9080 next(xpp); 9081 parseElementClose(res); 9082 return res; 9083 } 9084 9085 protected boolean parseDocumentManifestContent(int eventType, XmlPullParser xpp, DocumentManifest res) 9086 throws XmlPullParserException, IOException, FHIRFormatError { 9087 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { 9088 res.setMasterIdentifier(parseIdentifier(xpp)); 9089 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9090 res.getIdentifier().add(parseIdentifier(xpp)); 9091 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9092 res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, 9093 new Enumerations.DocumentReferenceStatusEnumFactory())); 9094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9095 res.setType(parseCodeableConcept(xpp)); 9096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 9097 res.setSubject(parseReference(xpp)); 9098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 9099 res.setCreatedElement(parseDateTime(xpp)); 9100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 9101 res.getAuthor().add(parseReference(xpp)); 9102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 9103 res.getRecipient().add(parseReference(xpp)); 9104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 9105 res.setSourceElement(parseUri(xpp)); 9106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9107 res.setDescriptionElement(parseString(xpp)); 9108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { 9109 res.getContent().add(parseReference(xpp)); 9110 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { 9111 res.getRelated().add(parseDocumentManifestDocumentManifestRelatedComponent(xpp, res)); 9112 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9113 return false; 9114 return true; 9115 } 9116 9117 protected DocumentManifest.DocumentManifestRelatedComponent parseDocumentManifestDocumentManifestRelatedComponent( 9118 XmlPullParser xpp, DocumentManifest owner) throws XmlPullParserException, IOException, FHIRFormatError { 9119 DocumentManifest.DocumentManifestRelatedComponent res = new DocumentManifest.DocumentManifestRelatedComponent(); 9120 parseBackboneAttributes(xpp, res); 9121 next(xpp); 9122 int eventType = nextNoWhitespace(xpp); 9123 while (eventType != XmlPullParser.END_TAG) { 9124 if (!parseDocumentManifestDocumentManifestRelatedComponentContent(eventType, xpp, owner, res)) 9125 unknownContent(xpp); 9126 eventType = nextNoWhitespace(xpp); 9127 } 9128 next(xpp); 9129 parseElementClose(res); 9130 return res; 9131 } 9132 9133 protected boolean parseDocumentManifestDocumentManifestRelatedComponentContent(int eventType, XmlPullParser xpp, 9134 DocumentManifest owner, DocumentManifest.DocumentManifestRelatedComponent res) 9135 throws XmlPullParserException, IOException, FHIRFormatError { 9136 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9137 res.setIdentifier(parseIdentifier(xpp)); 9138 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ref")) { 9139 res.setRef(parseReference(xpp)); 9140 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9141 return false; 9142 return true; 9143 } 9144 9145 protected DocumentReference parseDocumentReference(XmlPullParser xpp) 9146 throws XmlPullParserException, IOException, FHIRFormatError { 9147 DocumentReference res = new DocumentReference(); 9148 parseDomainResourceAttributes(xpp, res); 9149 next(xpp); 9150 int eventType = nextNoWhitespace(xpp); 9151 while (eventType != XmlPullParser.END_TAG) { 9152 if (!parseDocumentReferenceContent(eventType, xpp, res)) 9153 unknownContent(xpp); 9154 eventType = nextNoWhitespace(xpp); 9155 } 9156 next(xpp); 9157 parseElementClose(res); 9158 return res; 9159 } 9160 9161 protected boolean parseDocumentReferenceContent(int eventType, XmlPullParser xpp, DocumentReference res) 9162 throws XmlPullParserException, IOException, FHIRFormatError { 9163 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterIdentifier")) { 9164 res.setMasterIdentifier(parseIdentifier(xpp)); 9165 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9166 res.getIdentifier().add(parseIdentifier(xpp)); 9167 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9168 res.setStatusElement(parseEnumeration(xpp, Enumerations.DocumentReferenceStatus.NULL, 9169 new Enumerations.DocumentReferenceStatusEnumFactory())); 9170 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("docStatus")) { 9171 res.setDocStatusElement(parseEnumeration(xpp, DocumentReference.ReferredDocumentStatus.NULL, 9172 new DocumentReference.ReferredDocumentStatusEnumFactory())); 9173 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9174 res.setType(parseCodeableConcept(xpp)); 9175 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 9176 res.getCategory().add(parseCodeableConcept(xpp)); 9177 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 9178 res.setSubject(parseReference(xpp)); 9179 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 9180 res.setDateElement(parseInstant(xpp)); 9181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 9182 res.getAuthor().add(parseReference(xpp)); 9183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authenticator")) { 9184 res.setAuthenticator(parseReference(xpp)); 9185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("custodian")) { 9186 res.setCustodian(parseReference(xpp)); 9187 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatesTo")) { 9188 res.getRelatesTo().add(parseDocumentReferenceDocumentReferenceRelatesToComponent(xpp, res)); 9189 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9190 res.setDescriptionElement(parseString(xpp)); 9191 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("securityLabel")) { 9192 res.getSecurityLabel().add(parseCodeableConcept(xpp)); 9193 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { 9194 res.getContent().add(parseDocumentReferenceDocumentReferenceContentComponent(xpp, res)); 9195 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 9196 res.setContext(parseDocumentReferenceDocumentReferenceContextComponent(xpp, res)); 9197 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9198 return false; 9199 return true; 9200 } 9201 9202 protected DocumentReference.DocumentReferenceRelatesToComponent parseDocumentReferenceDocumentReferenceRelatesToComponent( 9203 XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { 9204 DocumentReference.DocumentReferenceRelatesToComponent res = new DocumentReference.DocumentReferenceRelatesToComponent(); 9205 parseBackboneAttributes(xpp, res); 9206 next(xpp); 9207 int eventType = nextNoWhitespace(xpp); 9208 while (eventType != XmlPullParser.END_TAG) { 9209 if (!parseDocumentReferenceDocumentReferenceRelatesToComponentContent(eventType, xpp, owner, res)) 9210 unknownContent(xpp); 9211 eventType = nextNoWhitespace(xpp); 9212 } 9213 next(xpp); 9214 parseElementClose(res); 9215 return res; 9216 } 9217 9218 protected boolean parseDocumentReferenceDocumentReferenceRelatesToComponentContent(int eventType, XmlPullParser xpp, 9219 DocumentReference owner, DocumentReference.DocumentReferenceRelatesToComponent res) 9220 throws XmlPullParserException, IOException, FHIRFormatError { 9221 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 9222 res.setCodeElement(parseEnumeration(xpp, DocumentReference.DocumentRelationshipType.NULL, 9223 new DocumentReference.DocumentRelationshipTypeEnumFactory())); 9224 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 9225 res.setTarget(parseReference(xpp)); 9226 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9227 return false; 9228 return true; 9229 } 9230 9231 protected DocumentReference.DocumentReferenceContentComponent parseDocumentReferenceDocumentReferenceContentComponent( 9232 XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { 9233 DocumentReference.DocumentReferenceContentComponent res = new DocumentReference.DocumentReferenceContentComponent(); 9234 parseBackboneAttributes(xpp, res); 9235 next(xpp); 9236 int eventType = nextNoWhitespace(xpp); 9237 while (eventType != XmlPullParser.END_TAG) { 9238 if (!parseDocumentReferenceDocumentReferenceContentComponentContent(eventType, xpp, owner, res)) 9239 unknownContent(xpp); 9240 eventType = nextNoWhitespace(xpp); 9241 } 9242 next(xpp); 9243 parseElementClose(res); 9244 return res; 9245 } 9246 9247 protected boolean parseDocumentReferenceDocumentReferenceContentComponentContent(int eventType, XmlPullParser xpp, 9248 DocumentReference owner, DocumentReference.DocumentReferenceContentComponent res) 9249 throws XmlPullParserException, IOException, FHIRFormatError { 9250 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachment")) { 9251 res.setAttachment(parseAttachment(xpp)); 9252 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("format")) { 9253 res.setFormat(parseCoding(xpp)); 9254 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9255 return false; 9256 return true; 9257 } 9258 9259 protected DocumentReference.DocumentReferenceContextComponent parseDocumentReferenceDocumentReferenceContextComponent( 9260 XmlPullParser xpp, DocumentReference owner) throws XmlPullParserException, IOException, FHIRFormatError { 9261 DocumentReference.DocumentReferenceContextComponent res = new DocumentReference.DocumentReferenceContextComponent(); 9262 parseBackboneAttributes(xpp, res); 9263 next(xpp); 9264 int eventType = nextNoWhitespace(xpp); 9265 while (eventType != XmlPullParser.END_TAG) { 9266 if (!parseDocumentReferenceDocumentReferenceContextComponentContent(eventType, xpp, owner, res)) 9267 unknownContent(xpp); 9268 eventType = nextNoWhitespace(xpp); 9269 } 9270 next(xpp); 9271 parseElementClose(res); 9272 return res; 9273 } 9274 9275 protected boolean parseDocumentReferenceDocumentReferenceContextComponentContent(int eventType, XmlPullParser xpp, 9276 DocumentReference owner, DocumentReference.DocumentReferenceContextComponent res) 9277 throws XmlPullParserException, IOException, FHIRFormatError { 9278 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 9279 res.getEncounter().add(parseReference(xpp)); 9280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("event")) { 9281 res.getEvent().add(parseCodeableConcept(xpp)); 9282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9283 res.setPeriod(parsePeriod(xpp)); 9284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facilityType")) { 9285 res.setFacilityType(parseCodeableConcept(xpp)); 9286 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practiceSetting")) { 9287 res.setPracticeSetting(parseCodeableConcept(xpp)); 9288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourcePatientInfo")) { 9289 res.setSourcePatientInfo(parseReference(xpp)); 9290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { 9291 res.getRelated().add(parseReference(xpp)); 9292 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9293 return false; 9294 return true; 9295 } 9296 9297 protected EffectEvidenceSynthesis parseEffectEvidenceSynthesis(XmlPullParser xpp) 9298 throws XmlPullParserException, IOException, FHIRFormatError { 9299 EffectEvidenceSynthesis res = new EffectEvidenceSynthesis(); 9300 parseDomainResourceAttributes(xpp, res); 9301 next(xpp); 9302 int eventType = nextNoWhitespace(xpp); 9303 while (eventType != XmlPullParser.END_TAG) { 9304 if (!parseEffectEvidenceSynthesisContent(eventType, xpp, res)) 9305 unknownContent(xpp); 9306 eventType = nextNoWhitespace(xpp); 9307 } 9308 next(xpp); 9309 parseElementClose(res); 9310 return res; 9311 } 9312 9313 protected boolean parseEffectEvidenceSynthesisContent(int eventType, XmlPullParser xpp, EffectEvidenceSynthesis res) 9314 throws XmlPullParserException, IOException, FHIRFormatError { 9315 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 9316 res.setUrlElement(parseUri(xpp)); 9317 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9318 res.getIdentifier().add(parseIdentifier(xpp)); 9319 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 9320 res.setVersionElement(parseString(xpp)); 9321 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 9322 res.setNameElement(parseString(xpp)); 9323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 9324 res.setTitleElement(parseString(xpp)); 9325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9326 res.setStatusElement( 9327 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 9328 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 9329 res.setDateElement(parseDateTime(xpp)); 9330 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 9331 res.setPublisherElement(parseString(xpp)); 9332 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 9333 res.getContact().add(parseContactDetail(xpp)); 9334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9335 res.setDescriptionElement(parseMarkdown(xpp)); 9336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 9337 res.getNote().add(parseAnnotation(xpp)); 9338 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 9339 res.getUseContext().add(parseUsageContext(xpp)); 9340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 9341 res.getJurisdiction().add(parseCodeableConcept(xpp)); 9342 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 9343 res.setCopyrightElement(parseMarkdown(xpp)); 9344 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 9345 res.setApprovalDateElement(parseDate(xpp)); 9346 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 9347 res.setLastReviewDateElement(parseDate(xpp)); 9348 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 9349 res.setEffectivePeriod(parsePeriod(xpp)); 9350 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 9351 res.getTopic().add(parseCodeableConcept(xpp)); 9352 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 9353 res.getAuthor().add(parseContactDetail(xpp)); 9354 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 9355 res.getEditor().add(parseContactDetail(xpp)); 9356 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 9357 res.getReviewer().add(parseContactDetail(xpp)); 9358 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 9359 res.getEndorser().add(parseContactDetail(xpp)); 9360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 9361 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 9362 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("synthesisType")) { 9363 res.setSynthesisType(parseCodeableConcept(xpp)); 9364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("studyType")) { 9365 res.setStudyType(parseCodeableConcept(xpp)); 9366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 9367 res.setPopulation(parseReference(xpp)); 9368 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposure")) { 9369 res.setExposure(parseReference(xpp)); 9370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureAlternative")) { 9371 res.setExposureAlternative(parseReference(xpp)); 9372 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 9373 res.setOutcome(parseReference(xpp)); 9374 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sampleSize")) { 9375 res.setSampleSize(parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent(xpp, res)); 9376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resultsByExposure")) { 9377 res.getResultsByExposure() 9378 .add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(xpp, res)); 9379 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectEstimate")) { 9380 res.getEffectEstimate().add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(xpp, res)); 9381 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certainty")) { 9382 res.getCertainty().add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(xpp, res)); 9383 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9384 return false; 9385 return true; 9386 } 9387 9388 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent( 9389 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9390 EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent(); 9391 parseBackboneAttributes(xpp, res); 9392 next(xpp); 9393 int eventType = nextNoWhitespace(xpp); 9394 while (eventType != XmlPullParser.END_TAG) { 9395 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentContent(eventType, xpp, owner, res)) 9396 unknownContent(xpp); 9397 eventType = nextNoWhitespace(xpp); 9398 } 9399 next(xpp); 9400 parseElementClose(res); 9401 return res; 9402 } 9403 9404 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentContent(int eventType, 9405 XmlPullParser xpp, EffectEvidenceSynthesis owner, 9406 EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent res) 9407 throws XmlPullParserException, IOException, FHIRFormatError { 9408 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9409 res.setDescriptionElement(parseString(xpp)); 9410 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfStudies")) { 9411 res.setNumberOfStudiesElement(parseInteger(xpp)); 9412 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfParticipants")) { 9413 res.setNumberOfParticipantsElement(parseInteger(xpp)); 9414 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9415 return false; 9416 return true; 9417 } 9418 9419 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent( 9420 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9421 EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent(); 9422 parseBackboneAttributes(xpp, res); 9423 next(xpp); 9424 int eventType = nextNoWhitespace(xpp); 9425 while (eventType != XmlPullParser.END_TAG) { 9426 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentContent(eventType, xpp, owner, 9427 res)) 9428 unknownContent(xpp); 9429 eventType = nextNoWhitespace(xpp); 9430 } 9431 next(xpp); 9432 parseElementClose(res); 9433 return res; 9434 } 9435 9436 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentContent(int eventType, 9437 XmlPullParser xpp, EffectEvidenceSynthesis owner, 9438 EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent res) 9439 throws XmlPullParserException, IOException, FHIRFormatError { 9440 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9441 res.setDescriptionElement(parseString(xpp)); 9442 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureState")) { 9443 res.setExposureStateElement(parseEnumeration(xpp, EffectEvidenceSynthesis.ExposureState.NULL, 9444 new EffectEvidenceSynthesis.ExposureStateEnumFactory())); 9445 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantState")) { 9446 res.setVariantState(parseCodeableConcept(xpp)); 9447 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("riskEvidenceSynthesis")) { 9448 res.setRiskEvidenceSynthesis(parseReference(xpp)); 9449 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9450 return false; 9451 return true; 9452 } 9453 9454 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent( 9455 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9456 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent(); 9457 parseBackboneAttributes(xpp, res); 9458 next(xpp); 9459 int eventType = nextNoWhitespace(xpp); 9460 while (eventType != XmlPullParser.END_TAG) { 9461 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentContent(eventType, xpp, owner, 9462 res)) 9463 unknownContent(xpp); 9464 eventType = nextNoWhitespace(xpp); 9465 } 9466 next(xpp); 9467 parseElementClose(res); 9468 return res; 9469 } 9470 9471 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentContent(int eventType, 9472 XmlPullParser xpp, EffectEvidenceSynthesis owner, 9473 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent res) 9474 throws XmlPullParserException, IOException, FHIRFormatError { 9475 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 9476 res.setDescriptionElement(parseString(xpp)); 9477 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9478 res.setType(parseCodeableConcept(xpp)); 9479 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantState")) { 9480 res.setVariantState(parseCodeableConcept(xpp)); 9481 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 9482 res.setValueElement(parseDecimal(xpp)); 9483 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitOfMeasure")) { 9484 res.setUnitOfMeasure(parseCodeableConcept(xpp)); 9485 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precisionEstimate")) { 9486 res.getPrecisionEstimate() 9487 .add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(xpp, owner)); 9488 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9489 return false; 9490 return true; 9491 } 9492 9493 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent( 9494 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9495 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(); 9496 parseBackboneAttributes(xpp, res); 9497 next(xpp); 9498 int eventType = nextNoWhitespace(xpp); 9499 while (eventType != XmlPullParser.END_TAG) { 9500 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentContent(eventType, 9501 xpp, owner, res)) 9502 unknownContent(xpp); 9503 eventType = nextNoWhitespace(xpp); 9504 } 9505 next(xpp); 9506 parseElementClose(res); 9507 return res; 9508 } 9509 9510 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentContent( 9511 int eventType, XmlPullParser xpp, EffectEvidenceSynthesis owner, 9512 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent res) 9513 throws XmlPullParserException, IOException, FHIRFormatError { 9514 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9515 res.setType(parseCodeableConcept(xpp)); 9516 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("level")) { 9517 res.setLevelElement(parseDecimal(xpp)); 9518 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("from")) { 9519 res.setFromElement(parseDecimal(xpp)); 9520 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("to")) { 9521 res.setToElement(parseDecimal(xpp)); 9522 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9523 return false; 9524 return true; 9525 } 9526 9527 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent( 9528 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9529 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent(); 9530 parseBackboneAttributes(xpp, res); 9531 next(xpp); 9532 int eventType = nextNoWhitespace(xpp); 9533 while (eventType != XmlPullParser.END_TAG) { 9534 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentContent(eventType, xpp, owner, res)) 9535 unknownContent(xpp); 9536 eventType = nextNoWhitespace(xpp); 9537 } 9538 next(xpp); 9539 parseElementClose(res); 9540 return res; 9541 } 9542 9543 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentContent(int eventType, 9544 XmlPullParser xpp, EffectEvidenceSynthesis owner, 9545 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent res) 9546 throws XmlPullParserException, IOException, FHIRFormatError { 9547 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rating")) { 9548 res.getRating().add(parseCodeableConcept(xpp)); 9549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 9550 res.getNote().add(parseAnnotation(xpp)); 9551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certaintySubcomponent")) { 9552 res.getCertaintySubcomponent() 9553 .add(parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(xpp, owner)); 9554 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9555 return false; 9556 return true; 9557 } 9558 9559 protected EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent( 9560 XmlPullParser xpp, EffectEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 9561 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent res = new EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(); 9562 parseBackboneAttributes(xpp, res); 9563 next(xpp); 9564 int eventType = nextNoWhitespace(xpp); 9565 while (eventType != XmlPullParser.END_TAG) { 9566 if (!parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentContent(eventType, 9567 xpp, owner, res)) 9568 unknownContent(xpp); 9569 eventType = nextNoWhitespace(xpp); 9570 } 9571 next(xpp); 9572 parseElementClose(res); 9573 return res; 9574 } 9575 9576 protected boolean parseEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentContent( 9577 int eventType, XmlPullParser xpp, EffectEvidenceSynthesis owner, 9578 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent res) 9579 throws XmlPullParserException, IOException, FHIRFormatError { 9580 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9581 res.setType(parseCodeableConcept(xpp)); 9582 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rating")) { 9583 res.getRating().add(parseCodeableConcept(xpp)); 9584 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 9585 res.getNote().add(parseAnnotation(xpp)); 9586 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9587 return false; 9588 return true; 9589 } 9590 9591 protected Encounter parseEncounter(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 9592 Encounter res = new Encounter(); 9593 parseDomainResourceAttributes(xpp, res); 9594 next(xpp); 9595 int eventType = nextNoWhitespace(xpp); 9596 while (eventType != XmlPullParser.END_TAG) { 9597 if (!parseEncounterContent(eventType, xpp, res)) 9598 unknownContent(xpp); 9599 eventType = nextNoWhitespace(xpp); 9600 } 9601 next(xpp); 9602 parseElementClose(res); 9603 return res; 9604 } 9605 9606 protected boolean parseEncounterContent(int eventType, XmlPullParser xpp, Encounter res) 9607 throws XmlPullParserException, IOException, FHIRFormatError { 9608 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9609 res.getIdentifier().add(parseIdentifier(xpp)); 9610 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9611 res.setStatusElement( 9612 parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); 9613 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { 9614 res.getStatusHistory().add(parseEncounterStatusHistoryComponent(xpp, res)); 9615 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 9616 res.setClass_(parseCoding(xpp)); 9617 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classHistory")) { 9618 res.getClassHistory().add(parseEncounterClassHistoryComponent(xpp, res)); 9619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9620 res.getType().add(parseCodeableConcept(xpp)); 9621 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { 9622 res.setServiceType(parseCodeableConcept(xpp)); 9623 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 9624 res.setPriority(parseCodeableConcept(xpp)); 9625 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 9626 res.setSubject(parseReference(xpp)); 9627 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("episodeOfCare")) { 9628 res.getEpisodeOfCare().add(parseReference(xpp)); 9629 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 9630 res.getBasedOn().add(parseReference(xpp)); 9631 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 9632 res.getParticipant().add(parseEncounterEncounterParticipantComponent(xpp, res)); 9633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointment")) { 9634 res.getAppointment().add(parseReference(xpp)); 9635 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9636 res.setPeriod(parsePeriod(xpp)); 9637 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { 9638 res.setLength(parseDuration(xpp)); 9639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 9640 res.getReasonCode().add(parseCodeableConcept(xpp)); 9641 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 9642 res.getReasonReference().add(parseReference(xpp)); 9643 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { 9644 res.getDiagnosis().add(parseEncounterDiagnosisComponent(xpp, res)); 9645 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { 9646 res.getAccount().add(parseReference(xpp)); 9647 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hospitalization")) { 9648 res.setHospitalization(parseEncounterEncounterHospitalizationComponent(xpp, res)); 9649 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 9650 res.getLocation().add(parseEncounterEncounterLocationComponent(xpp, res)); 9651 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvider")) { 9652 res.setServiceProvider(parseReference(xpp)); 9653 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 9654 res.setPartOf(parseReference(xpp)); 9655 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9656 return false; 9657 return true; 9658 } 9659 9660 protected Encounter.StatusHistoryComponent parseEncounterStatusHistoryComponent(XmlPullParser xpp, Encounter owner) 9661 throws XmlPullParserException, IOException, FHIRFormatError { 9662 Encounter.StatusHistoryComponent res = new Encounter.StatusHistoryComponent(); 9663 parseBackboneAttributes(xpp, res); 9664 next(xpp); 9665 int eventType = nextNoWhitespace(xpp); 9666 while (eventType != XmlPullParser.END_TAG) { 9667 if (!parseEncounterStatusHistoryComponentContent(eventType, xpp, owner, res)) 9668 unknownContent(xpp); 9669 eventType = nextNoWhitespace(xpp); 9670 } 9671 next(xpp); 9672 parseElementClose(res); 9673 return res; 9674 } 9675 9676 protected boolean parseEncounterStatusHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, 9677 Encounter.StatusHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 9678 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9679 res.setStatusElement( 9680 parseEnumeration(xpp, Encounter.EncounterStatus.NULL, new Encounter.EncounterStatusEnumFactory())); 9681 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9682 res.setPeriod(parsePeriod(xpp)); 9683 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9684 return false; 9685 return true; 9686 } 9687 9688 protected Encounter.ClassHistoryComponent parseEncounterClassHistoryComponent(XmlPullParser xpp, Encounter owner) 9689 throws XmlPullParserException, IOException, FHIRFormatError { 9690 Encounter.ClassHistoryComponent res = new Encounter.ClassHistoryComponent(); 9691 parseBackboneAttributes(xpp, res); 9692 next(xpp); 9693 int eventType = nextNoWhitespace(xpp); 9694 while (eventType != XmlPullParser.END_TAG) { 9695 if (!parseEncounterClassHistoryComponentContent(eventType, xpp, owner, res)) 9696 unknownContent(xpp); 9697 eventType = nextNoWhitespace(xpp); 9698 } 9699 next(xpp); 9700 parseElementClose(res); 9701 return res; 9702 } 9703 9704 protected boolean parseEncounterClassHistoryComponentContent(int eventType, XmlPullParser xpp, Encounter owner, 9705 Encounter.ClassHistoryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 9706 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 9707 res.setClass_(parseCoding(xpp)); 9708 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9709 res.setPeriod(parsePeriod(xpp)); 9710 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9711 return false; 9712 return true; 9713 } 9714 9715 protected Encounter.EncounterParticipantComponent parseEncounterEncounterParticipantComponent(XmlPullParser xpp, 9716 Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { 9717 Encounter.EncounterParticipantComponent res = new Encounter.EncounterParticipantComponent(); 9718 parseBackboneAttributes(xpp, res); 9719 next(xpp); 9720 int eventType = nextNoWhitespace(xpp); 9721 while (eventType != XmlPullParser.END_TAG) { 9722 if (!parseEncounterEncounterParticipantComponentContent(eventType, xpp, owner, res)) 9723 unknownContent(xpp); 9724 eventType = nextNoWhitespace(xpp); 9725 } 9726 next(xpp); 9727 parseElementClose(res); 9728 return res; 9729 } 9730 9731 protected boolean parseEncounterEncounterParticipantComponentContent(int eventType, XmlPullParser xpp, 9732 Encounter owner, Encounter.EncounterParticipantComponent res) 9733 throws XmlPullParserException, IOException, FHIRFormatError { 9734 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9735 res.getType().add(parseCodeableConcept(xpp)); 9736 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9737 res.setPeriod(parsePeriod(xpp)); 9738 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { 9739 res.setIndividual(parseReference(xpp)); 9740 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9741 return false; 9742 return true; 9743 } 9744 9745 protected Encounter.DiagnosisComponent parseEncounterDiagnosisComponent(XmlPullParser xpp, Encounter owner) 9746 throws XmlPullParserException, IOException, FHIRFormatError { 9747 Encounter.DiagnosisComponent res = new Encounter.DiagnosisComponent(); 9748 parseBackboneAttributes(xpp, res); 9749 next(xpp); 9750 int eventType = nextNoWhitespace(xpp); 9751 while (eventType != XmlPullParser.END_TAG) { 9752 if (!parseEncounterDiagnosisComponentContent(eventType, xpp, owner, res)) 9753 unknownContent(xpp); 9754 eventType = nextNoWhitespace(xpp); 9755 } 9756 next(xpp); 9757 parseElementClose(res); 9758 return res; 9759 } 9760 9761 protected boolean parseEncounterDiagnosisComponentContent(int eventType, XmlPullParser xpp, Encounter owner, 9762 Encounter.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 9763 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 9764 res.setCondition(parseReference(xpp)); 9765 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 9766 res.setUse(parseCodeableConcept(xpp)); 9767 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { 9768 res.setRankElement(parsePositiveInt(xpp)); 9769 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9770 return false; 9771 return true; 9772 } 9773 9774 protected Encounter.EncounterHospitalizationComponent parseEncounterEncounterHospitalizationComponent( 9775 XmlPullParser xpp, Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { 9776 Encounter.EncounterHospitalizationComponent res = new Encounter.EncounterHospitalizationComponent(); 9777 parseBackboneAttributes(xpp, res); 9778 next(xpp); 9779 int eventType = nextNoWhitespace(xpp); 9780 while (eventType != XmlPullParser.END_TAG) { 9781 if (!parseEncounterEncounterHospitalizationComponentContent(eventType, xpp, owner, res)) 9782 unknownContent(xpp); 9783 eventType = nextNoWhitespace(xpp); 9784 } 9785 next(xpp); 9786 parseElementClose(res); 9787 return res; 9788 } 9789 9790 protected boolean parseEncounterEncounterHospitalizationComponentContent(int eventType, XmlPullParser xpp, 9791 Encounter owner, Encounter.EncounterHospitalizationComponent res) 9792 throws XmlPullParserException, IOException, FHIRFormatError { 9793 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAdmissionIdentifier")) { 9794 res.setPreAdmissionIdentifier(parseIdentifier(xpp)); 9795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { 9796 res.setOrigin(parseReference(xpp)); 9797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("admitSource")) { 9798 res.setAdmitSource(parseCodeableConcept(xpp)); 9799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reAdmission")) { 9800 res.setReAdmission(parseCodeableConcept(xpp)); 9801 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dietPreference")) { 9802 res.getDietPreference().add(parseCodeableConcept(xpp)); 9803 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialCourtesy")) { 9804 res.getSpecialCourtesy().add(parseCodeableConcept(xpp)); 9805 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialArrangement")) { 9806 res.getSpecialArrangement().add(parseCodeableConcept(xpp)); 9807 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 9808 res.setDestination(parseReference(xpp)); 9809 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dischargeDisposition")) { 9810 res.setDischargeDisposition(parseCodeableConcept(xpp)); 9811 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9812 return false; 9813 return true; 9814 } 9815 9816 protected Encounter.EncounterLocationComponent parseEncounterEncounterLocationComponent(XmlPullParser xpp, 9817 Encounter owner) throws XmlPullParserException, IOException, FHIRFormatError { 9818 Encounter.EncounterLocationComponent res = new Encounter.EncounterLocationComponent(); 9819 parseBackboneAttributes(xpp, res); 9820 next(xpp); 9821 int eventType = nextNoWhitespace(xpp); 9822 while (eventType != XmlPullParser.END_TAG) { 9823 if (!parseEncounterEncounterLocationComponentContent(eventType, xpp, owner, res)) 9824 unknownContent(xpp); 9825 eventType = nextNoWhitespace(xpp); 9826 } 9827 next(xpp); 9828 parseElementClose(res); 9829 return res; 9830 } 9831 9832 protected boolean parseEncounterEncounterLocationComponentContent(int eventType, XmlPullParser xpp, Encounter owner, 9833 Encounter.EncounterLocationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 9834 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 9835 res.setLocation(parseReference(xpp)); 9836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9837 res.setStatusElement(parseEnumeration(xpp, Encounter.EncounterLocationStatus.NULL, 9838 new Encounter.EncounterLocationStatusEnumFactory())); 9839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalType")) { 9840 res.setPhysicalType(parseCodeableConcept(xpp)); 9841 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9842 res.setPeriod(parsePeriod(xpp)); 9843 } else if (!parseBackboneElementContent(eventType, xpp, res)) 9844 return false; 9845 return true; 9846 } 9847 9848 protected Endpoint parseEndpoint(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 9849 Endpoint res = new Endpoint(); 9850 parseDomainResourceAttributes(xpp, res); 9851 next(xpp); 9852 int eventType = nextNoWhitespace(xpp); 9853 while (eventType != XmlPullParser.END_TAG) { 9854 if (!parseEndpointContent(eventType, xpp, res)) 9855 unknownContent(xpp); 9856 eventType = nextNoWhitespace(xpp); 9857 } 9858 next(xpp); 9859 parseElementClose(res); 9860 return res; 9861 } 9862 9863 protected boolean parseEndpointContent(int eventType, XmlPullParser xpp, Endpoint res) 9864 throws XmlPullParserException, IOException, FHIRFormatError { 9865 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9866 res.getIdentifier().add(parseIdentifier(xpp)); 9867 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9868 res.setStatusElement( 9869 parseEnumeration(xpp, Endpoint.EndpointStatus.NULL, new Endpoint.EndpointStatusEnumFactory())); 9870 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("connectionType")) { 9871 res.setConnectionType(parseCoding(xpp)); 9872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 9873 res.setNameElement(parseString(xpp)); 9874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 9875 res.setManagingOrganization(parseReference(xpp)); 9876 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 9877 res.getContact().add(parseContactPoint(xpp)); 9878 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 9879 res.setPeriod(parsePeriod(xpp)); 9880 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadType")) { 9881 res.getPayloadType().add(parseCodeableConcept(xpp)); 9882 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payloadMimeType")) { 9883 res.getPayloadMimeType().add(parseCode(xpp)); 9884 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 9885 res.setAddressElement(parseUrl(xpp)); 9886 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { 9887 res.getHeader().add(parseString(xpp)); 9888 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9889 return false; 9890 return true; 9891 } 9892 9893 protected EnrollmentRequest parseEnrollmentRequest(XmlPullParser xpp) 9894 throws XmlPullParserException, IOException, FHIRFormatError { 9895 EnrollmentRequest res = new EnrollmentRequest(); 9896 parseDomainResourceAttributes(xpp, res); 9897 next(xpp); 9898 int eventType = nextNoWhitespace(xpp); 9899 while (eventType != XmlPullParser.END_TAG) { 9900 if (!parseEnrollmentRequestContent(eventType, xpp, res)) 9901 unknownContent(xpp); 9902 eventType = nextNoWhitespace(xpp); 9903 } 9904 next(xpp); 9905 parseElementClose(res); 9906 return res; 9907 } 9908 9909 protected boolean parseEnrollmentRequestContent(int eventType, XmlPullParser xpp, EnrollmentRequest res) 9910 throws XmlPullParserException, IOException, FHIRFormatError { 9911 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9912 res.getIdentifier().add(parseIdentifier(xpp)); 9913 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9914 res.setStatusElement(parseEnumeration(xpp, EnrollmentRequest.EnrollmentRequestStatus.NULL, 9915 new EnrollmentRequest.EnrollmentRequestStatusEnumFactory())); 9916 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 9917 res.setCreatedElement(parseDateTime(xpp)); 9918 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 9919 res.setInsurer(parseReference(xpp)); 9920 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 9921 res.setProvider(parseReference(xpp)); 9922 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("candidate")) { 9923 res.setCandidate(parseReference(xpp)); 9924 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 9925 res.setCoverage(parseReference(xpp)); 9926 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9927 return false; 9928 return true; 9929 } 9930 9931 protected EnrollmentResponse parseEnrollmentResponse(XmlPullParser xpp) 9932 throws XmlPullParserException, IOException, FHIRFormatError { 9933 EnrollmentResponse res = new EnrollmentResponse(); 9934 parseDomainResourceAttributes(xpp, res); 9935 next(xpp); 9936 int eventType = nextNoWhitespace(xpp); 9937 while (eventType != XmlPullParser.END_TAG) { 9938 if (!parseEnrollmentResponseContent(eventType, xpp, res)) 9939 unknownContent(xpp); 9940 eventType = nextNoWhitespace(xpp); 9941 } 9942 next(xpp); 9943 parseElementClose(res); 9944 return res; 9945 } 9946 9947 protected boolean parseEnrollmentResponseContent(int eventType, XmlPullParser xpp, EnrollmentResponse res) 9948 throws XmlPullParserException, IOException, FHIRFormatError { 9949 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9950 res.getIdentifier().add(parseIdentifier(xpp)); 9951 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9952 res.setStatusElement(parseEnumeration(xpp, EnrollmentResponse.EnrollmentResponseStatus.NULL, 9953 new EnrollmentResponse.EnrollmentResponseStatusEnumFactory())); 9954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 9955 res.setRequest(parseReference(xpp)); 9956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 9957 res.setOutcomeElement( 9958 parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); 9959 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { 9960 res.setDispositionElement(parseString(xpp)); 9961 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 9962 res.setCreatedElement(parseDateTime(xpp)); 9963 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 9964 res.setOrganization(parseReference(xpp)); 9965 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestProvider")) { 9966 res.setRequestProvider(parseReference(xpp)); 9967 } else if (!parseDomainResourceContent(eventType, xpp, res)) 9968 return false; 9969 return true; 9970 } 9971 9972 protected EpisodeOfCare parseEpisodeOfCare(XmlPullParser xpp) 9973 throws XmlPullParserException, IOException, FHIRFormatError { 9974 EpisodeOfCare res = new EpisodeOfCare(); 9975 parseDomainResourceAttributes(xpp, res); 9976 next(xpp); 9977 int eventType = nextNoWhitespace(xpp); 9978 while (eventType != XmlPullParser.END_TAG) { 9979 if (!parseEpisodeOfCareContent(eventType, xpp, res)) 9980 unknownContent(xpp); 9981 eventType = nextNoWhitespace(xpp); 9982 } 9983 next(xpp); 9984 parseElementClose(res); 9985 return res; 9986 } 9987 9988 protected boolean parseEpisodeOfCareContent(int eventType, XmlPullParser xpp, EpisodeOfCare res) 9989 throws XmlPullParserException, IOException, FHIRFormatError { 9990 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 9991 res.getIdentifier().add(parseIdentifier(xpp)); 9992 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 9993 res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, 9994 new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); 9995 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusHistory")) { 9996 res.getStatusHistory().add(parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent(xpp, res)); 9997 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 9998 res.getType().add(parseCodeableConcept(xpp)); 9999 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { 10000 res.getDiagnosis().add(parseEpisodeOfCareDiagnosisComponent(xpp, res)); 10001 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 10002 res.setPatient(parseReference(xpp)); 10003 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 10004 res.setManagingOrganization(parseReference(xpp)); 10005 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 10006 res.setPeriod(parsePeriod(xpp)); 10007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralRequest")) { 10008 res.getReferralRequest().add(parseReference(xpp)); 10009 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careManager")) { 10010 res.setCareManager(parseReference(xpp)); 10011 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("team")) { 10012 res.getTeam().add(parseReference(xpp)); 10013 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { 10014 res.getAccount().add(parseReference(xpp)); 10015 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10016 return false; 10017 return true; 10018 } 10019 10020 protected EpisodeOfCare.EpisodeOfCareStatusHistoryComponent parseEpisodeOfCareEpisodeOfCareStatusHistoryComponent( 10021 XmlPullParser xpp, EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { 10022 EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res = new EpisodeOfCare.EpisodeOfCareStatusHistoryComponent(); 10023 parseBackboneAttributes(xpp, res); 10024 next(xpp); 10025 int eventType = nextNoWhitespace(xpp); 10026 while (eventType != XmlPullParser.END_TAG) { 10027 if (!parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(eventType, xpp, owner, res)) 10028 unknownContent(xpp); 10029 eventType = nextNoWhitespace(xpp); 10030 } 10031 next(xpp); 10032 parseElementClose(res); 10033 return res; 10034 } 10035 10036 protected boolean parseEpisodeOfCareEpisodeOfCareStatusHistoryComponentContent(int eventType, XmlPullParser xpp, 10037 EpisodeOfCare owner, EpisodeOfCare.EpisodeOfCareStatusHistoryComponent res) 10038 throws XmlPullParserException, IOException, FHIRFormatError { 10039 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10040 res.setStatusElement(parseEnumeration(xpp, EpisodeOfCare.EpisodeOfCareStatus.NULL, 10041 new EpisodeOfCare.EpisodeOfCareStatusEnumFactory())); 10042 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 10043 res.setPeriod(parsePeriod(xpp)); 10044 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10045 return false; 10046 return true; 10047 } 10048 10049 protected EpisodeOfCare.DiagnosisComponent parseEpisodeOfCareDiagnosisComponent(XmlPullParser xpp, 10050 EpisodeOfCare owner) throws XmlPullParserException, IOException, FHIRFormatError { 10051 EpisodeOfCare.DiagnosisComponent res = new EpisodeOfCare.DiagnosisComponent(); 10052 parseBackboneAttributes(xpp, res); 10053 next(xpp); 10054 int eventType = nextNoWhitespace(xpp); 10055 while (eventType != XmlPullParser.END_TAG) { 10056 if (!parseEpisodeOfCareDiagnosisComponentContent(eventType, xpp, owner, res)) 10057 unknownContent(xpp); 10058 eventType = nextNoWhitespace(xpp); 10059 } 10060 next(xpp); 10061 parseElementClose(res); 10062 return res; 10063 } 10064 10065 protected boolean parseEpisodeOfCareDiagnosisComponentContent(int eventType, XmlPullParser xpp, EpisodeOfCare owner, 10066 EpisodeOfCare.DiagnosisComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 10067 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 10068 res.setCondition(parseReference(xpp)); 10069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 10070 res.setRole(parseCodeableConcept(xpp)); 10071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rank")) { 10072 res.setRankElement(parsePositiveInt(xpp)); 10073 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10074 return false; 10075 return true; 10076 } 10077 10078 protected EventDefinition parseEventDefinition(XmlPullParser xpp) 10079 throws XmlPullParserException, IOException, FHIRFormatError { 10080 EventDefinition res = new EventDefinition(); 10081 parseDomainResourceAttributes(xpp, res); 10082 next(xpp); 10083 int eventType = nextNoWhitespace(xpp); 10084 while (eventType != XmlPullParser.END_TAG) { 10085 if (!parseEventDefinitionContent(eventType, xpp, res)) 10086 unknownContent(xpp); 10087 eventType = nextNoWhitespace(xpp); 10088 } 10089 next(xpp); 10090 parseElementClose(res); 10091 return res; 10092 } 10093 10094 protected boolean parseEventDefinitionContent(int eventType, XmlPullParser xpp, EventDefinition res) 10095 throws XmlPullParserException, IOException, FHIRFormatError { 10096 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 10097 res.setUrlElement(parseUri(xpp)); 10098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 10099 res.getIdentifier().add(parseIdentifier(xpp)); 10100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 10101 res.setVersionElement(parseString(xpp)); 10102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10103 res.setNameElement(parseString(xpp)); 10104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 10105 res.setTitleElement(parseString(xpp)); 10106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 10107 res.setSubtitleElement(parseString(xpp)); 10108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10109 res.setStatusElement( 10110 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 10111 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 10112 res.setExperimentalElement(parseBoolean(xpp)); 10113 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 10114 res.setSubject(parseType("subject", xpp)); 10115 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 10116 res.setDateElement(parseDateTime(xpp)); 10117 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 10118 res.setPublisherElement(parseString(xpp)); 10119 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 10120 res.getContact().add(parseContactDetail(xpp)); 10121 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10122 res.setDescriptionElement(parseMarkdown(xpp)); 10123 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 10124 res.getUseContext().add(parseUsageContext(xpp)); 10125 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 10126 res.getJurisdiction().add(parseCodeableConcept(xpp)); 10127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 10128 res.setPurposeElement(parseMarkdown(xpp)); 10129 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 10130 res.setUsageElement(parseString(xpp)); 10131 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 10132 res.setCopyrightElement(parseMarkdown(xpp)); 10133 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 10134 res.setApprovalDateElement(parseDate(xpp)); 10135 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 10136 res.setLastReviewDateElement(parseDate(xpp)); 10137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 10138 res.setEffectivePeriod(parsePeriod(xpp)); 10139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 10140 res.getTopic().add(parseCodeableConcept(xpp)); 10141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 10142 res.getAuthor().add(parseContactDetail(xpp)); 10143 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 10144 res.getEditor().add(parseContactDetail(xpp)); 10145 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 10146 res.getReviewer().add(parseContactDetail(xpp)); 10147 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 10148 res.getEndorser().add(parseContactDetail(xpp)); 10149 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 10150 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 10151 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("trigger")) { 10152 res.getTrigger().add(parseTriggerDefinition(xpp)); 10153 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10154 return false; 10155 return true; 10156 } 10157 10158 protected Evidence parseEvidence(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 10159 Evidence res = new Evidence(); 10160 parseDomainResourceAttributes(xpp, res); 10161 next(xpp); 10162 int eventType = nextNoWhitespace(xpp); 10163 while (eventType != XmlPullParser.END_TAG) { 10164 if (!parseEvidenceContent(eventType, xpp, res)) 10165 unknownContent(xpp); 10166 eventType = nextNoWhitespace(xpp); 10167 } 10168 next(xpp); 10169 parseElementClose(res); 10170 return res; 10171 } 10172 10173 protected boolean parseEvidenceContent(int eventType, XmlPullParser xpp, Evidence res) 10174 throws XmlPullParserException, IOException, FHIRFormatError { 10175 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 10176 res.setUrlElement(parseUri(xpp)); 10177 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 10178 res.getIdentifier().add(parseIdentifier(xpp)); 10179 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 10180 res.setVersionElement(parseString(xpp)); 10181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10182 res.setNameElement(parseString(xpp)); 10183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 10184 res.setTitleElement(parseString(xpp)); 10185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shortTitle")) { 10186 res.setShortTitleElement(parseString(xpp)); 10187 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 10188 res.setSubtitleElement(parseString(xpp)); 10189 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10190 res.setStatusElement( 10191 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 10192 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 10193 res.setDateElement(parseDateTime(xpp)); 10194 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 10195 res.setPublisherElement(parseString(xpp)); 10196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 10197 res.getContact().add(parseContactDetail(xpp)); 10198 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10199 res.setDescriptionElement(parseMarkdown(xpp)); 10200 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 10201 res.getNote().add(parseAnnotation(xpp)); 10202 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 10203 res.getUseContext().add(parseUsageContext(xpp)); 10204 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 10205 res.getJurisdiction().add(parseCodeableConcept(xpp)); 10206 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 10207 res.setCopyrightElement(parseMarkdown(xpp)); 10208 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 10209 res.setApprovalDateElement(parseDate(xpp)); 10210 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 10211 res.setLastReviewDateElement(parseDate(xpp)); 10212 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 10213 res.setEffectivePeriod(parsePeriod(xpp)); 10214 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 10215 res.getTopic().add(parseCodeableConcept(xpp)); 10216 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 10217 res.getAuthor().add(parseContactDetail(xpp)); 10218 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 10219 res.getEditor().add(parseContactDetail(xpp)); 10220 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 10221 res.getReviewer().add(parseContactDetail(xpp)); 10222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 10223 res.getEndorser().add(parseContactDetail(xpp)); 10224 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 10225 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 10226 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureBackground")) { 10227 res.setExposureBackground(parseReference(xpp)); 10228 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureVariant")) { 10229 res.getExposureVariant().add(parseReference(xpp)); 10230 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 10231 res.getOutcome().add(parseReference(xpp)); 10232 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10233 return false; 10234 return true; 10235 } 10236 10237 protected EvidenceVariable parseEvidenceVariable(XmlPullParser xpp) 10238 throws XmlPullParserException, IOException, FHIRFormatError { 10239 EvidenceVariable res = new EvidenceVariable(); 10240 parseDomainResourceAttributes(xpp, res); 10241 next(xpp); 10242 int eventType = nextNoWhitespace(xpp); 10243 while (eventType != XmlPullParser.END_TAG) { 10244 if (!parseEvidenceVariableContent(eventType, xpp, res)) 10245 unknownContent(xpp); 10246 eventType = nextNoWhitespace(xpp); 10247 } 10248 next(xpp); 10249 parseElementClose(res); 10250 return res; 10251 } 10252 10253 protected boolean parseEvidenceVariableContent(int eventType, XmlPullParser xpp, EvidenceVariable res) 10254 throws XmlPullParserException, IOException, FHIRFormatError { 10255 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 10256 res.setUrlElement(parseUri(xpp)); 10257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 10258 res.getIdentifier().add(parseIdentifier(xpp)); 10259 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 10260 res.setVersionElement(parseString(xpp)); 10261 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10262 res.setNameElement(parseString(xpp)); 10263 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 10264 res.setTitleElement(parseString(xpp)); 10265 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shortTitle")) { 10266 res.setShortTitleElement(parseString(xpp)); 10267 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 10268 res.setSubtitleElement(parseString(xpp)); 10269 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10270 res.setStatusElement( 10271 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 10272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 10273 res.setDateElement(parseDateTime(xpp)); 10274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 10275 res.setPublisherElement(parseString(xpp)); 10276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 10277 res.getContact().add(parseContactDetail(xpp)); 10278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10279 res.setDescriptionElement(parseMarkdown(xpp)); 10280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 10281 res.getNote().add(parseAnnotation(xpp)); 10282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 10283 res.getUseContext().add(parseUsageContext(xpp)); 10284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 10285 res.getJurisdiction().add(parseCodeableConcept(xpp)); 10286 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 10287 res.setCopyrightElement(parseMarkdown(xpp)); 10288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 10289 res.setApprovalDateElement(parseDate(xpp)); 10290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 10291 res.setLastReviewDateElement(parseDate(xpp)); 10292 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 10293 res.setEffectivePeriod(parsePeriod(xpp)); 10294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 10295 res.getTopic().add(parseCodeableConcept(xpp)); 10296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 10297 res.getAuthor().add(parseContactDetail(xpp)); 10298 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 10299 res.getEditor().add(parseContactDetail(xpp)); 10300 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 10301 res.getReviewer().add(parseContactDetail(xpp)); 10302 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 10303 res.getEndorser().add(parseContactDetail(xpp)); 10304 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 10305 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 10306 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10307 res.setTypeElement(parseEnumeration(xpp, EvidenceVariable.EvidenceVariableType.NULL, 10308 new EvidenceVariable.EvidenceVariableTypeEnumFactory())); 10309 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { 10310 res.getCharacteristic().add(parseEvidenceVariableEvidenceVariableCharacteristicComponent(xpp, res)); 10311 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10312 return false; 10313 return true; 10314 } 10315 10316 protected EvidenceVariable.EvidenceVariableCharacteristicComponent parseEvidenceVariableEvidenceVariableCharacteristicComponent( 10317 XmlPullParser xpp, EvidenceVariable owner) throws XmlPullParserException, IOException, FHIRFormatError { 10318 EvidenceVariable.EvidenceVariableCharacteristicComponent res = new EvidenceVariable.EvidenceVariableCharacteristicComponent(); 10319 parseBackboneAttributes(xpp, res); 10320 next(xpp); 10321 int eventType = nextNoWhitespace(xpp); 10322 while (eventType != XmlPullParser.END_TAG) { 10323 if (!parseEvidenceVariableEvidenceVariableCharacteristicComponentContent(eventType, xpp, owner, res)) 10324 unknownContent(xpp); 10325 eventType = nextNoWhitespace(xpp); 10326 } 10327 next(xpp); 10328 parseElementClose(res); 10329 return res; 10330 } 10331 10332 protected boolean parseEvidenceVariableEvidenceVariableCharacteristicComponentContent(int eventType, 10333 XmlPullParser xpp, EvidenceVariable owner, EvidenceVariable.EvidenceVariableCharacteristicComponent res) 10334 throws XmlPullParserException, IOException, FHIRFormatError { 10335 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10336 res.setDescriptionElement(parseString(xpp)); 10337 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definition")) { 10338 res.setDefinition(parseType("definition", xpp)); 10339 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usageContext")) { 10340 res.getUsageContext().add(parseUsageContext(xpp)); 10341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { 10342 res.setExcludeElement(parseBoolean(xpp)); 10343 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "participantEffective")) { 10344 res.setParticipantEffective(parseType("participantEffective", xpp)); 10345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeFromStart")) { 10346 res.setTimeFromStart(parseDuration(xpp)); 10347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupMeasure")) { 10348 res.setGroupMeasureElement( 10349 parseEnumeration(xpp, EvidenceVariable.GroupMeasure.NULL, new EvidenceVariable.GroupMeasureEnumFactory())); 10350 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10351 return false; 10352 return true; 10353 } 10354 10355 protected ExampleScenario parseExampleScenario(XmlPullParser xpp) 10356 throws XmlPullParserException, IOException, FHIRFormatError { 10357 ExampleScenario res = new ExampleScenario(); 10358 parseDomainResourceAttributes(xpp, res); 10359 next(xpp); 10360 int eventType = nextNoWhitespace(xpp); 10361 while (eventType != XmlPullParser.END_TAG) { 10362 if (!parseExampleScenarioContent(eventType, xpp, res)) 10363 unknownContent(xpp); 10364 eventType = nextNoWhitespace(xpp); 10365 } 10366 next(xpp); 10367 parseElementClose(res); 10368 return res; 10369 } 10370 10371 protected boolean parseExampleScenarioContent(int eventType, XmlPullParser xpp, ExampleScenario res) 10372 throws XmlPullParserException, IOException, FHIRFormatError { 10373 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 10374 res.setUrlElement(parseUri(xpp)); 10375 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 10376 res.getIdentifier().add(parseIdentifier(xpp)); 10377 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 10378 res.setVersionElement(parseString(xpp)); 10379 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10380 res.setNameElement(parseString(xpp)); 10381 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10382 res.setStatusElement( 10383 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 10384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 10385 res.setExperimentalElement(parseBoolean(xpp)); 10386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 10387 res.setDateElement(parseDateTime(xpp)); 10388 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 10389 res.setPublisherElement(parseString(xpp)); 10390 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 10391 res.getContact().add(parseContactDetail(xpp)); 10392 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 10393 res.getUseContext().add(parseUsageContext(xpp)); 10394 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 10395 res.getJurisdiction().add(parseCodeableConcept(xpp)); 10396 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 10397 res.setCopyrightElement(parseMarkdown(xpp)); 10398 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 10399 res.setPurposeElement(parseMarkdown(xpp)); 10400 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 10401 res.getActor().add(parseExampleScenarioExampleScenarioActorComponent(xpp, res)); 10402 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 10403 res.getInstance().add(parseExampleScenarioExampleScenarioInstanceComponent(xpp, res)); 10404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("process")) { 10405 res.getProcess().add(parseExampleScenarioExampleScenarioProcessComponent(xpp, res)); 10406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("workflow")) { 10407 res.getWorkflow().add(parseCanonical(xpp)); 10408 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10409 return false; 10410 return true; 10411 } 10412 10413 protected ExampleScenario.ExampleScenarioActorComponent parseExampleScenarioExampleScenarioActorComponent( 10414 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10415 ExampleScenario.ExampleScenarioActorComponent res = new ExampleScenario.ExampleScenarioActorComponent(); 10416 parseBackboneAttributes(xpp, res); 10417 next(xpp); 10418 int eventType = nextNoWhitespace(xpp); 10419 while (eventType != XmlPullParser.END_TAG) { 10420 if (!parseExampleScenarioExampleScenarioActorComponentContent(eventType, xpp, owner, res)) 10421 unknownContent(xpp); 10422 eventType = nextNoWhitespace(xpp); 10423 } 10424 next(xpp); 10425 parseElementClose(res); 10426 return res; 10427 } 10428 10429 protected boolean parseExampleScenarioExampleScenarioActorComponentContent(int eventType, XmlPullParser xpp, 10430 ExampleScenario owner, ExampleScenario.ExampleScenarioActorComponent res) 10431 throws XmlPullParserException, IOException, FHIRFormatError { 10432 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actorId")) { 10433 res.setActorIdElement(parseString(xpp)); 10434 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10435 res.setTypeElement(parseEnumeration(xpp, ExampleScenario.ExampleScenarioActorType.NULL, 10436 new ExampleScenario.ExampleScenarioActorTypeEnumFactory())); 10437 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10438 res.setNameElement(parseString(xpp)); 10439 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10440 res.setDescriptionElement(parseMarkdown(xpp)); 10441 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10442 return false; 10443 return true; 10444 } 10445 10446 protected ExampleScenario.ExampleScenarioInstanceComponent parseExampleScenarioExampleScenarioInstanceComponent( 10447 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10448 ExampleScenario.ExampleScenarioInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceComponent(); 10449 parseBackboneAttributes(xpp, res); 10450 next(xpp); 10451 int eventType = nextNoWhitespace(xpp); 10452 while (eventType != XmlPullParser.END_TAG) { 10453 if (!parseExampleScenarioExampleScenarioInstanceComponentContent(eventType, xpp, owner, res)) 10454 unknownContent(xpp); 10455 eventType = nextNoWhitespace(xpp); 10456 } 10457 next(xpp); 10458 parseElementClose(res); 10459 return res; 10460 } 10461 10462 protected boolean parseExampleScenarioExampleScenarioInstanceComponentContent(int eventType, XmlPullParser xpp, 10463 ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceComponent res) 10464 throws XmlPullParserException, IOException, FHIRFormatError { 10465 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceId")) { 10466 res.setResourceIdElement(parseString(xpp)); 10467 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceType")) { 10468 res.setResourceTypeElement(parseEnumeration(xpp, ExampleScenario.FHIRResourceType.NULL, 10469 new ExampleScenario.FHIRResourceTypeEnumFactory())); 10470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10471 res.setNameElement(parseString(xpp)); 10472 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10473 res.setDescriptionElement(parseMarkdown(xpp)); 10474 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 10475 res.getVersion().add(parseExampleScenarioExampleScenarioInstanceVersionComponent(xpp, owner)); 10476 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("containedInstance")) { 10477 res.getContainedInstance().add(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); 10478 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10479 return false; 10480 return true; 10481 } 10482 10483 protected ExampleScenario.ExampleScenarioInstanceVersionComponent parseExampleScenarioExampleScenarioInstanceVersionComponent( 10484 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10485 ExampleScenario.ExampleScenarioInstanceVersionComponent res = new ExampleScenario.ExampleScenarioInstanceVersionComponent(); 10486 parseBackboneAttributes(xpp, res); 10487 next(xpp); 10488 int eventType = nextNoWhitespace(xpp); 10489 while (eventType != XmlPullParser.END_TAG) { 10490 if (!parseExampleScenarioExampleScenarioInstanceVersionComponentContent(eventType, xpp, owner, res)) 10491 unknownContent(xpp); 10492 eventType = nextNoWhitespace(xpp); 10493 } 10494 next(xpp); 10495 parseElementClose(res); 10496 return res; 10497 } 10498 10499 protected boolean parseExampleScenarioExampleScenarioInstanceVersionComponentContent(int eventType, XmlPullParser xpp, 10500 ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceVersionComponent res) 10501 throws XmlPullParserException, IOException, FHIRFormatError { 10502 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { 10503 res.setVersionIdElement(parseString(xpp)); 10504 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10505 res.setDescriptionElement(parseMarkdown(xpp)); 10506 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10507 return false; 10508 return true; 10509 } 10510 10511 protected ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent( 10512 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10513 ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res = new ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent(); 10514 parseBackboneAttributes(xpp, res); 10515 next(xpp); 10516 int eventType = nextNoWhitespace(xpp); 10517 while (eventType != XmlPullParser.END_TAG) { 10518 if (!parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentContent(eventType, xpp, owner, res)) 10519 unknownContent(xpp); 10520 eventType = nextNoWhitespace(xpp); 10521 } 10522 next(xpp); 10523 parseElementClose(res); 10524 return res; 10525 } 10526 10527 protected boolean parseExampleScenarioExampleScenarioInstanceContainedInstanceComponentContent(int eventType, 10528 XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent res) 10529 throws XmlPullParserException, IOException, FHIRFormatError { 10530 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resourceId")) { 10531 res.setResourceIdElement(parseString(xpp)); 10532 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("versionId")) { 10533 res.setVersionIdElement(parseString(xpp)); 10534 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10535 return false; 10536 return true; 10537 } 10538 10539 protected ExampleScenario.ExampleScenarioProcessComponent parseExampleScenarioExampleScenarioProcessComponent( 10540 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10541 ExampleScenario.ExampleScenarioProcessComponent res = new ExampleScenario.ExampleScenarioProcessComponent(); 10542 parseBackboneAttributes(xpp, res); 10543 next(xpp); 10544 int eventType = nextNoWhitespace(xpp); 10545 while (eventType != XmlPullParser.END_TAG) { 10546 if (!parseExampleScenarioExampleScenarioProcessComponentContent(eventType, xpp, owner, res)) 10547 unknownContent(xpp); 10548 eventType = nextNoWhitespace(xpp); 10549 } 10550 next(xpp); 10551 parseElementClose(res); 10552 return res; 10553 } 10554 10555 protected boolean parseExampleScenarioExampleScenarioProcessComponentContent(int eventType, XmlPullParser xpp, 10556 ExampleScenario owner, ExampleScenario.ExampleScenarioProcessComponent res) 10557 throws XmlPullParserException, IOException, FHIRFormatError { 10558 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 10559 res.setTitleElement(parseString(xpp)); 10560 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10561 res.setDescriptionElement(parseMarkdown(xpp)); 10562 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preConditions")) { 10563 res.setPreConditionsElement(parseMarkdown(xpp)); 10564 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("postConditions")) { 10565 res.setPostConditionsElement(parseMarkdown(xpp)); 10566 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("step")) { 10567 res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(xpp, owner)); 10568 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10569 return false; 10570 return true; 10571 } 10572 10573 protected ExampleScenario.ExampleScenarioProcessStepComponent parseExampleScenarioExampleScenarioProcessStepComponent( 10574 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10575 ExampleScenario.ExampleScenarioProcessStepComponent res = new ExampleScenario.ExampleScenarioProcessStepComponent(); 10576 parseBackboneAttributes(xpp, res); 10577 next(xpp); 10578 int eventType = nextNoWhitespace(xpp); 10579 while (eventType != XmlPullParser.END_TAG) { 10580 if (!parseExampleScenarioExampleScenarioProcessStepComponentContent(eventType, xpp, owner, res)) 10581 unknownContent(xpp); 10582 eventType = nextNoWhitespace(xpp); 10583 } 10584 next(xpp); 10585 parseElementClose(res); 10586 return res; 10587 } 10588 10589 protected boolean parseExampleScenarioExampleScenarioProcessStepComponentContent(int eventType, XmlPullParser xpp, 10590 ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepComponent res) 10591 throws XmlPullParserException, IOException, FHIRFormatError { 10592 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("process")) { 10593 res.getProcess().add(parseExampleScenarioExampleScenarioProcessComponent(xpp, owner)); 10594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pause")) { 10595 res.setPauseElement(parseBoolean(xpp)); 10596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 10597 res.setOperation(parseExampleScenarioExampleScenarioProcessStepOperationComponent(xpp, owner)); 10598 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alternative")) { 10599 res.getAlternative().add(parseExampleScenarioExampleScenarioProcessStepAlternativeComponent(xpp, owner)); 10600 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10601 return false; 10602 return true; 10603 } 10604 10605 protected ExampleScenario.ExampleScenarioProcessStepOperationComponent parseExampleScenarioExampleScenarioProcessStepOperationComponent( 10606 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10607 ExampleScenario.ExampleScenarioProcessStepOperationComponent res = new ExampleScenario.ExampleScenarioProcessStepOperationComponent(); 10608 parseBackboneAttributes(xpp, res); 10609 next(xpp); 10610 int eventType = nextNoWhitespace(xpp); 10611 while (eventType != XmlPullParser.END_TAG) { 10612 if (!parseExampleScenarioExampleScenarioProcessStepOperationComponentContent(eventType, xpp, owner, res)) 10613 unknownContent(xpp); 10614 eventType = nextNoWhitespace(xpp); 10615 } 10616 next(xpp); 10617 parseElementClose(res); 10618 return res; 10619 } 10620 10621 protected boolean parseExampleScenarioExampleScenarioProcessStepOperationComponentContent(int eventType, 10622 XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepOperationComponent res) 10623 throws XmlPullParserException, IOException, FHIRFormatError { 10624 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 10625 res.setNumberElement(parseString(xpp)); 10626 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10627 res.setTypeElement(parseString(xpp)); 10628 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 10629 res.setNameElement(parseString(xpp)); 10630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initiator")) { 10631 res.setInitiatorElement(parseString(xpp)); 10632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { 10633 res.setReceiverElement(parseString(xpp)); 10634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10635 res.setDescriptionElement(parseMarkdown(xpp)); 10636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initiatorActive")) { 10637 res.setInitiatorActiveElement(parseBoolean(xpp)); 10638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiverActive")) { 10639 res.setReceiverActiveElement(parseBoolean(xpp)); 10640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 10641 res.setRequest(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); 10642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 10643 res.setResponse(parseExampleScenarioExampleScenarioInstanceContainedInstanceComponent(xpp, owner)); 10644 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10645 return false; 10646 return true; 10647 } 10648 10649 protected ExampleScenario.ExampleScenarioProcessStepAlternativeComponent parseExampleScenarioExampleScenarioProcessStepAlternativeComponent( 10650 XmlPullParser xpp, ExampleScenario owner) throws XmlPullParserException, IOException, FHIRFormatError { 10651 ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res = new ExampleScenario.ExampleScenarioProcessStepAlternativeComponent(); 10652 parseBackboneAttributes(xpp, res); 10653 next(xpp); 10654 int eventType = nextNoWhitespace(xpp); 10655 while (eventType != XmlPullParser.END_TAG) { 10656 if (!parseExampleScenarioExampleScenarioProcessStepAlternativeComponentContent(eventType, xpp, owner, res)) 10657 unknownContent(xpp); 10658 eventType = nextNoWhitespace(xpp); 10659 } 10660 next(xpp); 10661 parseElementClose(res); 10662 return res; 10663 } 10664 10665 protected boolean parseExampleScenarioExampleScenarioProcessStepAlternativeComponentContent(int eventType, 10666 XmlPullParser xpp, ExampleScenario owner, ExampleScenario.ExampleScenarioProcessStepAlternativeComponent res) 10667 throws XmlPullParserException, IOException, FHIRFormatError { 10668 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 10669 res.setTitleElement(parseString(xpp)); 10670 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 10671 res.setDescriptionElement(parseMarkdown(xpp)); 10672 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("step")) { 10673 res.getStep().add(parseExampleScenarioExampleScenarioProcessStepComponent(xpp, owner)); 10674 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10675 return false; 10676 return true; 10677 } 10678 10679 protected ExplanationOfBenefit parseExplanationOfBenefit(XmlPullParser xpp) 10680 throws XmlPullParserException, IOException, FHIRFormatError { 10681 ExplanationOfBenefit res = new ExplanationOfBenefit(); 10682 parseDomainResourceAttributes(xpp, res); 10683 next(xpp); 10684 int eventType = nextNoWhitespace(xpp); 10685 while (eventType != XmlPullParser.END_TAG) { 10686 if (!parseExplanationOfBenefitContent(eventType, xpp, res)) 10687 unknownContent(xpp); 10688 eventType = nextNoWhitespace(xpp); 10689 } 10690 next(xpp); 10691 parseElementClose(res); 10692 return res; 10693 } 10694 10695 protected boolean parseExplanationOfBenefitContent(int eventType, XmlPullParser xpp, ExplanationOfBenefit res) 10696 throws XmlPullParserException, IOException, FHIRFormatError { 10697 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 10698 res.getIdentifier().add(parseIdentifier(xpp)); 10699 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 10700 res.setStatusElement(parseEnumeration(xpp, ExplanationOfBenefit.ExplanationOfBenefitStatus.NULL, 10701 new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory())); 10702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10703 res.setType(parseCodeableConcept(xpp)); 10704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subType")) { 10705 res.setSubType(parseCodeableConcept(xpp)); 10706 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 10707 res.setUseElement( 10708 parseEnumeration(xpp, ExplanationOfBenefit.Use.NULL, new ExplanationOfBenefit.UseEnumFactory())); 10709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 10710 res.setPatient(parseReference(xpp)); 10711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("billablePeriod")) { 10712 res.setBillablePeriod(parsePeriod(xpp)); 10713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 10714 res.setCreatedElement(parseDateTime(xpp)); 10715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { 10716 res.setEnterer(parseReference(xpp)); 10717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurer")) { 10718 res.setInsurer(parseReference(xpp)); 10719 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 10720 res.setProvider(parseReference(xpp)); 10721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 10722 res.setPriority(parseCodeableConcept(xpp)); 10723 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserveRequested")) { 10724 res.setFundsReserveRequested(parseCodeableConcept(xpp)); 10725 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundsReserve")) { 10726 res.setFundsReserve(parseCodeableConcept(xpp)); 10727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("related")) { 10728 res.getRelated().add(parseExplanationOfBenefitRelatedClaimComponent(xpp, res)); 10729 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescription")) { 10730 res.setPrescription(parseReference(xpp)); 10731 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("originalPrescription")) { 10732 res.setOriginalPrescription(parseReference(xpp)); 10733 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { 10734 res.setPayee(parseExplanationOfBenefitPayeeComponent(xpp, res)); 10735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referral")) { 10736 res.setReferral(parseReference(xpp)); 10737 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("facility")) { 10738 res.setFacility(parseReference(xpp)); 10739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { 10740 res.setClaim(parseReference(xpp)); 10741 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claimResponse")) { 10742 res.setClaimResponse(parseReference(xpp)); 10743 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 10744 res.setOutcomeElement(parseEnumeration(xpp, ExplanationOfBenefit.RemittanceOutcome.NULL, 10745 new ExplanationOfBenefit.RemittanceOutcomeEnumFactory())); 10746 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { 10747 res.setDispositionElement(parseString(xpp)); 10748 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { 10749 res.getPreAuthRef().add(parseString(xpp)); 10750 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRefPeriod")) { 10751 res.getPreAuthRefPeriod().add(parsePeriod(xpp)); 10752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeam")) { 10753 res.getCareTeam().add(parseExplanationOfBenefitCareTeamComponent(xpp, res)); 10754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 10755 res.getSupportingInfo().add(parseExplanationOfBenefitSupportingInformationComponent(xpp, res)); 10756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosis")) { 10757 res.getDiagnosis().add(parseExplanationOfBenefitDiagnosisComponent(xpp, res)); 10758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { 10759 res.getProcedure().add(parseExplanationOfBenefitProcedureComponent(xpp, res)); 10760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precedence")) { 10761 res.setPrecedenceElement(parsePositiveInt(xpp)); 10762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 10763 res.getInsurance().add(parseExplanationOfBenefitInsuranceComponent(xpp, res)); 10764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accident")) { 10765 res.setAccident(parseExplanationOfBenefitAccidentComponent(xpp, res)); 10766 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 10767 res.getItem().add(parseExplanationOfBenefitItemComponent(xpp, res)); 10768 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addItem")) { 10769 res.getAddItem().add(parseExplanationOfBenefitAddedItemComponent(xpp, res)); 10770 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 10771 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, res)); 10772 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { 10773 res.getTotal().add(parseExplanationOfBenefitTotalComponent(xpp, res)); 10774 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { 10775 res.setPayment(parseExplanationOfBenefitPaymentComponent(xpp, res)); 10776 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("formCode")) { 10777 res.setFormCode(parseCodeableConcept(xpp)); 10778 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { 10779 res.setForm(parseAttachment(xpp)); 10780 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { 10781 res.getProcessNote().add(parseExplanationOfBenefitNoteComponent(xpp, res)); 10782 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitPeriod")) { 10783 res.setBenefitPeriod(parsePeriod(xpp)); 10784 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefitBalance")) { 10785 res.getBenefitBalance().add(parseExplanationOfBenefitBenefitBalanceComponent(xpp, res)); 10786 } else if (!parseDomainResourceContent(eventType, xpp, res)) 10787 return false; 10788 return true; 10789 } 10790 10791 protected ExplanationOfBenefit.RelatedClaimComponent parseExplanationOfBenefitRelatedClaimComponent(XmlPullParser xpp, 10792 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10793 ExplanationOfBenefit.RelatedClaimComponent res = new ExplanationOfBenefit.RelatedClaimComponent(); 10794 parseBackboneAttributes(xpp, res); 10795 next(xpp); 10796 int eventType = nextNoWhitespace(xpp); 10797 while (eventType != XmlPullParser.END_TAG) { 10798 if (!parseExplanationOfBenefitRelatedClaimComponentContent(eventType, xpp, owner, res)) 10799 unknownContent(xpp); 10800 eventType = nextNoWhitespace(xpp); 10801 } 10802 next(xpp); 10803 parseElementClose(res); 10804 return res; 10805 } 10806 10807 protected boolean parseExplanationOfBenefitRelatedClaimComponentContent(int eventType, XmlPullParser xpp, 10808 ExplanationOfBenefit owner, ExplanationOfBenefit.RelatedClaimComponent res) 10809 throws XmlPullParserException, IOException, FHIRFormatError { 10810 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("claim")) { 10811 res.setClaim(parseReference(xpp)); 10812 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 10813 res.setRelationship(parseCodeableConcept(xpp)); 10814 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 10815 res.setReference(parseIdentifier(xpp)); 10816 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10817 return false; 10818 return true; 10819 } 10820 10821 protected ExplanationOfBenefit.PayeeComponent parseExplanationOfBenefitPayeeComponent(XmlPullParser xpp, 10822 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10823 ExplanationOfBenefit.PayeeComponent res = new ExplanationOfBenefit.PayeeComponent(); 10824 parseBackboneAttributes(xpp, res); 10825 next(xpp); 10826 int eventType = nextNoWhitespace(xpp); 10827 while (eventType != XmlPullParser.END_TAG) { 10828 if (!parseExplanationOfBenefitPayeeComponentContent(eventType, xpp, owner, res)) 10829 unknownContent(xpp); 10830 eventType = nextNoWhitespace(xpp); 10831 } 10832 next(xpp); 10833 parseElementClose(res); 10834 return res; 10835 } 10836 10837 protected boolean parseExplanationOfBenefitPayeeComponentContent(int eventType, XmlPullParser xpp, 10838 ExplanationOfBenefit owner, ExplanationOfBenefit.PayeeComponent res) 10839 throws XmlPullParserException, IOException, FHIRFormatError { 10840 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10841 res.setType(parseCodeableConcept(xpp)); 10842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("party")) { 10843 res.setParty(parseReference(xpp)); 10844 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10845 return false; 10846 return true; 10847 } 10848 10849 protected ExplanationOfBenefit.CareTeamComponent parseExplanationOfBenefitCareTeamComponent(XmlPullParser xpp, 10850 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10851 ExplanationOfBenefit.CareTeamComponent res = new ExplanationOfBenefit.CareTeamComponent(); 10852 parseBackboneAttributes(xpp, res); 10853 next(xpp); 10854 int eventType = nextNoWhitespace(xpp); 10855 while (eventType != XmlPullParser.END_TAG) { 10856 if (!parseExplanationOfBenefitCareTeamComponentContent(eventType, xpp, owner, res)) 10857 unknownContent(xpp); 10858 eventType = nextNoWhitespace(xpp); 10859 } 10860 next(xpp); 10861 parseElementClose(res); 10862 return res; 10863 } 10864 10865 protected boolean parseExplanationOfBenefitCareTeamComponentContent(int eventType, XmlPullParser xpp, 10866 ExplanationOfBenefit owner, ExplanationOfBenefit.CareTeamComponent res) 10867 throws XmlPullParserException, IOException, FHIRFormatError { 10868 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 10869 res.setSequenceElement(parsePositiveInt(xpp)); 10870 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 10871 res.setProvider(parseReference(xpp)); 10872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 10873 res.setResponsibleElement(parseBoolean(xpp)); 10874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 10875 res.setRole(parseCodeableConcept(xpp)); 10876 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { 10877 res.setQualification(parseCodeableConcept(xpp)); 10878 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10879 return false; 10880 return true; 10881 } 10882 10883 protected ExplanationOfBenefit.SupportingInformationComponent parseExplanationOfBenefitSupportingInformationComponent( 10884 XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10885 ExplanationOfBenefit.SupportingInformationComponent res = new ExplanationOfBenefit.SupportingInformationComponent(); 10886 parseBackboneAttributes(xpp, res); 10887 next(xpp); 10888 int eventType = nextNoWhitespace(xpp); 10889 while (eventType != XmlPullParser.END_TAG) { 10890 if (!parseExplanationOfBenefitSupportingInformationComponentContent(eventType, xpp, owner, res)) 10891 unknownContent(xpp); 10892 eventType = nextNoWhitespace(xpp); 10893 } 10894 next(xpp); 10895 parseElementClose(res); 10896 return res; 10897 } 10898 10899 protected boolean parseExplanationOfBenefitSupportingInformationComponentContent(int eventType, XmlPullParser xpp, 10900 ExplanationOfBenefit owner, ExplanationOfBenefit.SupportingInformationComponent res) 10901 throws XmlPullParserException, IOException, FHIRFormatError { 10902 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 10903 res.setSequenceElement(parsePositiveInt(xpp)); 10904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 10905 res.setCategory(parseCodeableConcept(xpp)); 10906 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 10907 res.setCode(parseCodeableConcept(xpp)); 10908 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 10909 res.setTiming(parseType("timing", xpp)); 10910 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 10911 res.setValue(parseType("value", xpp)); 10912 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 10913 res.setReason(parseCoding(xpp)); 10914 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10915 return false; 10916 return true; 10917 } 10918 10919 protected ExplanationOfBenefit.DiagnosisComponent parseExplanationOfBenefitDiagnosisComponent(XmlPullParser xpp, 10920 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10921 ExplanationOfBenefit.DiagnosisComponent res = new ExplanationOfBenefit.DiagnosisComponent(); 10922 parseBackboneAttributes(xpp, res); 10923 next(xpp); 10924 int eventType = nextNoWhitespace(xpp); 10925 while (eventType != XmlPullParser.END_TAG) { 10926 if (!parseExplanationOfBenefitDiagnosisComponentContent(eventType, xpp, owner, res)) 10927 unknownContent(xpp); 10928 eventType = nextNoWhitespace(xpp); 10929 } 10930 next(xpp); 10931 parseElementClose(res); 10932 return res; 10933 } 10934 10935 protected boolean parseExplanationOfBenefitDiagnosisComponentContent(int eventType, XmlPullParser xpp, 10936 ExplanationOfBenefit owner, ExplanationOfBenefit.DiagnosisComponent res) 10937 throws XmlPullParserException, IOException, FHIRFormatError { 10938 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 10939 res.setSequenceElement(parsePositiveInt(xpp)); 10940 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "diagnosis")) { 10941 res.setDiagnosis(parseType("diagnosis", xpp)); 10942 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10943 res.getType().add(parseCodeableConcept(xpp)); 10944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onAdmission")) { 10945 res.setOnAdmission(parseCodeableConcept(xpp)); 10946 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageCode")) { 10947 res.setPackageCode(parseCodeableConcept(xpp)); 10948 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10949 return false; 10950 return true; 10951 } 10952 10953 protected ExplanationOfBenefit.ProcedureComponent parseExplanationOfBenefitProcedureComponent(XmlPullParser xpp, 10954 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10955 ExplanationOfBenefit.ProcedureComponent res = new ExplanationOfBenefit.ProcedureComponent(); 10956 parseBackboneAttributes(xpp, res); 10957 next(xpp); 10958 int eventType = nextNoWhitespace(xpp); 10959 while (eventType != XmlPullParser.END_TAG) { 10960 if (!parseExplanationOfBenefitProcedureComponentContent(eventType, xpp, owner, res)) 10961 unknownContent(xpp); 10962 eventType = nextNoWhitespace(xpp); 10963 } 10964 next(xpp); 10965 parseElementClose(res); 10966 return res; 10967 } 10968 10969 protected boolean parseExplanationOfBenefitProcedureComponentContent(int eventType, XmlPullParser xpp, 10970 ExplanationOfBenefit owner, ExplanationOfBenefit.ProcedureComponent res) 10971 throws XmlPullParserException, IOException, FHIRFormatError { 10972 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 10973 res.setSequenceElement(parsePositiveInt(xpp)); 10974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 10975 res.getType().add(parseCodeableConcept(xpp)); 10976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 10977 res.setDateElement(parseDateTime(xpp)); 10978 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "procedure")) { 10979 res.setProcedure(parseType("procedure", xpp)); 10980 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 10981 res.getUdi().add(parseReference(xpp)); 10982 } else if (!parseBackboneElementContent(eventType, xpp, res)) 10983 return false; 10984 return true; 10985 } 10986 10987 protected ExplanationOfBenefit.InsuranceComponent parseExplanationOfBenefitInsuranceComponent(XmlPullParser xpp, 10988 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 10989 ExplanationOfBenefit.InsuranceComponent res = new ExplanationOfBenefit.InsuranceComponent(); 10990 parseBackboneAttributes(xpp, res); 10991 next(xpp); 10992 int eventType = nextNoWhitespace(xpp); 10993 while (eventType != XmlPullParser.END_TAG) { 10994 if (!parseExplanationOfBenefitInsuranceComponentContent(eventType, xpp, owner, res)) 10995 unknownContent(xpp); 10996 eventType = nextNoWhitespace(xpp); 10997 } 10998 next(xpp); 10999 parseElementClose(res); 11000 return res; 11001 } 11002 11003 protected boolean parseExplanationOfBenefitInsuranceComponentContent(int eventType, XmlPullParser xpp, 11004 ExplanationOfBenefit owner, ExplanationOfBenefit.InsuranceComponent res) 11005 throws XmlPullParserException, IOException, FHIRFormatError { 11006 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focal")) { 11007 res.setFocalElement(parseBoolean(xpp)); 11008 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 11009 res.setCoverage(parseReference(xpp)); 11010 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preAuthRef")) { 11011 res.getPreAuthRef().add(parseString(xpp)); 11012 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11013 return false; 11014 return true; 11015 } 11016 11017 protected ExplanationOfBenefit.AccidentComponent parseExplanationOfBenefitAccidentComponent(XmlPullParser xpp, 11018 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11019 ExplanationOfBenefit.AccidentComponent res = new ExplanationOfBenefit.AccidentComponent(); 11020 parseBackboneAttributes(xpp, res); 11021 next(xpp); 11022 int eventType = nextNoWhitespace(xpp); 11023 while (eventType != XmlPullParser.END_TAG) { 11024 if (!parseExplanationOfBenefitAccidentComponentContent(eventType, xpp, owner, res)) 11025 unknownContent(xpp); 11026 eventType = nextNoWhitespace(xpp); 11027 } 11028 next(xpp); 11029 parseElementClose(res); 11030 return res; 11031 } 11032 11033 protected boolean parseExplanationOfBenefitAccidentComponentContent(int eventType, XmlPullParser xpp, 11034 ExplanationOfBenefit owner, ExplanationOfBenefit.AccidentComponent res) 11035 throws XmlPullParserException, IOException, FHIRFormatError { 11036 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 11037 res.setDateElement(parseDate(xpp)); 11038 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11039 res.setType(parseCodeableConcept(xpp)); 11040 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 11041 res.setLocation(parseType("location", xpp)); 11042 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11043 return false; 11044 return true; 11045 } 11046 11047 protected ExplanationOfBenefit.ItemComponent parseExplanationOfBenefitItemComponent(XmlPullParser xpp, 11048 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11049 ExplanationOfBenefit.ItemComponent res = new ExplanationOfBenefit.ItemComponent(); 11050 parseBackboneAttributes(xpp, res); 11051 next(xpp); 11052 int eventType = nextNoWhitespace(xpp); 11053 while (eventType != XmlPullParser.END_TAG) { 11054 if (!parseExplanationOfBenefitItemComponentContent(eventType, xpp, owner, res)) 11055 unknownContent(xpp); 11056 eventType = nextNoWhitespace(xpp); 11057 } 11058 next(xpp); 11059 parseElementClose(res); 11060 return res; 11061 } 11062 11063 protected boolean parseExplanationOfBenefitItemComponentContent(int eventType, XmlPullParser xpp, 11064 ExplanationOfBenefit owner, ExplanationOfBenefit.ItemComponent res) 11065 throws XmlPullParserException, IOException, FHIRFormatError { 11066 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 11067 res.setSequenceElement(parsePositiveInt(xpp)); 11068 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("careTeamSequence")) { 11069 res.getCareTeamSequence().add(parsePositiveInt(xpp)); 11070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnosisSequence")) { 11071 res.getDiagnosisSequence().add(parsePositiveInt(xpp)); 11072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureSequence")) { 11073 res.getProcedureSequence().add(parsePositiveInt(xpp)); 11074 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationSequence")) { 11075 res.getInformationSequence().add(parsePositiveInt(xpp)); 11076 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 11077 res.setRevenue(parseCodeableConcept(xpp)); 11078 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11079 res.setCategory(parseCodeableConcept(xpp)); 11080 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11081 res.setProductOrService(parseCodeableConcept(xpp)); 11082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11083 res.getModifier().add(parseCodeableConcept(xpp)); 11084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 11085 res.getProgramCode().add(parseCodeableConcept(xpp)); 11086 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 11087 res.setServiced(parseType("serviced", xpp)); 11088 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 11089 res.setLocation(parseType("location", xpp)); 11090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11091 res.setQuantity(parseQuantity(xpp)); 11092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11093 res.setUnitPrice(parseMoney(xpp)); 11094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11095 res.setFactorElement(parseDecimal(xpp)); 11096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11097 res.setNet(parseMoney(xpp)); 11098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 11099 res.getUdi().add(parseReference(xpp)); 11100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 11101 res.setBodySite(parseCodeableConcept(xpp)); 11102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { 11103 res.getSubSite().add(parseCodeableConcept(xpp)); 11104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 11105 res.getEncounter().add(parseReference(xpp)); 11106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11107 res.getNoteNumber().add(parsePositiveInt(xpp)); 11108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11109 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11110 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 11111 res.getDetail().add(parseExplanationOfBenefitDetailComponent(xpp, owner)); 11112 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11113 return false; 11114 return true; 11115 } 11116 11117 protected ExplanationOfBenefit.AdjudicationComponent parseExplanationOfBenefitAdjudicationComponent(XmlPullParser xpp, 11118 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11119 ExplanationOfBenefit.AdjudicationComponent res = new ExplanationOfBenefit.AdjudicationComponent(); 11120 parseBackboneAttributes(xpp, res); 11121 next(xpp); 11122 int eventType = nextNoWhitespace(xpp); 11123 while (eventType != XmlPullParser.END_TAG) { 11124 if (!parseExplanationOfBenefitAdjudicationComponentContent(eventType, xpp, owner, res)) 11125 unknownContent(xpp); 11126 eventType = nextNoWhitespace(xpp); 11127 } 11128 next(xpp); 11129 parseElementClose(res); 11130 return res; 11131 } 11132 11133 protected boolean parseExplanationOfBenefitAdjudicationComponentContent(int eventType, XmlPullParser xpp, 11134 ExplanationOfBenefit owner, ExplanationOfBenefit.AdjudicationComponent res) 11135 throws XmlPullParserException, IOException, FHIRFormatError { 11136 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11137 res.setCategory(parseCodeableConcept(xpp)); 11138 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 11139 res.setReason(parseCodeableConcept(xpp)); 11140 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 11141 res.setAmount(parseMoney(xpp)); 11142 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 11143 res.setValueElement(parseDecimal(xpp)); 11144 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11145 return false; 11146 return true; 11147 } 11148 11149 protected ExplanationOfBenefit.DetailComponent parseExplanationOfBenefitDetailComponent(XmlPullParser xpp, 11150 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11151 ExplanationOfBenefit.DetailComponent res = new ExplanationOfBenefit.DetailComponent(); 11152 parseBackboneAttributes(xpp, res); 11153 next(xpp); 11154 int eventType = nextNoWhitespace(xpp); 11155 while (eventType != XmlPullParser.END_TAG) { 11156 if (!parseExplanationOfBenefitDetailComponentContent(eventType, xpp, owner, res)) 11157 unknownContent(xpp); 11158 eventType = nextNoWhitespace(xpp); 11159 } 11160 next(xpp); 11161 parseElementClose(res); 11162 return res; 11163 } 11164 11165 protected boolean parseExplanationOfBenefitDetailComponentContent(int eventType, XmlPullParser xpp, 11166 ExplanationOfBenefit owner, ExplanationOfBenefit.DetailComponent res) 11167 throws XmlPullParserException, IOException, FHIRFormatError { 11168 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 11169 res.setSequenceElement(parsePositiveInt(xpp)); 11170 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 11171 res.setRevenue(parseCodeableConcept(xpp)); 11172 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11173 res.setCategory(parseCodeableConcept(xpp)); 11174 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11175 res.setProductOrService(parseCodeableConcept(xpp)); 11176 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11177 res.getModifier().add(parseCodeableConcept(xpp)); 11178 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 11179 res.getProgramCode().add(parseCodeableConcept(xpp)); 11180 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11181 res.setQuantity(parseQuantity(xpp)); 11182 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11183 res.setUnitPrice(parseMoney(xpp)); 11184 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11185 res.setFactorElement(parseDecimal(xpp)); 11186 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11187 res.setNet(parseMoney(xpp)); 11188 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 11189 res.getUdi().add(parseReference(xpp)); 11190 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11191 res.getNoteNumber().add(parsePositiveInt(xpp)); 11192 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11193 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11194 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { 11195 res.getSubDetail().add(parseExplanationOfBenefitSubDetailComponent(xpp, owner)); 11196 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11197 return false; 11198 return true; 11199 } 11200 11201 protected ExplanationOfBenefit.SubDetailComponent parseExplanationOfBenefitSubDetailComponent(XmlPullParser xpp, 11202 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11203 ExplanationOfBenefit.SubDetailComponent res = new ExplanationOfBenefit.SubDetailComponent(); 11204 parseBackboneAttributes(xpp, res); 11205 next(xpp); 11206 int eventType = nextNoWhitespace(xpp); 11207 while (eventType != XmlPullParser.END_TAG) { 11208 if (!parseExplanationOfBenefitSubDetailComponentContent(eventType, xpp, owner, res)) 11209 unknownContent(xpp); 11210 eventType = nextNoWhitespace(xpp); 11211 } 11212 next(xpp); 11213 parseElementClose(res); 11214 return res; 11215 } 11216 11217 protected boolean parseExplanationOfBenefitSubDetailComponentContent(int eventType, XmlPullParser xpp, 11218 ExplanationOfBenefit owner, ExplanationOfBenefit.SubDetailComponent res) 11219 throws XmlPullParserException, IOException, FHIRFormatError { 11220 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 11221 res.setSequenceElement(parsePositiveInt(xpp)); 11222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("revenue")) { 11223 res.setRevenue(parseCodeableConcept(xpp)); 11224 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11225 res.setCategory(parseCodeableConcept(xpp)); 11226 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11227 res.setProductOrService(parseCodeableConcept(xpp)); 11228 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11229 res.getModifier().add(parseCodeableConcept(xpp)); 11230 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 11231 res.getProgramCode().add(parseCodeableConcept(xpp)); 11232 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11233 res.setQuantity(parseQuantity(xpp)); 11234 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11235 res.setUnitPrice(parseMoney(xpp)); 11236 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11237 res.setFactorElement(parseDecimal(xpp)); 11238 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11239 res.setNet(parseMoney(xpp)); 11240 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("udi")) { 11241 res.getUdi().add(parseReference(xpp)); 11242 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11243 res.getNoteNumber().add(parsePositiveInt(xpp)); 11244 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11245 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11246 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11247 return false; 11248 return true; 11249 } 11250 11251 protected ExplanationOfBenefit.AddedItemComponent parseExplanationOfBenefitAddedItemComponent(XmlPullParser xpp, 11252 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11253 ExplanationOfBenefit.AddedItemComponent res = new ExplanationOfBenefit.AddedItemComponent(); 11254 parseBackboneAttributes(xpp, res); 11255 next(xpp); 11256 int eventType = nextNoWhitespace(xpp); 11257 while (eventType != XmlPullParser.END_TAG) { 11258 if (!parseExplanationOfBenefitAddedItemComponentContent(eventType, xpp, owner, res)) 11259 unknownContent(xpp); 11260 eventType = nextNoWhitespace(xpp); 11261 } 11262 next(xpp); 11263 parseElementClose(res); 11264 return res; 11265 } 11266 11267 protected boolean parseExplanationOfBenefitAddedItemComponentContent(int eventType, XmlPullParser xpp, 11268 ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemComponent res) 11269 throws XmlPullParserException, IOException, FHIRFormatError { 11270 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("itemSequence")) { 11271 res.getItemSequence().add(parsePositiveInt(xpp)); 11272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detailSequence")) { 11273 res.getDetailSequence().add(parsePositiveInt(xpp)); 11274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetailSequence")) { 11275 res.getSubDetailSequence().add(parsePositiveInt(xpp)); 11276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 11277 res.getProvider().add(parseReference(xpp)); 11278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11279 res.setProductOrService(parseCodeableConcept(xpp)); 11280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11281 res.getModifier().add(parseCodeableConcept(xpp)); 11282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programCode")) { 11283 res.getProgramCode().add(parseCodeableConcept(xpp)); 11284 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "serviced")) { 11285 res.setServiced(parseType("serviced", xpp)); 11286 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "location")) { 11287 res.setLocation(parseType("location", xpp)); 11288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11289 res.setQuantity(parseQuantity(xpp)); 11290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11291 res.setUnitPrice(parseMoney(xpp)); 11292 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11293 res.setFactorElement(parseDecimal(xpp)); 11294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11295 res.setNet(parseMoney(xpp)); 11296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 11297 res.setBodySite(parseCodeableConcept(xpp)); 11298 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subSite")) { 11299 res.getSubSite().add(parseCodeableConcept(xpp)); 11300 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11301 res.getNoteNumber().add(parsePositiveInt(xpp)); 11302 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11303 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11304 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 11305 res.getDetail().add(parseExplanationOfBenefitAddedItemDetailComponent(xpp, owner)); 11306 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11307 return false; 11308 return true; 11309 } 11310 11311 protected ExplanationOfBenefit.AddedItemDetailComponent parseExplanationOfBenefitAddedItemDetailComponent( 11312 XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11313 ExplanationOfBenefit.AddedItemDetailComponent res = new ExplanationOfBenefit.AddedItemDetailComponent(); 11314 parseBackboneAttributes(xpp, res); 11315 next(xpp); 11316 int eventType = nextNoWhitespace(xpp); 11317 while (eventType != XmlPullParser.END_TAG) { 11318 if (!parseExplanationOfBenefitAddedItemDetailComponentContent(eventType, xpp, owner, res)) 11319 unknownContent(xpp); 11320 eventType = nextNoWhitespace(xpp); 11321 } 11322 next(xpp); 11323 parseElementClose(res); 11324 return res; 11325 } 11326 11327 protected boolean parseExplanationOfBenefitAddedItemDetailComponentContent(int eventType, XmlPullParser xpp, 11328 ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemDetailComponent res) 11329 throws XmlPullParserException, IOException, FHIRFormatError { 11330 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11331 res.setProductOrService(parseCodeableConcept(xpp)); 11332 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11333 res.getModifier().add(parseCodeableConcept(xpp)); 11334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11335 res.setQuantity(parseQuantity(xpp)); 11336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11337 res.setUnitPrice(parseMoney(xpp)); 11338 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11339 res.setFactorElement(parseDecimal(xpp)); 11340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11341 res.setNet(parseMoney(xpp)); 11342 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11343 res.getNoteNumber().add(parsePositiveInt(xpp)); 11344 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11345 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11346 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subDetail")) { 11347 res.getSubDetail().add(parseExplanationOfBenefitAddedItemDetailSubDetailComponent(xpp, owner)); 11348 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11349 return false; 11350 return true; 11351 } 11352 11353 protected ExplanationOfBenefit.AddedItemDetailSubDetailComponent parseExplanationOfBenefitAddedItemDetailSubDetailComponent( 11354 XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11355 ExplanationOfBenefit.AddedItemDetailSubDetailComponent res = new ExplanationOfBenefit.AddedItemDetailSubDetailComponent(); 11356 parseBackboneAttributes(xpp, res); 11357 next(xpp); 11358 int eventType = nextNoWhitespace(xpp); 11359 while (eventType != XmlPullParser.END_TAG) { 11360 if (!parseExplanationOfBenefitAddedItemDetailSubDetailComponentContent(eventType, xpp, owner, res)) 11361 unknownContent(xpp); 11362 eventType = nextNoWhitespace(xpp); 11363 } 11364 next(xpp); 11365 parseElementClose(res); 11366 return res; 11367 } 11368 11369 protected boolean parseExplanationOfBenefitAddedItemDetailSubDetailComponentContent(int eventType, XmlPullParser xpp, 11370 ExplanationOfBenefit owner, ExplanationOfBenefit.AddedItemDetailSubDetailComponent res) 11371 throws XmlPullParserException, IOException, FHIRFormatError { 11372 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productOrService")) { 11373 res.setProductOrService(parseCodeableConcept(xpp)); 11374 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 11375 res.getModifier().add(parseCodeableConcept(xpp)); 11376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11377 res.setQuantity(parseQuantity(xpp)); 11378 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitPrice")) { 11379 res.setUnitPrice(parseMoney(xpp)); 11380 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 11381 res.setFactorElement(parseDecimal(xpp)); 11382 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("net")) { 11383 res.setNet(parseMoney(xpp)); 11384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("noteNumber")) { 11385 res.getNoteNumber().add(parsePositiveInt(xpp)); 11386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjudication")) { 11387 res.getAdjudication().add(parseExplanationOfBenefitAdjudicationComponent(xpp, owner)); 11388 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11389 return false; 11390 return true; 11391 } 11392 11393 protected ExplanationOfBenefit.TotalComponent parseExplanationOfBenefitTotalComponent(XmlPullParser xpp, 11394 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11395 ExplanationOfBenefit.TotalComponent res = new ExplanationOfBenefit.TotalComponent(); 11396 parseBackboneAttributes(xpp, res); 11397 next(xpp); 11398 int eventType = nextNoWhitespace(xpp); 11399 while (eventType != XmlPullParser.END_TAG) { 11400 if (!parseExplanationOfBenefitTotalComponentContent(eventType, xpp, owner, res)) 11401 unknownContent(xpp); 11402 eventType = nextNoWhitespace(xpp); 11403 } 11404 next(xpp); 11405 parseElementClose(res); 11406 return res; 11407 } 11408 11409 protected boolean parseExplanationOfBenefitTotalComponentContent(int eventType, XmlPullParser xpp, 11410 ExplanationOfBenefit owner, ExplanationOfBenefit.TotalComponent res) 11411 throws XmlPullParserException, IOException, FHIRFormatError { 11412 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11413 res.setCategory(parseCodeableConcept(xpp)); 11414 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 11415 res.setAmount(parseMoney(xpp)); 11416 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11417 return false; 11418 return true; 11419 } 11420 11421 protected ExplanationOfBenefit.PaymentComponent parseExplanationOfBenefitPaymentComponent(XmlPullParser xpp, 11422 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11423 ExplanationOfBenefit.PaymentComponent res = new ExplanationOfBenefit.PaymentComponent(); 11424 parseBackboneAttributes(xpp, res); 11425 next(xpp); 11426 int eventType = nextNoWhitespace(xpp); 11427 while (eventType != XmlPullParser.END_TAG) { 11428 if (!parseExplanationOfBenefitPaymentComponentContent(eventType, xpp, owner, res)) 11429 unknownContent(xpp); 11430 eventType = nextNoWhitespace(xpp); 11431 } 11432 next(xpp); 11433 parseElementClose(res); 11434 return res; 11435 } 11436 11437 protected boolean parseExplanationOfBenefitPaymentComponentContent(int eventType, XmlPullParser xpp, 11438 ExplanationOfBenefit owner, ExplanationOfBenefit.PaymentComponent res) 11439 throws XmlPullParserException, IOException, FHIRFormatError { 11440 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11441 res.setType(parseCodeableConcept(xpp)); 11442 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustment")) { 11443 res.setAdjustment(parseMoney(xpp)); 11444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("adjustmentReason")) { 11445 res.setAdjustmentReason(parseCodeableConcept(xpp)); 11446 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 11447 res.setDateElement(parseDate(xpp)); 11448 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 11449 res.setAmount(parseMoney(xpp)); 11450 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 11451 res.setIdentifier(parseIdentifier(xpp)); 11452 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11453 return false; 11454 return true; 11455 } 11456 11457 protected ExplanationOfBenefit.NoteComponent parseExplanationOfBenefitNoteComponent(XmlPullParser xpp, 11458 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11459 ExplanationOfBenefit.NoteComponent res = new ExplanationOfBenefit.NoteComponent(); 11460 parseBackboneAttributes(xpp, res); 11461 next(xpp); 11462 int eventType = nextNoWhitespace(xpp); 11463 while (eventType != XmlPullParser.END_TAG) { 11464 if (!parseExplanationOfBenefitNoteComponentContent(eventType, xpp, owner, res)) 11465 unknownContent(xpp); 11466 eventType = nextNoWhitespace(xpp); 11467 } 11468 next(xpp); 11469 parseElementClose(res); 11470 return res; 11471 } 11472 11473 protected boolean parseExplanationOfBenefitNoteComponentContent(int eventType, XmlPullParser xpp, 11474 ExplanationOfBenefit owner, ExplanationOfBenefit.NoteComponent res) 11475 throws XmlPullParserException, IOException, FHIRFormatError { 11476 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 11477 res.setNumberElement(parsePositiveInt(xpp)); 11478 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11479 res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); 11480 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 11481 res.setTextElement(parseString(xpp)); 11482 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 11483 res.setLanguage(parseCodeableConcept(xpp)); 11484 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11485 return false; 11486 return true; 11487 } 11488 11489 protected ExplanationOfBenefit.BenefitBalanceComponent parseExplanationOfBenefitBenefitBalanceComponent( 11490 XmlPullParser xpp, ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11491 ExplanationOfBenefit.BenefitBalanceComponent res = new ExplanationOfBenefit.BenefitBalanceComponent(); 11492 parseBackboneAttributes(xpp, res); 11493 next(xpp); 11494 int eventType = nextNoWhitespace(xpp); 11495 while (eventType != XmlPullParser.END_TAG) { 11496 if (!parseExplanationOfBenefitBenefitBalanceComponentContent(eventType, xpp, owner, res)) 11497 unknownContent(xpp); 11498 eventType = nextNoWhitespace(xpp); 11499 } 11500 next(xpp); 11501 parseElementClose(res); 11502 return res; 11503 } 11504 11505 protected boolean parseExplanationOfBenefitBenefitBalanceComponentContent(int eventType, XmlPullParser xpp, 11506 ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitBalanceComponent res) 11507 throws XmlPullParserException, IOException, FHIRFormatError { 11508 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11509 res.setCategory(parseCodeableConcept(xpp)); 11510 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excluded")) { 11511 res.setExcludedElement(parseBoolean(xpp)); 11512 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 11513 res.setNameElement(parseString(xpp)); 11514 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 11515 res.setDescriptionElement(parseString(xpp)); 11516 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 11517 res.setNetwork(parseCodeableConcept(xpp)); 11518 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { 11519 res.setUnit(parseCodeableConcept(xpp)); 11520 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("term")) { 11521 res.setTerm(parseCodeableConcept(xpp)); 11522 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("financial")) { 11523 res.getFinancial().add(parseExplanationOfBenefitBenefitComponent(xpp, owner)); 11524 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11525 return false; 11526 return true; 11527 } 11528 11529 protected ExplanationOfBenefit.BenefitComponent parseExplanationOfBenefitBenefitComponent(XmlPullParser xpp, 11530 ExplanationOfBenefit owner) throws XmlPullParserException, IOException, FHIRFormatError { 11531 ExplanationOfBenefit.BenefitComponent res = new ExplanationOfBenefit.BenefitComponent(); 11532 parseBackboneAttributes(xpp, res); 11533 next(xpp); 11534 int eventType = nextNoWhitespace(xpp); 11535 while (eventType != XmlPullParser.END_TAG) { 11536 if (!parseExplanationOfBenefitBenefitComponentContent(eventType, xpp, owner, res)) 11537 unknownContent(xpp); 11538 eventType = nextNoWhitespace(xpp); 11539 } 11540 next(xpp); 11541 parseElementClose(res); 11542 return res; 11543 } 11544 11545 protected boolean parseExplanationOfBenefitBenefitComponentContent(int eventType, XmlPullParser xpp, 11546 ExplanationOfBenefit owner, ExplanationOfBenefit.BenefitComponent res) 11547 throws XmlPullParserException, IOException, FHIRFormatError { 11548 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11549 res.setType(parseCodeableConcept(xpp)); 11550 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { 11551 res.setAllowed(parseType("allowed", xpp)); 11552 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "used")) { 11553 res.setUsed(parseType("used", xpp)); 11554 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11555 return false; 11556 return true; 11557 } 11558 11559 protected FamilyMemberHistory parseFamilyMemberHistory(XmlPullParser xpp) 11560 throws XmlPullParserException, IOException, FHIRFormatError { 11561 FamilyMemberHistory res = new FamilyMemberHistory(); 11562 parseDomainResourceAttributes(xpp, res); 11563 next(xpp); 11564 int eventType = nextNoWhitespace(xpp); 11565 while (eventType != XmlPullParser.END_TAG) { 11566 if (!parseFamilyMemberHistoryContent(eventType, xpp, res)) 11567 unknownContent(xpp); 11568 eventType = nextNoWhitespace(xpp); 11569 } 11570 next(xpp); 11571 parseElementClose(res); 11572 return res; 11573 } 11574 11575 protected boolean parseFamilyMemberHistoryContent(int eventType, XmlPullParser xpp, FamilyMemberHistory res) 11576 throws XmlPullParserException, IOException, FHIRFormatError { 11577 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 11578 res.getIdentifier().add(parseIdentifier(xpp)); 11579 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 11580 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 11581 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 11582 res.getInstantiatesUri().add(parseUri(xpp)); 11583 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 11584 res.setStatusElement(parseEnumeration(xpp, FamilyMemberHistory.FamilyHistoryStatus.NULL, 11585 new FamilyMemberHistory.FamilyHistoryStatusEnumFactory())); 11586 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { 11587 res.setDataAbsentReason(parseCodeableConcept(xpp)); 11588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 11589 res.setPatient(parseReference(xpp)); 11590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 11591 res.setDateElement(parseDateTime(xpp)); 11592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 11593 res.setNameElement(parseString(xpp)); 11594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 11595 res.setRelationship(parseCodeableConcept(xpp)); 11596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sex")) { 11597 res.setSex(parseCodeableConcept(xpp)); 11598 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "born")) { 11599 res.setBorn(parseType("born", xpp)); 11600 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "age")) { 11601 res.setAge(parseType("age", xpp)); 11602 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("estimatedAge")) { 11603 res.setEstimatedAgeElement(parseBoolean(xpp)); 11604 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { 11605 res.setDeceased(parseType("deceased", xpp)); 11606 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 11607 res.getReasonCode().add(parseCodeableConcept(xpp)); 11608 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 11609 res.getReasonReference().add(parseReference(xpp)); 11610 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 11611 res.getNote().add(parseAnnotation(xpp)); 11612 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 11613 res.getCondition().add(parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent(xpp, res)); 11614 } else if (!parseDomainResourceContent(eventType, xpp, res)) 11615 return false; 11616 return true; 11617 } 11618 11619 protected FamilyMemberHistory.FamilyMemberHistoryConditionComponent parseFamilyMemberHistoryFamilyMemberHistoryConditionComponent( 11620 XmlPullParser xpp, FamilyMemberHistory owner) throws XmlPullParserException, IOException, FHIRFormatError { 11621 FamilyMemberHistory.FamilyMemberHistoryConditionComponent res = new FamilyMemberHistory.FamilyMemberHistoryConditionComponent(); 11622 parseBackboneAttributes(xpp, res); 11623 next(xpp); 11624 int eventType = nextNoWhitespace(xpp); 11625 while (eventType != XmlPullParser.END_TAG) { 11626 if (!parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(eventType, xpp, owner, res)) 11627 unknownContent(xpp); 11628 eventType = nextNoWhitespace(xpp); 11629 } 11630 next(xpp); 11631 parseElementClose(res); 11632 return res; 11633 } 11634 11635 protected boolean parseFamilyMemberHistoryFamilyMemberHistoryConditionComponentContent(int eventType, 11636 XmlPullParser xpp, FamilyMemberHistory owner, FamilyMemberHistory.FamilyMemberHistoryConditionComponent res) 11637 throws XmlPullParserException, IOException, FHIRFormatError { 11638 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 11639 res.setCode(parseCodeableConcept(xpp)); 11640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 11641 res.setOutcome(parseCodeableConcept(xpp)); 11642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contributedToDeath")) { 11643 res.setContributedToDeathElement(parseBoolean(xpp)); 11644 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "onset")) { 11645 res.setOnset(parseType("onset", xpp)); 11646 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 11647 res.getNote().add(parseAnnotation(xpp)); 11648 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11649 return false; 11650 return true; 11651 } 11652 11653 protected Flag parseFlag(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 11654 Flag res = new Flag(); 11655 parseDomainResourceAttributes(xpp, res); 11656 next(xpp); 11657 int eventType = nextNoWhitespace(xpp); 11658 while (eventType != XmlPullParser.END_TAG) { 11659 if (!parseFlagContent(eventType, xpp, res)) 11660 unknownContent(xpp); 11661 eventType = nextNoWhitespace(xpp); 11662 } 11663 next(xpp); 11664 parseElementClose(res); 11665 return res; 11666 } 11667 11668 protected boolean parseFlagContent(int eventType, XmlPullParser xpp, Flag res) 11669 throws XmlPullParserException, IOException, FHIRFormatError { 11670 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 11671 res.getIdentifier().add(parseIdentifier(xpp)); 11672 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 11673 res.setStatusElement(parseEnumeration(xpp, Flag.FlagStatus.NULL, new Flag.FlagStatusEnumFactory())); 11674 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11675 res.getCategory().add(parseCodeableConcept(xpp)); 11676 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 11677 res.setCode(parseCodeableConcept(xpp)); 11678 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 11679 res.setSubject(parseReference(xpp)); 11680 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 11681 res.setPeriod(parsePeriod(xpp)); 11682 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 11683 res.setEncounter(parseReference(xpp)); 11684 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 11685 res.setAuthor(parseReference(xpp)); 11686 } else if (!parseDomainResourceContent(eventType, xpp, res)) 11687 return false; 11688 return true; 11689 } 11690 11691 protected Goal parseGoal(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 11692 Goal res = new Goal(); 11693 parseDomainResourceAttributes(xpp, res); 11694 next(xpp); 11695 int eventType = nextNoWhitespace(xpp); 11696 while (eventType != XmlPullParser.END_TAG) { 11697 if (!parseGoalContent(eventType, xpp, res)) 11698 unknownContent(xpp); 11699 eventType = nextNoWhitespace(xpp); 11700 } 11701 next(xpp); 11702 parseElementClose(res); 11703 return res; 11704 } 11705 11706 protected boolean parseGoalContent(int eventType, XmlPullParser xpp, Goal res) 11707 throws XmlPullParserException, IOException, FHIRFormatError { 11708 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 11709 res.getIdentifier().add(parseIdentifier(xpp)); 11710 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lifecycleStatus")) { 11711 res.setLifecycleStatusElement( 11712 parseEnumeration(xpp, Goal.GoalLifecycleStatus.NULL, new Goal.GoalLifecycleStatusEnumFactory())); 11713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("achievementStatus")) { 11714 res.setAchievementStatus(parseCodeableConcept(xpp)); 11715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 11716 res.getCategory().add(parseCodeableConcept(xpp)); 11717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 11718 res.setPriority(parseCodeableConcept(xpp)); 11719 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 11720 res.setDescription(parseCodeableConcept(xpp)); 11721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 11722 res.setSubject(parseReference(xpp)); 11723 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "start")) { 11724 res.setStart(parseType("start", xpp)); 11725 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 11726 res.getTarget().add(parseGoalGoalTargetComponent(xpp, res)); 11727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { 11728 res.setStatusDateElement(parseDate(xpp)); 11729 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 11730 res.setStatusReasonElement(parseString(xpp)); 11731 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expressedBy")) { 11732 res.setExpressedBy(parseReference(xpp)); 11733 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { 11734 res.getAddresses().add(parseReference(xpp)); 11735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 11736 res.getNote().add(parseAnnotation(xpp)); 11737 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeCode")) { 11738 res.getOutcomeCode().add(parseCodeableConcept(xpp)); 11739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcomeReference")) { 11740 res.getOutcomeReference().add(parseReference(xpp)); 11741 } else if (!parseDomainResourceContent(eventType, xpp, res)) 11742 return false; 11743 return true; 11744 } 11745 11746 protected Goal.GoalTargetComponent parseGoalGoalTargetComponent(XmlPullParser xpp, Goal owner) 11747 throws XmlPullParserException, IOException, FHIRFormatError { 11748 Goal.GoalTargetComponent res = new Goal.GoalTargetComponent(); 11749 parseBackboneAttributes(xpp, res); 11750 next(xpp); 11751 int eventType = nextNoWhitespace(xpp); 11752 while (eventType != XmlPullParser.END_TAG) { 11753 if (!parseGoalGoalTargetComponentContent(eventType, xpp, owner, res)) 11754 unknownContent(xpp); 11755 eventType = nextNoWhitespace(xpp); 11756 } 11757 next(xpp); 11758 parseElementClose(res); 11759 return res; 11760 } 11761 11762 protected boolean parseGoalGoalTargetComponentContent(int eventType, XmlPullParser xpp, Goal owner, 11763 Goal.GoalTargetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 11764 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { 11765 res.setMeasure(parseCodeableConcept(xpp)); 11766 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { 11767 res.setDetail(parseType("detail", xpp)); 11768 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "due")) { 11769 res.setDue(parseType("due", xpp)); 11770 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11771 return false; 11772 return true; 11773 } 11774 11775 protected GraphDefinition parseGraphDefinition(XmlPullParser xpp) 11776 throws XmlPullParserException, IOException, FHIRFormatError { 11777 GraphDefinition res = new GraphDefinition(); 11778 parseDomainResourceAttributes(xpp, res); 11779 next(xpp); 11780 int eventType = nextNoWhitespace(xpp); 11781 while (eventType != XmlPullParser.END_TAG) { 11782 if (!parseGraphDefinitionContent(eventType, xpp, res)) 11783 unknownContent(xpp); 11784 eventType = nextNoWhitespace(xpp); 11785 } 11786 next(xpp); 11787 parseElementClose(res); 11788 return res; 11789 } 11790 11791 protected boolean parseGraphDefinitionContent(int eventType, XmlPullParser xpp, GraphDefinition res) 11792 throws XmlPullParserException, IOException, FHIRFormatError { 11793 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 11794 res.setUrlElement(parseUri(xpp)); 11795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 11796 res.setVersionElement(parseString(xpp)); 11797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 11798 res.setNameElement(parseString(xpp)); 11799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 11800 res.setStatusElement( 11801 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 11802 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 11803 res.setExperimentalElement(parseBoolean(xpp)); 11804 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 11805 res.setDateElement(parseDateTime(xpp)); 11806 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 11807 res.setPublisherElement(parseString(xpp)); 11808 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 11809 res.getContact().add(parseContactDetail(xpp)); 11810 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 11811 res.setDescriptionElement(parseMarkdown(xpp)); 11812 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 11813 res.getUseContext().add(parseUsageContext(xpp)); 11814 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 11815 res.getJurisdiction().add(parseCodeableConcept(xpp)); 11816 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 11817 res.setPurposeElement(parseMarkdown(xpp)); 11818 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 11819 res.setStartElement(parseCode(xpp)); 11820 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 11821 res.setProfileElement(parseCanonical(xpp)); 11822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 11823 res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, res)); 11824 } else if (!parseDomainResourceContent(eventType, xpp, res)) 11825 return false; 11826 return true; 11827 } 11828 11829 protected GraphDefinition.GraphDefinitionLinkComponent parseGraphDefinitionGraphDefinitionLinkComponent( 11830 XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 11831 GraphDefinition.GraphDefinitionLinkComponent res = new GraphDefinition.GraphDefinitionLinkComponent(); 11832 parseBackboneAttributes(xpp, res); 11833 next(xpp); 11834 int eventType = nextNoWhitespace(xpp); 11835 while (eventType != XmlPullParser.END_TAG) { 11836 if (!parseGraphDefinitionGraphDefinitionLinkComponentContent(eventType, xpp, owner, res)) 11837 unknownContent(xpp); 11838 eventType = nextNoWhitespace(xpp); 11839 } 11840 next(xpp); 11841 parseElementClose(res); 11842 return res; 11843 } 11844 11845 protected boolean parseGraphDefinitionGraphDefinitionLinkComponentContent(int eventType, XmlPullParser xpp, 11846 GraphDefinition owner, GraphDefinition.GraphDefinitionLinkComponent res) 11847 throws XmlPullParserException, IOException, FHIRFormatError { 11848 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 11849 res.setPathElement(parseString(xpp)); 11850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sliceName")) { 11851 res.setSliceNameElement(parseString(xpp)); 11852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 11853 res.setMinElement(parseInteger(xpp)); 11854 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 11855 res.setMaxElement(parseString(xpp)); 11856 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 11857 res.setDescriptionElement(parseString(xpp)); 11858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 11859 res.getTarget().add(parseGraphDefinitionGraphDefinitionLinkTargetComponent(xpp, owner)); 11860 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11861 return false; 11862 return true; 11863 } 11864 11865 protected GraphDefinition.GraphDefinitionLinkTargetComponent parseGraphDefinitionGraphDefinitionLinkTargetComponent( 11866 XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 11867 GraphDefinition.GraphDefinitionLinkTargetComponent res = new GraphDefinition.GraphDefinitionLinkTargetComponent(); 11868 parseBackboneAttributes(xpp, res); 11869 next(xpp); 11870 int eventType = nextNoWhitespace(xpp); 11871 while (eventType != XmlPullParser.END_TAG) { 11872 if (!parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(eventType, xpp, owner, res)) 11873 unknownContent(xpp); 11874 eventType = nextNoWhitespace(xpp); 11875 } 11876 next(xpp); 11877 parseElementClose(res); 11878 return res; 11879 } 11880 11881 protected boolean parseGraphDefinitionGraphDefinitionLinkTargetComponentContent(int eventType, XmlPullParser xpp, 11882 GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetComponent res) 11883 throws XmlPullParserException, IOException, FHIRFormatError { 11884 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11885 res.setTypeElement(parseCode(xpp)); 11886 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("params")) { 11887 res.setParamsElement(parseString(xpp)); 11888 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 11889 res.setProfileElement(parseCanonical(xpp)); 11890 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compartment")) { 11891 res.getCompartment().add(parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(xpp, owner)); 11892 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 11893 res.getLink().add(parseGraphDefinitionGraphDefinitionLinkComponent(xpp, owner)); 11894 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11895 return false; 11896 return true; 11897 } 11898 11899 protected GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent( 11900 XmlPullParser xpp, GraphDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 11901 GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res = new GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); 11902 parseBackboneAttributes(xpp, res); 11903 next(xpp); 11904 int eventType = nextNoWhitespace(xpp); 11905 while (eventType != XmlPullParser.END_TAG) { 11906 if (!parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(eventType, xpp, owner, res)) 11907 unknownContent(xpp); 11908 eventType = nextNoWhitespace(xpp); 11909 } 11910 next(xpp); 11911 parseElementClose(res); 11912 return res; 11913 } 11914 11915 protected boolean parseGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentContent(int eventType, 11916 XmlPullParser xpp, GraphDefinition owner, GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent res) 11917 throws XmlPullParserException, IOException, FHIRFormatError { 11918 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 11919 res.setUseElement(parseEnumeration(xpp, GraphDefinition.GraphCompartmentUse.NULL, 11920 new GraphDefinition.GraphCompartmentUseEnumFactory())); 11921 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 11922 res.setCodeElement(parseEnumeration(xpp, GraphDefinition.CompartmentCode.NULL, 11923 new GraphDefinition.CompartmentCodeEnumFactory())); 11924 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { 11925 res.setRuleElement(parseEnumeration(xpp, GraphDefinition.GraphCompartmentRule.NULL, 11926 new GraphDefinition.GraphCompartmentRuleEnumFactory())); 11927 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 11928 res.setExpressionElement(parseString(xpp)); 11929 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 11930 res.setDescriptionElement(parseString(xpp)); 11931 } else if (!parseBackboneElementContent(eventType, xpp, res)) 11932 return false; 11933 return true; 11934 } 11935 11936 protected Group parseGroup(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 11937 Group res = new Group(); 11938 parseDomainResourceAttributes(xpp, res); 11939 next(xpp); 11940 int eventType = nextNoWhitespace(xpp); 11941 while (eventType != XmlPullParser.END_TAG) { 11942 if (!parseGroupContent(eventType, xpp, res)) 11943 unknownContent(xpp); 11944 eventType = nextNoWhitespace(xpp); 11945 } 11946 next(xpp); 11947 parseElementClose(res); 11948 return res; 11949 } 11950 11951 protected boolean parseGroupContent(int eventType, XmlPullParser xpp, Group res) 11952 throws XmlPullParserException, IOException, FHIRFormatError { 11953 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 11954 res.getIdentifier().add(parseIdentifier(xpp)); 11955 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 11956 res.setActiveElement(parseBoolean(xpp)); 11957 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 11958 res.setTypeElement(parseEnumeration(xpp, Group.GroupType.NULL, new Group.GroupTypeEnumFactory())); 11959 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actual")) { 11960 res.setActualElement(parseBoolean(xpp)); 11961 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 11962 res.setCode(parseCodeableConcept(xpp)); 11963 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 11964 res.setNameElement(parseString(xpp)); 11965 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 11966 res.setQuantityElement(parseUnsignedInt(xpp)); 11967 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingEntity")) { 11968 res.setManagingEntity(parseReference(xpp)); 11969 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { 11970 res.getCharacteristic().add(parseGroupGroupCharacteristicComponent(xpp, res)); 11971 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("member")) { 11972 res.getMember().add(parseGroupGroupMemberComponent(xpp, res)); 11973 } else if (!parseDomainResourceContent(eventType, xpp, res)) 11974 return false; 11975 return true; 11976 } 11977 11978 protected Group.GroupCharacteristicComponent parseGroupGroupCharacteristicComponent(XmlPullParser xpp, Group owner) 11979 throws XmlPullParserException, IOException, FHIRFormatError { 11980 Group.GroupCharacteristicComponent res = new Group.GroupCharacteristicComponent(); 11981 parseBackboneAttributes(xpp, res); 11982 next(xpp); 11983 int eventType = nextNoWhitespace(xpp); 11984 while (eventType != XmlPullParser.END_TAG) { 11985 if (!parseGroupGroupCharacteristicComponentContent(eventType, xpp, owner, res)) 11986 unknownContent(xpp); 11987 eventType = nextNoWhitespace(xpp); 11988 } 11989 next(xpp); 11990 parseElementClose(res); 11991 return res; 11992 } 11993 11994 protected boolean parseGroupGroupCharacteristicComponentContent(int eventType, XmlPullParser xpp, Group owner, 11995 Group.GroupCharacteristicComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 11996 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 11997 res.setCode(parseCodeableConcept(xpp)); 11998 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 11999 res.setValue(parseType("value", xpp)); 12000 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { 12001 res.setExcludeElement(parseBoolean(xpp)); 12002 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 12003 res.setPeriod(parsePeriod(xpp)); 12004 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12005 return false; 12006 return true; 12007 } 12008 12009 protected Group.GroupMemberComponent parseGroupGroupMemberComponent(XmlPullParser xpp, Group owner) 12010 throws XmlPullParserException, IOException, FHIRFormatError { 12011 Group.GroupMemberComponent res = new Group.GroupMemberComponent(); 12012 parseBackboneAttributes(xpp, res); 12013 next(xpp); 12014 int eventType = nextNoWhitespace(xpp); 12015 while (eventType != XmlPullParser.END_TAG) { 12016 if (!parseGroupGroupMemberComponentContent(eventType, xpp, owner, res)) 12017 unknownContent(xpp); 12018 eventType = nextNoWhitespace(xpp); 12019 } 12020 next(xpp); 12021 parseElementClose(res); 12022 return res; 12023 } 12024 12025 protected boolean parseGroupGroupMemberComponentContent(int eventType, XmlPullParser xpp, Group owner, 12026 Group.GroupMemberComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 12027 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { 12028 res.setEntity(parseReference(xpp)); 12029 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 12030 res.setPeriod(parsePeriod(xpp)); 12031 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { 12032 res.setInactiveElement(parseBoolean(xpp)); 12033 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12034 return false; 12035 return true; 12036 } 12037 12038 protected GuidanceResponse parseGuidanceResponse(XmlPullParser xpp) 12039 throws XmlPullParserException, IOException, FHIRFormatError { 12040 GuidanceResponse res = new GuidanceResponse(); 12041 parseDomainResourceAttributes(xpp, res); 12042 next(xpp); 12043 int eventType = nextNoWhitespace(xpp); 12044 while (eventType != XmlPullParser.END_TAG) { 12045 if (!parseGuidanceResponseContent(eventType, xpp, res)) 12046 unknownContent(xpp); 12047 eventType = nextNoWhitespace(xpp); 12048 } 12049 next(xpp); 12050 parseElementClose(res); 12051 return res; 12052 } 12053 12054 protected boolean parseGuidanceResponseContent(int eventType, XmlPullParser xpp, GuidanceResponse res) 12055 throws XmlPullParserException, IOException, FHIRFormatError { 12056 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestIdentifier")) { 12057 res.setRequestIdentifier(parseIdentifier(xpp)); 12058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12059 res.getIdentifier().add(parseIdentifier(xpp)); 12060 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "module")) { 12061 res.setModule(parseType("module", xpp)); 12062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 12063 res.setStatusElement(parseEnumeration(xpp, GuidanceResponse.GuidanceResponseStatus.NULL, 12064 new GuidanceResponse.GuidanceResponseStatusEnumFactory())); 12065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 12066 res.setSubject(parseReference(xpp)); 12067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 12068 res.setEncounter(parseReference(xpp)); 12069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("occurrenceDateTime")) { 12070 res.setOccurrenceDateTimeElement(parseDateTime(xpp)); 12071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 12072 res.setPerformer(parseReference(xpp)); 12073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 12074 res.getReasonCode().add(parseCodeableConcept(xpp)); 12075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 12076 res.getReasonReference().add(parseReference(xpp)); 12077 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 12078 res.getNote().add(parseAnnotation(xpp)); 12079 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluationMessage")) { 12080 res.getEvaluationMessage().add(parseReference(xpp)); 12081 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outputParameters")) { 12082 res.setOutputParameters(parseReference(xpp)); 12083 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { 12084 res.setResult(parseReference(xpp)); 12085 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { 12086 res.getDataRequirement().add(parseDataRequirement(xpp)); 12087 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12088 return false; 12089 return true; 12090 } 12091 12092 protected HealthcareService parseHealthcareService(XmlPullParser xpp) 12093 throws XmlPullParserException, IOException, FHIRFormatError { 12094 HealthcareService res = new HealthcareService(); 12095 parseDomainResourceAttributes(xpp, res); 12096 next(xpp); 12097 int eventType = nextNoWhitespace(xpp); 12098 while (eventType != XmlPullParser.END_TAG) { 12099 if (!parseHealthcareServiceContent(eventType, xpp, res)) 12100 unknownContent(xpp); 12101 eventType = nextNoWhitespace(xpp); 12102 } 12103 next(xpp); 12104 parseElementClose(res); 12105 return res; 12106 } 12107 12108 protected boolean parseHealthcareServiceContent(int eventType, XmlPullParser xpp, HealthcareService res) 12109 throws XmlPullParserException, IOException, FHIRFormatError { 12110 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12111 res.getIdentifier().add(parseIdentifier(xpp)); 12112 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 12113 res.setActiveElement(parseBoolean(xpp)); 12114 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("providedBy")) { 12115 res.setProvidedBy(parseReference(xpp)); 12116 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 12117 res.getCategory().add(parseCodeableConcept(xpp)); 12118 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 12119 res.getType().add(parseCodeableConcept(xpp)); 12120 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 12121 res.getSpecialty().add(parseCodeableConcept(xpp)); 12122 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 12123 res.getLocation().add(parseReference(xpp)); 12124 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 12125 res.setNameElement(parseString(xpp)); 12126 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 12127 res.setCommentElement(parseString(xpp)); 12128 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extraDetails")) { 12129 res.setExtraDetailsElement(parseMarkdown(xpp)); 12130 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { 12131 res.setPhoto(parseAttachment(xpp)); 12132 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 12133 res.getTelecom().add(parseContactPoint(xpp)); 12134 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverageArea")) { 12135 res.getCoverageArea().add(parseReference(xpp)); 12136 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceProvisionCode")) { 12137 res.getServiceProvisionCode().add(parseCodeableConcept(xpp)); 12138 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eligibility")) { 12139 res.getEligibility().add(parseHealthcareServiceHealthcareServiceEligibilityComponent(xpp, res)); 12140 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("program")) { 12141 res.getProgram().add(parseCodeableConcept(xpp)); 12142 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { 12143 res.getCharacteristic().add(parseCodeableConcept(xpp)); 12144 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { 12145 res.getCommunication().add(parseCodeableConcept(xpp)); 12146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referralMethod")) { 12147 res.getReferralMethod().add(parseCodeableConcept(xpp)); 12148 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentRequired")) { 12149 res.setAppointmentRequiredElement(parseBoolean(xpp)); 12150 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { 12151 res.getAvailableTime().add(parseHealthcareServiceHealthcareServiceAvailableTimeComponent(xpp, res)); 12152 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { 12153 res.getNotAvailable().add(parseHealthcareServiceHealthcareServiceNotAvailableComponent(xpp, res)); 12154 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { 12155 res.setAvailabilityExceptionsElement(parseString(xpp)); 12156 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 12157 res.getEndpoint().add(parseReference(xpp)); 12158 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12159 return false; 12160 return true; 12161 } 12162 12163 protected HealthcareService.HealthcareServiceEligibilityComponent parseHealthcareServiceHealthcareServiceEligibilityComponent( 12164 XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { 12165 HealthcareService.HealthcareServiceEligibilityComponent res = new HealthcareService.HealthcareServiceEligibilityComponent(); 12166 parseBackboneAttributes(xpp, res); 12167 next(xpp); 12168 int eventType = nextNoWhitespace(xpp); 12169 while (eventType != XmlPullParser.END_TAG) { 12170 if (!parseHealthcareServiceHealthcareServiceEligibilityComponentContent(eventType, xpp, owner, res)) 12171 unknownContent(xpp); 12172 eventType = nextNoWhitespace(xpp); 12173 } 12174 next(xpp); 12175 parseElementClose(res); 12176 return res; 12177 } 12178 12179 protected boolean parseHealthcareServiceHealthcareServiceEligibilityComponentContent(int eventType, XmlPullParser xpp, 12180 HealthcareService owner, HealthcareService.HealthcareServiceEligibilityComponent res) 12181 throws XmlPullParserException, IOException, FHIRFormatError { 12182 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 12183 res.setCode(parseCodeableConcept(xpp)); 12184 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 12185 res.setCommentElement(parseMarkdown(xpp)); 12186 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12187 return false; 12188 return true; 12189 } 12190 12191 protected HealthcareService.HealthcareServiceAvailableTimeComponent parseHealthcareServiceHealthcareServiceAvailableTimeComponent( 12192 XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { 12193 HealthcareService.HealthcareServiceAvailableTimeComponent res = new HealthcareService.HealthcareServiceAvailableTimeComponent(); 12194 parseBackboneAttributes(xpp, res); 12195 next(xpp); 12196 int eventType = nextNoWhitespace(xpp); 12197 while (eventType != XmlPullParser.END_TAG) { 12198 if (!parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(eventType, xpp, owner, res)) 12199 unknownContent(xpp); 12200 eventType = nextNoWhitespace(xpp); 12201 } 12202 next(xpp); 12203 parseElementClose(res); 12204 return res; 12205 } 12206 12207 protected boolean parseHealthcareServiceHealthcareServiceAvailableTimeComponentContent(int eventType, 12208 XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceAvailableTimeComponent res) 12209 throws XmlPullParserException, IOException, FHIRFormatError { 12210 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { 12211 res.getDaysOfWeek() 12212 .add(parseEnumeration(xpp, HealthcareService.DaysOfWeek.NULL, new HealthcareService.DaysOfWeekEnumFactory())); 12213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { 12214 res.setAllDayElement(parseBoolean(xpp)); 12215 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { 12216 res.setAvailableStartTimeElement(parseTime(xpp)); 12217 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { 12218 res.setAvailableEndTimeElement(parseTime(xpp)); 12219 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12220 return false; 12221 return true; 12222 } 12223 12224 protected HealthcareService.HealthcareServiceNotAvailableComponent parseHealthcareServiceHealthcareServiceNotAvailableComponent( 12225 XmlPullParser xpp, HealthcareService owner) throws XmlPullParserException, IOException, FHIRFormatError { 12226 HealthcareService.HealthcareServiceNotAvailableComponent res = new HealthcareService.HealthcareServiceNotAvailableComponent(); 12227 parseBackboneAttributes(xpp, res); 12228 next(xpp); 12229 int eventType = nextNoWhitespace(xpp); 12230 while (eventType != XmlPullParser.END_TAG) { 12231 if (!parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(eventType, xpp, owner, res)) 12232 unknownContent(xpp); 12233 eventType = nextNoWhitespace(xpp); 12234 } 12235 next(xpp); 12236 parseElementClose(res); 12237 return res; 12238 } 12239 12240 protected boolean parseHealthcareServiceHealthcareServiceNotAvailableComponentContent(int eventType, 12241 XmlPullParser xpp, HealthcareService owner, HealthcareService.HealthcareServiceNotAvailableComponent res) 12242 throws XmlPullParserException, IOException, FHIRFormatError { 12243 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12244 res.setDescriptionElement(parseString(xpp)); 12245 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { 12246 res.setDuring(parsePeriod(xpp)); 12247 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12248 return false; 12249 return true; 12250 } 12251 12252 protected ImagingStudy parseImagingStudy(XmlPullParser xpp) 12253 throws XmlPullParserException, IOException, FHIRFormatError { 12254 ImagingStudy res = new ImagingStudy(); 12255 parseDomainResourceAttributes(xpp, res); 12256 next(xpp); 12257 int eventType = nextNoWhitespace(xpp); 12258 while (eventType != XmlPullParser.END_TAG) { 12259 if (!parseImagingStudyContent(eventType, xpp, res)) 12260 unknownContent(xpp); 12261 eventType = nextNoWhitespace(xpp); 12262 } 12263 next(xpp); 12264 parseElementClose(res); 12265 return res; 12266 } 12267 12268 protected boolean parseImagingStudyContent(int eventType, XmlPullParser xpp, ImagingStudy res) 12269 throws XmlPullParserException, IOException, FHIRFormatError { 12270 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12271 res.getIdentifier().add(parseIdentifier(xpp)); 12272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 12273 res.setStatusElement(parseEnumeration(xpp, ImagingStudy.ImagingStudyStatus.NULL, 12274 new ImagingStudy.ImagingStudyStatusEnumFactory())); 12275 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modality")) { 12276 res.getModality().add(parseCoding(xpp)); 12277 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 12278 res.setSubject(parseReference(xpp)); 12279 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 12280 res.setEncounter(parseReference(xpp)); 12281 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { 12282 res.setStartedElement(parseDateTime(xpp)); 12283 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 12284 res.getBasedOn().add(parseReference(xpp)); 12285 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referrer")) { 12286 res.setReferrer(parseReference(xpp)); 12287 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpreter")) { 12288 res.getInterpreter().add(parseReference(xpp)); 12289 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 12290 res.getEndpoint().add(parseReference(xpp)); 12291 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfSeries")) { 12292 res.setNumberOfSeriesElement(parseUnsignedInt(xpp)); 12293 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { 12294 res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); 12295 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureReference")) { 12296 res.setProcedureReference(parseReference(xpp)); 12297 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedureCode")) { 12298 res.getProcedureCode().add(parseCodeableConcept(xpp)); 12299 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 12300 res.setLocation(parseReference(xpp)); 12301 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 12302 res.getReasonCode().add(parseCodeableConcept(xpp)); 12303 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 12304 res.getReasonReference().add(parseReference(xpp)); 12305 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 12306 res.getNote().add(parseAnnotation(xpp)); 12307 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12308 res.setDescriptionElement(parseString(xpp)); 12309 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { 12310 res.getSeries().add(parseImagingStudyImagingStudySeriesComponent(xpp, res)); 12311 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12312 return false; 12313 return true; 12314 } 12315 12316 protected ImagingStudy.ImagingStudySeriesComponent parseImagingStudyImagingStudySeriesComponent(XmlPullParser xpp, 12317 ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { 12318 ImagingStudy.ImagingStudySeriesComponent res = new ImagingStudy.ImagingStudySeriesComponent(); 12319 parseBackboneAttributes(xpp, res); 12320 next(xpp); 12321 int eventType = nextNoWhitespace(xpp); 12322 while (eventType != XmlPullParser.END_TAG) { 12323 if (!parseImagingStudyImagingStudySeriesComponentContent(eventType, xpp, owner, res)) 12324 unknownContent(xpp); 12325 eventType = nextNoWhitespace(xpp); 12326 } 12327 next(xpp); 12328 parseElementClose(res); 12329 return res; 12330 } 12331 12332 protected boolean parseImagingStudyImagingStudySeriesComponentContent(int eventType, XmlPullParser xpp, 12333 ImagingStudy owner, ImagingStudy.ImagingStudySeriesComponent res) 12334 throws XmlPullParserException, IOException, FHIRFormatError { 12335 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { 12336 res.setUidElement(parseId(xpp)); 12337 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 12338 res.setNumberElement(parseUnsignedInt(xpp)); 12339 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modality")) { 12340 res.setModality(parseCoding(xpp)); 12341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12342 res.setDescriptionElement(parseString(xpp)); 12343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfInstances")) { 12344 res.setNumberOfInstancesElement(parseUnsignedInt(xpp)); 12345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 12346 res.getEndpoint().add(parseReference(xpp)); 12347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 12348 res.setBodySite(parseCoding(xpp)); 12349 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("laterality")) { 12350 res.setLaterality(parseCoding(xpp)); 12351 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { 12352 res.getSpecimen().add(parseReference(xpp)); 12353 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("started")) { 12354 res.setStartedElement(parseDateTime(xpp)); 12355 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 12356 res.getPerformer().add(parseImagingStudyImagingStudySeriesPerformerComponent(xpp, owner)); 12357 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 12358 res.getInstance().add(parseImagingStudyImagingStudySeriesInstanceComponent(xpp, owner)); 12359 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12360 return false; 12361 return true; 12362 } 12363 12364 protected ImagingStudy.ImagingStudySeriesPerformerComponent parseImagingStudyImagingStudySeriesPerformerComponent( 12365 XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { 12366 ImagingStudy.ImagingStudySeriesPerformerComponent res = new ImagingStudy.ImagingStudySeriesPerformerComponent(); 12367 parseBackboneAttributes(xpp, res); 12368 next(xpp); 12369 int eventType = nextNoWhitespace(xpp); 12370 while (eventType != XmlPullParser.END_TAG) { 12371 if (!parseImagingStudyImagingStudySeriesPerformerComponentContent(eventType, xpp, owner, res)) 12372 unknownContent(xpp); 12373 eventType = nextNoWhitespace(xpp); 12374 } 12375 next(xpp); 12376 parseElementClose(res); 12377 return res; 12378 } 12379 12380 protected boolean parseImagingStudyImagingStudySeriesPerformerComponentContent(int eventType, XmlPullParser xpp, 12381 ImagingStudy owner, ImagingStudy.ImagingStudySeriesPerformerComponent res) 12382 throws XmlPullParserException, IOException, FHIRFormatError { 12383 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 12384 res.setFunction(parseCodeableConcept(xpp)); 12385 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 12386 res.setActor(parseReference(xpp)); 12387 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12388 return false; 12389 return true; 12390 } 12391 12392 protected ImagingStudy.ImagingStudySeriesInstanceComponent parseImagingStudyImagingStudySeriesInstanceComponent( 12393 XmlPullParser xpp, ImagingStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { 12394 ImagingStudy.ImagingStudySeriesInstanceComponent res = new ImagingStudy.ImagingStudySeriesInstanceComponent(); 12395 parseBackboneAttributes(xpp, res); 12396 next(xpp); 12397 int eventType = nextNoWhitespace(xpp); 12398 while (eventType != XmlPullParser.END_TAG) { 12399 if (!parseImagingStudyImagingStudySeriesInstanceComponentContent(eventType, xpp, owner, res)) 12400 unknownContent(xpp); 12401 eventType = nextNoWhitespace(xpp); 12402 } 12403 next(xpp); 12404 parseElementClose(res); 12405 return res; 12406 } 12407 12408 protected boolean parseImagingStudyImagingStudySeriesInstanceComponentContent(int eventType, XmlPullParser xpp, 12409 ImagingStudy owner, ImagingStudy.ImagingStudySeriesInstanceComponent res) 12410 throws XmlPullParserException, IOException, FHIRFormatError { 12411 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uid")) { 12412 res.setUidElement(parseId(xpp)); 12413 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sopClass")) { 12414 res.setSopClass(parseCoding(xpp)); 12415 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("number")) { 12416 res.setNumberElement(parseUnsignedInt(xpp)); 12417 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 12418 res.setTitleElement(parseString(xpp)); 12419 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12420 return false; 12421 return true; 12422 } 12423 12424 protected Immunization parseImmunization(XmlPullParser xpp) 12425 throws XmlPullParserException, IOException, FHIRFormatError { 12426 Immunization res = new Immunization(); 12427 parseDomainResourceAttributes(xpp, res); 12428 next(xpp); 12429 int eventType = nextNoWhitespace(xpp); 12430 while (eventType != XmlPullParser.END_TAG) { 12431 if (!parseImmunizationContent(eventType, xpp, res)) 12432 unknownContent(xpp); 12433 eventType = nextNoWhitespace(xpp); 12434 } 12435 next(xpp); 12436 parseElementClose(res); 12437 return res; 12438 } 12439 12440 protected boolean parseImmunizationContent(int eventType, XmlPullParser xpp, Immunization res) 12441 throws XmlPullParserException, IOException, FHIRFormatError { 12442 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12443 res.getIdentifier().add(parseIdentifier(xpp)); 12444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 12445 res.setStatusElement(parseEnumeration(xpp, Immunization.ImmunizationStatus.NULL, 12446 new Immunization.ImmunizationStatusEnumFactory())); 12447 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 12448 res.setStatusReason(parseCodeableConcept(xpp)); 12449 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { 12450 res.setVaccineCode(parseCodeableConcept(xpp)); 12451 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 12452 res.setPatient(parseReference(xpp)); 12453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 12454 res.setEncounter(parseReference(xpp)); 12455 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 12456 res.setOccurrence(parseType("occurrence", xpp)); 12457 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { 12458 res.setRecordedElement(parseDateTime(xpp)); 12459 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("primarySource")) { 12460 res.setPrimarySourceElement(parseBoolean(xpp)); 12461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reportOrigin")) { 12462 res.setReportOrigin(parseCodeableConcept(xpp)); 12463 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 12464 res.setLocation(parseReference(xpp)); 12465 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 12466 res.setManufacturer(parseReference(xpp)); 12467 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { 12468 res.setLotNumberElement(parseString(xpp)); 12469 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { 12470 res.setExpirationDateElement(parseDate(xpp)); 12471 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 12472 res.setSite(parseCodeableConcept(xpp)); 12473 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { 12474 res.setRoute(parseCodeableConcept(xpp)); 12475 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseQuantity")) { 12476 res.setDoseQuantity(parseQuantity(xpp)); 12477 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 12478 res.getPerformer().add(parseImmunizationImmunizationPerformerComponent(xpp, res)); 12479 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 12480 res.getNote().add(parseAnnotation(xpp)); 12481 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 12482 res.getReasonCode().add(parseCodeableConcept(xpp)); 12483 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 12484 res.getReasonReference().add(parseReference(xpp)); 12485 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isSubpotent")) { 12486 res.setIsSubpotentElement(parseBoolean(xpp)); 12487 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subpotentReason")) { 12488 res.getSubpotentReason().add(parseCodeableConcept(xpp)); 12489 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("education")) { 12490 res.getEducation().add(parseImmunizationImmunizationEducationComponent(xpp, res)); 12491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("programEligibility")) { 12492 res.getProgramEligibility().add(parseCodeableConcept(xpp)); 12493 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fundingSource")) { 12494 res.setFundingSource(parseCodeableConcept(xpp)); 12495 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reaction")) { 12496 res.getReaction().add(parseImmunizationImmunizationReactionComponent(xpp, res)); 12497 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocolApplied")) { 12498 res.getProtocolApplied().add(parseImmunizationImmunizationProtocolAppliedComponent(xpp, res)); 12499 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12500 return false; 12501 return true; 12502 } 12503 12504 protected Immunization.ImmunizationPerformerComponent parseImmunizationImmunizationPerformerComponent( 12505 XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { 12506 Immunization.ImmunizationPerformerComponent res = new Immunization.ImmunizationPerformerComponent(); 12507 parseBackboneAttributes(xpp, res); 12508 next(xpp); 12509 int eventType = nextNoWhitespace(xpp); 12510 while (eventType != XmlPullParser.END_TAG) { 12511 if (!parseImmunizationImmunizationPerformerComponentContent(eventType, xpp, owner, res)) 12512 unknownContent(xpp); 12513 eventType = nextNoWhitespace(xpp); 12514 } 12515 next(xpp); 12516 parseElementClose(res); 12517 return res; 12518 } 12519 12520 protected boolean parseImmunizationImmunizationPerformerComponentContent(int eventType, XmlPullParser xpp, 12521 Immunization owner, Immunization.ImmunizationPerformerComponent res) 12522 throws XmlPullParserException, IOException, FHIRFormatError { 12523 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 12524 res.setFunction(parseCodeableConcept(xpp)); 12525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 12526 res.setActor(parseReference(xpp)); 12527 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12528 return false; 12529 return true; 12530 } 12531 12532 protected Immunization.ImmunizationEducationComponent parseImmunizationImmunizationEducationComponent( 12533 XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { 12534 Immunization.ImmunizationEducationComponent res = new Immunization.ImmunizationEducationComponent(); 12535 parseBackboneAttributes(xpp, res); 12536 next(xpp); 12537 int eventType = nextNoWhitespace(xpp); 12538 while (eventType != XmlPullParser.END_TAG) { 12539 if (!parseImmunizationImmunizationEducationComponentContent(eventType, xpp, owner, res)) 12540 unknownContent(xpp); 12541 eventType = nextNoWhitespace(xpp); 12542 } 12543 next(xpp); 12544 parseElementClose(res); 12545 return res; 12546 } 12547 12548 protected boolean parseImmunizationImmunizationEducationComponentContent(int eventType, XmlPullParser xpp, 12549 Immunization owner, Immunization.ImmunizationEducationComponent res) 12550 throws XmlPullParserException, IOException, FHIRFormatError { 12551 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentType")) { 12552 res.setDocumentTypeElement(parseString(xpp)); 12553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 12554 res.setReferenceElement(parseUri(xpp)); 12555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publicationDate")) { 12556 res.setPublicationDateElement(parseDateTime(xpp)); 12557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentationDate")) { 12558 res.setPresentationDateElement(parseDateTime(xpp)); 12559 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12560 return false; 12561 return true; 12562 } 12563 12564 protected Immunization.ImmunizationReactionComponent parseImmunizationImmunizationReactionComponent(XmlPullParser xpp, 12565 Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { 12566 Immunization.ImmunizationReactionComponent res = new Immunization.ImmunizationReactionComponent(); 12567 parseBackboneAttributes(xpp, res); 12568 next(xpp); 12569 int eventType = nextNoWhitespace(xpp); 12570 while (eventType != XmlPullParser.END_TAG) { 12571 if (!parseImmunizationImmunizationReactionComponentContent(eventType, xpp, owner, res)) 12572 unknownContent(xpp); 12573 eventType = nextNoWhitespace(xpp); 12574 } 12575 next(xpp); 12576 parseElementClose(res); 12577 return res; 12578 } 12579 12580 protected boolean parseImmunizationImmunizationReactionComponentContent(int eventType, XmlPullParser xpp, 12581 Immunization owner, Immunization.ImmunizationReactionComponent res) 12582 throws XmlPullParserException, IOException, FHIRFormatError { 12583 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 12584 res.setDateElement(parseDateTime(xpp)); 12585 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 12586 res.setDetail(parseReference(xpp)); 12587 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reported")) { 12588 res.setReportedElement(parseBoolean(xpp)); 12589 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12590 return false; 12591 return true; 12592 } 12593 12594 protected Immunization.ImmunizationProtocolAppliedComponent parseImmunizationImmunizationProtocolAppliedComponent( 12595 XmlPullParser xpp, Immunization owner) throws XmlPullParserException, IOException, FHIRFormatError { 12596 Immunization.ImmunizationProtocolAppliedComponent res = new Immunization.ImmunizationProtocolAppliedComponent(); 12597 parseBackboneAttributes(xpp, res); 12598 next(xpp); 12599 int eventType = nextNoWhitespace(xpp); 12600 while (eventType != XmlPullParser.END_TAG) { 12601 if (!parseImmunizationImmunizationProtocolAppliedComponentContent(eventType, xpp, owner, res)) 12602 unknownContent(xpp); 12603 eventType = nextNoWhitespace(xpp); 12604 } 12605 next(xpp); 12606 parseElementClose(res); 12607 return res; 12608 } 12609 12610 protected boolean parseImmunizationImmunizationProtocolAppliedComponentContent(int eventType, XmlPullParser xpp, 12611 Immunization owner, Immunization.ImmunizationProtocolAppliedComponent res) 12612 throws XmlPullParserException, IOException, FHIRFormatError { 12613 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { 12614 res.setSeriesElement(parseString(xpp)); 12615 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 12616 res.setAuthority(parseReference(xpp)); 12617 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { 12618 res.getTargetDisease().add(parseCodeableConcept(xpp)); 12619 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "doseNumber")) { 12620 res.setDoseNumber(parseType("doseNumber", xpp)); 12621 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "seriesDoses")) { 12622 res.setSeriesDoses(parseType("seriesDoses", xpp)); 12623 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12624 return false; 12625 return true; 12626 } 12627 12628 protected ImmunizationEvaluation parseImmunizationEvaluation(XmlPullParser xpp) 12629 throws XmlPullParserException, IOException, FHIRFormatError { 12630 ImmunizationEvaluation res = new ImmunizationEvaluation(); 12631 parseDomainResourceAttributes(xpp, res); 12632 next(xpp); 12633 int eventType = nextNoWhitespace(xpp); 12634 while (eventType != XmlPullParser.END_TAG) { 12635 if (!parseImmunizationEvaluationContent(eventType, xpp, res)) 12636 unknownContent(xpp); 12637 eventType = nextNoWhitespace(xpp); 12638 } 12639 next(xpp); 12640 parseElementClose(res); 12641 return res; 12642 } 12643 12644 protected boolean parseImmunizationEvaluationContent(int eventType, XmlPullParser xpp, ImmunizationEvaluation res) 12645 throws XmlPullParserException, IOException, FHIRFormatError { 12646 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12647 res.getIdentifier().add(parseIdentifier(xpp)); 12648 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 12649 res.setStatusElement(parseEnumeration(xpp, ImmunizationEvaluation.ImmunizationEvaluationStatus.NULL, 12650 new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory())); 12651 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 12652 res.setPatient(parseReference(xpp)); 12653 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 12654 res.setDateElement(parseDateTime(xpp)); 12655 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 12656 res.setAuthority(parseReference(xpp)); 12657 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { 12658 res.setTargetDisease(parseCodeableConcept(xpp)); 12659 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("immunizationEvent")) { 12660 res.setImmunizationEvent(parseReference(xpp)); 12661 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatus")) { 12662 res.setDoseStatus(parseCodeableConcept(xpp)); 12663 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseStatusReason")) { 12664 res.getDoseStatusReason().add(parseCodeableConcept(xpp)); 12665 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12666 res.setDescriptionElement(parseString(xpp)); 12667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { 12668 res.setSeriesElement(parseString(xpp)); 12669 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "doseNumber")) { 12670 res.setDoseNumber(parseType("doseNumber", xpp)); 12671 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "seriesDoses")) { 12672 res.setSeriesDoses(parseType("seriesDoses", xpp)); 12673 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12674 return false; 12675 return true; 12676 } 12677 12678 protected ImmunizationRecommendation parseImmunizationRecommendation(XmlPullParser xpp) 12679 throws XmlPullParserException, IOException, FHIRFormatError { 12680 ImmunizationRecommendation res = new ImmunizationRecommendation(); 12681 parseDomainResourceAttributes(xpp, res); 12682 next(xpp); 12683 int eventType = nextNoWhitespace(xpp); 12684 while (eventType != XmlPullParser.END_TAG) { 12685 if (!parseImmunizationRecommendationContent(eventType, xpp, res)) 12686 unknownContent(xpp); 12687 eventType = nextNoWhitespace(xpp); 12688 } 12689 next(xpp); 12690 parseElementClose(res); 12691 return res; 12692 } 12693 12694 protected boolean parseImmunizationRecommendationContent(int eventType, XmlPullParser xpp, 12695 ImmunizationRecommendation res) throws XmlPullParserException, IOException, FHIRFormatError { 12696 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 12697 res.getIdentifier().add(parseIdentifier(xpp)); 12698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 12699 res.setPatient(parseReference(xpp)); 12700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 12701 res.setDateElement(parseDateTime(xpp)); 12702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 12703 res.setAuthority(parseReference(xpp)); 12704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recommendation")) { 12705 res.getRecommendation() 12706 .add(parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent(xpp, res)); 12707 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12708 return false; 12709 return true; 12710 } 12711 12712 protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationComponent( 12713 XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { 12714 ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent(); 12715 parseBackboneAttributes(xpp, res); 12716 next(xpp); 12717 int eventType = nextNoWhitespace(xpp); 12718 while (eventType != XmlPullParser.END_TAG) { 12719 if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent(eventType, xpp, 12720 owner, res)) 12721 unknownContent(xpp); 12722 eventType = nextNoWhitespace(xpp); 12723 } 12724 next(xpp); 12725 parseElementClose(res); 12726 return res; 12727 } 12728 12729 protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentContent( 12730 int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, 12731 ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) 12732 throws XmlPullParserException, IOException, FHIRFormatError { 12733 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("vaccineCode")) { 12734 res.getVaccineCode().add(parseCodeableConcept(xpp)); 12735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetDisease")) { 12736 res.setTargetDisease(parseCodeableConcept(xpp)); 12737 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contraindicatedVaccineCode")) { 12738 res.getContraindicatedVaccineCode().add(parseCodeableConcept(xpp)); 12739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("forecastStatus")) { 12740 res.setForecastStatus(parseCodeableConcept(xpp)); 12741 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("forecastReason")) { 12742 res.getForecastReason().add(parseCodeableConcept(xpp)); 12743 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateCriterion")) { 12744 res.getDateCriterion().add( 12745 parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(xpp, owner)); 12746 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12747 res.setDescriptionElement(parseString(xpp)); 12748 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("series")) { 12749 res.setSeriesElement(parseString(xpp)); 12750 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "doseNumber")) { 12751 res.setDoseNumber(parseType("doseNumber", xpp)); 12752 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "seriesDoses")) { 12753 res.setSeriesDoses(parseType("seriesDoses", xpp)); 12754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingImmunization")) { 12755 res.getSupportingImmunization().add(parseReference(xpp)); 12756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingPatientInformation")) { 12757 res.getSupportingPatientInformation().add(parseReference(xpp)); 12758 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12759 return false; 12760 return true; 12761 } 12762 12763 protected ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent( 12764 XmlPullParser xpp, ImmunizationRecommendation owner) throws XmlPullParserException, IOException, FHIRFormatError { 12765 ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res = new ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent(); 12766 parseBackboneAttributes(xpp, res); 12767 next(xpp); 12768 int eventType = nextNoWhitespace(xpp); 12769 while (eventType != XmlPullParser.END_TAG) { 12770 if (!parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent( 12771 eventType, xpp, owner, res)) 12772 unknownContent(xpp); 12773 eventType = nextNoWhitespace(xpp); 12774 } 12775 next(xpp); 12776 parseElementClose(res); 12777 return res; 12778 } 12779 12780 protected boolean parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentContent( 12781 int eventType, XmlPullParser xpp, ImmunizationRecommendation owner, 12782 ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent res) 12783 throws XmlPullParserException, IOException, FHIRFormatError { 12784 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 12785 res.setCode(parseCodeableConcept(xpp)); 12786 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 12787 res.setValueElement(parseDateTime(xpp)); 12788 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12789 return false; 12790 return true; 12791 } 12792 12793 protected ImplementationGuide parseImplementationGuide(XmlPullParser xpp) 12794 throws XmlPullParserException, IOException, FHIRFormatError { 12795 ImplementationGuide res = new ImplementationGuide(); 12796 parseDomainResourceAttributes(xpp, res); 12797 next(xpp); 12798 int eventType = nextNoWhitespace(xpp); 12799 while (eventType != XmlPullParser.END_TAG) { 12800 if (!parseImplementationGuideContent(eventType, xpp, res)) 12801 unknownContent(xpp); 12802 eventType = nextNoWhitespace(xpp); 12803 } 12804 next(xpp); 12805 parseElementClose(res); 12806 return res; 12807 } 12808 12809 protected boolean parseImplementationGuideContent(int eventType, XmlPullParser xpp, ImplementationGuide res) 12810 throws XmlPullParserException, IOException, FHIRFormatError { 12811 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 12812 res.setUrlElement(parseUri(xpp)); 12813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 12814 res.setVersionElement(parseString(xpp)); 12815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 12816 res.setNameElement(parseString(xpp)); 12817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 12818 res.setTitleElement(parseString(xpp)); 12819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 12820 res.setStatusElement( 12821 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 12822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 12823 res.setExperimentalElement(parseBoolean(xpp)); 12824 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 12825 res.setDateElement(parseDateTime(xpp)); 12826 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 12827 res.setPublisherElement(parseString(xpp)); 12828 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 12829 res.getContact().add(parseContactDetail(xpp)); 12830 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12831 res.setDescriptionElement(parseMarkdown(xpp)); 12832 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 12833 res.getUseContext().add(parseUsageContext(xpp)); 12834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 12835 res.getJurisdiction().add(parseCodeableConcept(xpp)); 12836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 12837 res.setCopyrightElement(parseMarkdown(xpp)); 12838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageId")) { 12839 res.setPackageIdElement(parseId(xpp)); 12840 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("license")) { 12841 res.setLicenseElement(parseEnumeration(xpp, ImplementationGuide.SPDXLicense.NULL, 12842 new ImplementationGuide.SPDXLicenseEnumFactory())); 12843 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { 12844 res.getFhirVersion() 12845 .add(parseEnumeration(xpp, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory())); 12846 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependsOn")) { 12847 res.getDependsOn().add(parseImplementationGuideImplementationGuideDependsOnComponent(xpp, res)); 12848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("global")) { 12849 res.getGlobal().add(parseImplementationGuideImplementationGuideGlobalComponent(xpp, res)); 12850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 12851 res.setDefinition(parseImplementationGuideImplementationGuideDefinitionComponent(xpp, res)); 12852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manifest")) { 12853 res.setManifest(parseImplementationGuideImplementationGuideManifestComponent(xpp, res)); 12854 } else if (!parseDomainResourceContent(eventType, xpp, res)) 12855 return false; 12856 return true; 12857 } 12858 12859 protected ImplementationGuide.ImplementationGuideDependsOnComponent parseImplementationGuideImplementationGuideDependsOnComponent( 12860 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 12861 ImplementationGuide.ImplementationGuideDependsOnComponent res = new ImplementationGuide.ImplementationGuideDependsOnComponent(); 12862 parseBackboneAttributes(xpp, res); 12863 next(xpp); 12864 int eventType = nextNoWhitespace(xpp); 12865 while (eventType != XmlPullParser.END_TAG) { 12866 if (!parseImplementationGuideImplementationGuideDependsOnComponentContent(eventType, xpp, owner, res)) 12867 unknownContent(xpp); 12868 eventType = nextNoWhitespace(xpp); 12869 } 12870 next(xpp); 12871 parseElementClose(res); 12872 return res; 12873 } 12874 12875 protected boolean parseImplementationGuideImplementationGuideDependsOnComponentContent(int eventType, 12876 XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDependsOnComponent res) 12877 throws XmlPullParserException, IOException, FHIRFormatError { 12878 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 12879 res.setUriElement(parseCanonical(xpp)); 12880 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageId")) { 12881 res.setPackageIdElement(parseId(xpp)); 12882 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 12883 res.setVersionElement(parseString(xpp)); 12884 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12885 return false; 12886 return true; 12887 } 12888 12889 protected ImplementationGuide.ImplementationGuideGlobalComponent parseImplementationGuideImplementationGuideGlobalComponent( 12890 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 12891 ImplementationGuide.ImplementationGuideGlobalComponent res = new ImplementationGuide.ImplementationGuideGlobalComponent(); 12892 parseBackboneAttributes(xpp, res); 12893 next(xpp); 12894 int eventType = nextNoWhitespace(xpp); 12895 while (eventType != XmlPullParser.END_TAG) { 12896 if (!parseImplementationGuideImplementationGuideGlobalComponentContent(eventType, xpp, owner, res)) 12897 unknownContent(xpp); 12898 eventType = nextNoWhitespace(xpp); 12899 } 12900 next(xpp); 12901 parseElementClose(res); 12902 return res; 12903 } 12904 12905 protected boolean parseImplementationGuideImplementationGuideGlobalComponentContent(int eventType, XmlPullParser xpp, 12906 ImplementationGuide owner, ImplementationGuide.ImplementationGuideGlobalComponent res) 12907 throws XmlPullParserException, IOException, FHIRFormatError { 12908 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 12909 res.setTypeElement(parseCode(xpp)); 12910 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 12911 res.setProfileElement(parseCanonical(xpp)); 12912 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12913 return false; 12914 return true; 12915 } 12916 12917 protected ImplementationGuide.ImplementationGuideDefinitionComponent parseImplementationGuideImplementationGuideDefinitionComponent( 12918 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 12919 ImplementationGuide.ImplementationGuideDefinitionComponent res = new ImplementationGuide.ImplementationGuideDefinitionComponent(); 12920 parseBackboneAttributes(xpp, res); 12921 next(xpp); 12922 int eventType = nextNoWhitespace(xpp); 12923 while (eventType != XmlPullParser.END_TAG) { 12924 if (!parseImplementationGuideImplementationGuideDefinitionComponentContent(eventType, xpp, owner, res)) 12925 unknownContent(xpp); 12926 eventType = nextNoWhitespace(xpp); 12927 } 12928 next(xpp); 12929 parseElementClose(res); 12930 return res; 12931 } 12932 12933 protected boolean parseImplementationGuideImplementationGuideDefinitionComponentContent(int eventType, 12934 XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDefinitionComponent res) 12935 throws XmlPullParserException, IOException, FHIRFormatError { 12936 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("grouping")) { 12937 res.getGrouping().add(parseImplementationGuideImplementationGuideDefinitionGroupingComponent(xpp, owner)); 12938 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 12939 res.getResource().add(parseImplementationGuideImplementationGuideDefinitionResourceComponent(xpp, owner)); 12940 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { 12941 res.setPage(parseImplementationGuideImplementationGuideDefinitionPageComponent(xpp, owner)); 12942 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 12943 res.getParameter().add(parseImplementationGuideImplementationGuideDefinitionParameterComponent(xpp, owner)); 12944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("template")) { 12945 res.getTemplate().add(parseImplementationGuideImplementationGuideDefinitionTemplateComponent(xpp, owner)); 12946 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12947 return false; 12948 return true; 12949 } 12950 12951 protected ImplementationGuide.ImplementationGuideDefinitionGroupingComponent parseImplementationGuideImplementationGuideDefinitionGroupingComponent( 12952 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 12953 ImplementationGuide.ImplementationGuideDefinitionGroupingComponent res = new ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); 12954 parseBackboneAttributes(xpp, res); 12955 next(xpp); 12956 int eventType = nextNoWhitespace(xpp); 12957 while (eventType != XmlPullParser.END_TAG) { 12958 if (!parseImplementationGuideImplementationGuideDefinitionGroupingComponentContent(eventType, xpp, owner, res)) 12959 unknownContent(xpp); 12960 eventType = nextNoWhitespace(xpp); 12961 } 12962 next(xpp); 12963 parseElementClose(res); 12964 return res; 12965 } 12966 12967 protected boolean parseImplementationGuideImplementationGuideDefinitionGroupingComponentContent(int eventType, 12968 XmlPullParser xpp, ImplementationGuide owner, 12969 ImplementationGuide.ImplementationGuideDefinitionGroupingComponent res) 12970 throws XmlPullParserException, IOException, FHIRFormatError { 12971 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 12972 res.setNameElement(parseString(xpp)); 12973 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 12974 res.setDescriptionElement(parseString(xpp)); 12975 } else if (!parseBackboneElementContent(eventType, xpp, res)) 12976 return false; 12977 return true; 12978 } 12979 12980 protected ImplementationGuide.ImplementationGuideDefinitionResourceComponent parseImplementationGuideImplementationGuideDefinitionResourceComponent( 12981 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 12982 ImplementationGuide.ImplementationGuideDefinitionResourceComponent res = new ImplementationGuide.ImplementationGuideDefinitionResourceComponent(); 12983 parseBackboneAttributes(xpp, res); 12984 next(xpp); 12985 int eventType = nextNoWhitespace(xpp); 12986 while (eventType != XmlPullParser.END_TAG) { 12987 if (!parseImplementationGuideImplementationGuideDefinitionResourceComponentContent(eventType, xpp, owner, res)) 12988 unknownContent(xpp); 12989 eventType = nextNoWhitespace(xpp); 12990 } 12991 next(xpp); 12992 parseElementClose(res); 12993 return res; 12994 } 12995 12996 protected boolean parseImplementationGuideImplementationGuideDefinitionResourceComponentContent(int eventType, 12997 XmlPullParser xpp, ImplementationGuide owner, 12998 ImplementationGuide.ImplementationGuideDefinitionResourceComponent res) 12999 throws XmlPullParserException, IOException, FHIRFormatError { 13000 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 13001 res.setReference(parseReference(xpp)); 13002 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { 13003 res.getFhirVersion() 13004 .add(parseEnumeration(xpp, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory())); 13005 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13006 res.setNameElement(parseString(xpp)); 13007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 13008 res.setDescriptionElement(parseString(xpp)); 13009 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "example")) { 13010 res.setExample(parseType("example", xpp)); 13011 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingId")) { 13012 res.setGroupingIdElement(parseId(xpp)); 13013 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13014 return false; 13015 return true; 13016 } 13017 13018 protected ImplementationGuide.ImplementationGuideDefinitionPageComponent parseImplementationGuideImplementationGuideDefinitionPageComponent( 13019 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13020 ImplementationGuide.ImplementationGuideDefinitionPageComponent res = new ImplementationGuide.ImplementationGuideDefinitionPageComponent(); 13021 parseBackboneAttributes(xpp, res); 13022 next(xpp); 13023 int eventType = nextNoWhitespace(xpp); 13024 while (eventType != XmlPullParser.END_TAG) { 13025 if (!parseImplementationGuideImplementationGuideDefinitionPageComponentContent(eventType, xpp, owner, res)) 13026 unknownContent(xpp); 13027 eventType = nextNoWhitespace(xpp); 13028 } 13029 next(xpp); 13030 parseElementClose(res); 13031 return res; 13032 } 13033 13034 protected boolean parseImplementationGuideImplementationGuideDefinitionPageComponentContent(int eventType, 13035 XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideDefinitionPageComponent res) 13036 throws XmlPullParserException, IOException, FHIRFormatError { 13037 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "name")) { 13038 res.setName(parseType("name", xpp)); 13039 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 13040 res.setTitleElement(parseString(xpp)); 13041 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("generation")) { 13042 res.setGenerationElement(parseEnumeration(xpp, ImplementationGuide.GuidePageGeneration.NULL, 13043 new ImplementationGuide.GuidePageGenerationEnumFactory())); 13044 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { 13045 res.getPage().add(parseImplementationGuideImplementationGuideDefinitionPageComponent(xpp, owner)); 13046 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13047 return false; 13048 return true; 13049 } 13050 13051 protected ImplementationGuide.ImplementationGuideDefinitionParameterComponent parseImplementationGuideImplementationGuideDefinitionParameterComponent( 13052 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13053 ImplementationGuide.ImplementationGuideDefinitionParameterComponent res = new ImplementationGuide.ImplementationGuideDefinitionParameterComponent(); 13054 parseBackboneAttributes(xpp, res); 13055 next(xpp); 13056 int eventType = nextNoWhitespace(xpp); 13057 while (eventType != XmlPullParser.END_TAG) { 13058 if (!parseImplementationGuideImplementationGuideDefinitionParameterComponentContent(eventType, xpp, owner, res)) 13059 unknownContent(xpp); 13060 eventType = nextNoWhitespace(xpp); 13061 } 13062 next(xpp); 13063 parseElementClose(res); 13064 return res; 13065 } 13066 13067 protected boolean parseImplementationGuideImplementationGuideDefinitionParameterComponentContent(int eventType, 13068 XmlPullParser xpp, ImplementationGuide owner, 13069 ImplementationGuide.ImplementationGuideDefinitionParameterComponent res) 13070 throws XmlPullParserException, IOException, FHIRFormatError { 13071 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 13072 res.setCodeElement(parseString(xpp)); 13073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 13074 res.setValueElement(parseString(xpp)); 13075 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13076 return false; 13077 return true; 13078 } 13079 13080 protected ImplementationGuide.ImplementationGuideDefinitionTemplateComponent parseImplementationGuideImplementationGuideDefinitionTemplateComponent( 13081 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13082 ImplementationGuide.ImplementationGuideDefinitionTemplateComponent res = new ImplementationGuide.ImplementationGuideDefinitionTemplateComponent(); 13083 parseBackboneAttributes(xpp, res); 13084 next(xpp); 13085 int eventType = nextNoWhitespace(xpp); 13086 while (eventType != XmlPullParser.END_TAG) { 13087 if (!parseImplementationGuideImplementationGuideDefinitionTemplateComponentContent(eventType, xpp, owner, res)) 13088 unknownContent(xpp); 13089 eventType = nextNoWhitespace(xpp); 13090 } 13091 next(xpp); 13092 parseElementClose(res); 13093 return res; 13094 } 13095 13096 protected boolean parseImplementationGuideImplementationGuideDefinitionTemplateComponentContent(int eventType, 13097 XmlPullParser xpp, ImplementationGuide owner, 13098 ImplementationGuide.ImplementationGuideDefinitionTemplateComponent res) 13099 throws XmlPullParserException, IOException, FHIRFormatError { 13100 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 13101 res.setCodeElement(parseCode(xpp)); 13102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 13103 res.setSourceElement(parseString(xpp)); 13104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scope")) { 13105 res.setScopeElement(parseString(xpp)); 13106 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13107 return false; 13108 return true; 13109 } 13110 13111 protected ImplementationGuide.ImplementationGuideManifestComponent parseImplementationGuideImplementationGuideManifestComponent( 13112 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13113 ImplementationGuide.ImplementationGuideManifestComponent res = new ImplementationGuide.ImplementationGuideManifestComponent(); 13114 parseBackboneAttributes(xpp, res); 13115 next(xpp); 13116 int eventType = nextNoWhitespace(xpp); 13117 while (eventType != XmlPullParser.END_TAG) { 13118 if (!parseImplementationGuideImplementationGuideManifestComponentContent(eventType, xpp, owner, res)) 13119 unknownContent(xpp); 13120 eventType = nextNoWhitespace(xpp); 13121 } 13122 next(xpp); 13123 parseElementClose(res); 13124 return res; 13125 } 13126 13127 protected boolean parseImplementationGuideImplementationGuideManifestComponentContent(int eventType, 13128 XmlPullParser xpp, ImplementationGuide owner, ImplementationGuide.ImplementationGuideManifestComponent res) 13129 throws XmlPullParserException, IOException, FHIRFormatError { 13130 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rendering")) { 13131 res.setRenderingElement(parseUrl(xpp)); 13132 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 13133 res.getResource().add(parseImplementationGuideManifestResourceComponent(xpp, owner)); 13134 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("page")) { 13135 res.getPage().add(parseImplementationGuideManifestPageComponent(xpp, owner)); 13136 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("image")) { 13137 res.getImage().add(parseString(xpp)); 13138 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("other")) { 13139 res.getOther().add(parseString(xpp)); 13140 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13141 return false; 13142 return true; 13143 } 13144 13145 protected ImplementationGuide.ManifestResourceComponent parseImplementationGuideManifestResourceComponent( 13146 XmlPullParser xpp, ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13147 ImplementationGuide.ManifestResourceComponent res = new ImplementationGuide.ManifestResourceComponent(); 13148 parseBackboneAttributes(xpp, res); 13149 next(xpp); 13150 int eventType = nextNoWhitespace(xpp); 13151 while (eventType != XmlPullParser.END_TAG) { 13152 if (!parseImplementationGuideManifestResourceComponentContent(eventType, xpp, owner, res)) 13153 unknownContent(xpp); 13154 eventType = nextNoWhitespace(xpp); 13155 } 13156 next(xpp); 13157 parseElementClose(res); 13158 return res; 13159 } 13160 13161 protected boolean parseImplementationGuideManifestResourceComponentContent(int eventType, XmlPullParser xpp, 13162 ImplementationGuide owner, ImplementationGuide.ManifestResourceComponent res) 13163 throws XmlPullParserException, IOException, FHIRFormatError { 13164 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 13165 res.setReference(parseReference(xpp)); 13166 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "example")) { 13167 res.setExample(parseType("example", xpp)); 13168 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relativePath")) { 13169 res.setRelativePathElement(parseUrl(xpp)); 13170 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13171 return false; 13172 return true; 13173 } 13174 13175 protected ImplementationGuide.ManifestPageComponent parseImplementationGuideManifestPageComponent(XmlPullParser xpp, 13176 ImplementationGuide owner) throws XmlPullParserException, IOException, FHIRFormatError { 13177 ImplementationGuide.ManifestPageComponent res = new ImplementationGuide.ManifestPageComponent(); 13178 parseBackboneAttributes(xpp, res); 13179 next(xpp); 13180 int eventType = nextNoWhitespace(xpp); 13181 while (eventType != XmlPullParser.END_TAG) { 13182 if (!parseImplementationGuideManifestPageComponentContent(eventType, xpp, owner, res)) 13183 unknownContent(xpp); 13184 eventType = nextNoWhitespace(xpp); 13185 } 13186 next(xpp); 13187 parseElementClose(res); 13188 return res; 13189 } 13190 13191 protected boolean parseImplementationGuideManifestPageComponentContent(int eventType, XmlPullParser xpp, 13192 ImplementationGuide owner, ImplementationGuide.ManifestPageComponent res) 13193 throws XmlPullParserException, IOException, FHIRFormatError { 13194 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13195 res.setNameElement(parseString(xpp)); 13196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 13197 res.setTitleElement(parseString(xpp)); 13198 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("anchor")) { 13199 res.getAnchor().add(parseString(xpp)); 13200 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13201 return false; 13202 return true; 13203 } 13204 13205 protected InsurancePlan parseInsurancePlan(XmlPullParser xpp) 13206 throws XmlPullParserException, IOException, FHIRFormatError { 13207 InsurancePlan res = new InsurancePlan(); 13208 parseDomainResourceAttributes(xpp, res); 13209 next(xpp); 13210 int eventType = nextNoWhitespace(xpp); 13211 while (eventType != XmlPullParser.END_TAG) { 13212 if (!parseInsurancePlanContent(eventType, xpp, res)) 13213 unknownContent(xpp); 13214 eventType = nextNoWhitespace(xpp); 13215 } 13216 next(xpp); 13217 parseElementClose(res); 13218 return res; 13219 } 13220 13221 protected boolean parseInsurancePlanContent(int eventType, XmlPullParser xpp, InsurancePlan res) 13222 throws XmlPullParserException, IOException, FHIRFormatError { 13223 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13224 res.getIdentifier().add(parseIdentifier(xpp)); 13225 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 13226 res.setStatusElement( 13227 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 13228 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13229 res.getType().add(parseCodeableConcept(xpp)); 13230 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13231 res.setNameElement(parseString(xpp)); 13232 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 13233 res.getAlias().add(parseString(xpp)); 13234 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 13235 res.setPeriod(parsePeriod(xpp)); 13236 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ownedBy")) { 13237 res.setOwnedBy(parseReference(xpp)); 13238 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administeredBy")) { 13239 res.setAdministeredBy(parseReference(xpp)); 13240 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverageArea")) { 13241 res.getCoverageArea().add(parseReference(xpp)); 13242 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 13243 res.getContact().add(parseInsurancePlanInsurancePlanContactComponent(xpp, res)); 13244 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 13245 res.getEndpoint().add(parseReference(xpp)); 13246 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 13247 res.getNetwork().add(parseReference(xpp)); 13248 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverage")) { 13249 res.getCoverage().add(parseInsurancePlanInsurancePlanCoverageComponent(xpp, res)); 13250 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("plan")) { 13251 res.getPlan().add(parseInsurancePlanInsurancePlanPlanComponent(xpp, res)); 13252 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13253 return false; 13254 return true; 13255 } 13256 13257 protected InsurancePlan.InsurancePlanContactComponent parseInsurancePlanInsurancePlanContactComponent( 13258 XmlPullParser xpp, InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13259 InsurancePlan.InsurancePlanContactComponent res = new InsurancePlan.InsurancePlanContactComponent(); 13260 parseBackboneAttributes(xpp, res); 13261 next(xpp); 13262 int eventType = nextNoWhitespace(xpp); 13263 while (eventType != XmlPullParser.END_TAG) { 13264 if (!parseInsurancePlanInsurancePlanContactComponentContent(eventType, xpp, owner, res)) 13265 unknownContent(xpp); 13266 eventType = nextNoWhitespace(xpp); 13267 } 13268 next(xpp); 13269 parseElementClose(res); 13270 return res; 13271 } 13272 13273 protected boolean parseInsurancePlanInsurancePlanContactComponentContent(int eventType, XmlPullParser xpp, 13274 InsurancePlan owner, InsurancePlan.InsurancePlanContactComponent res) 13275 throws XmlPullParserException, IOException, FHIRFormatError { 13276 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 13277 res.setPurpose(parseCodeableConcept(xpp)); 13278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13279 res.setName(parseHumanName(xpp)); 13280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 13281 res.getTelecom().add(parseContactPoint(xpp)); 13282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 13283 res.setAddress(parseAddress(xpp)); 13284 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13285 return false; 13286 return true; 13287 } 13288 13289 protected InsurancePlan.InsurancePlanCoverageComponent parseInsurancePlanInsurancePlanCoverageComponent( 13290 XmlPullParser xpp, InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13291 InsurancePlan.InsurancePlanCoverageComponent res = new InsurancePlan.InsurancePlanCoverageComponent(); 13292 parseBackboneAttributes(xpp, res); 13293 next(xpp); 13294 int eventType = nextNoWhitespace(xpp); 13295 while (eventType != XmlPullParser.END_TAG) { 13296 if (!parseInsurancePlanInsurancePlanCoverageComponentContent(eventType, xpp, owner, res)) 13297 unknownContent(xpp); 13298 eventType = nextNoWhitespace(xpp); 13299 } 13300 next(xpp); 13301 parseElementClose(res); 13302 return res; 13303 } 13304 13305 protected boolean parseInsurancePlanInsurancePlanCoverageComponentContent(int eventType, XmlPullParser xpp, 13306 InsurancePlan owner, InsurancePlan.InsurancePlanCoverageComponent res) 13307 throws XmlPullParserException, IOException, FHIRFormatError { 13308 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13309 res.setType(parseCodeableConcept(xpp)); 13310 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 13311 res.getNetwork().add(parseReference(xpp)); 13312 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefit")) { 13313 res.getBenefit().add(parseInsurancePlanCoverageBenefitComponent(xpp, owner)); 13314 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13315 return false; 13316 return true; 13317 } 13318 13319 protected InsurancePlan.CoverageBenefitComponent parseInsurancePlanCoverageBenefitComponent(XmlPullParser xpp, 13320 InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13321 InsurancePlan.CoverageBenefitComponent res = new InsurancePlan.CoverageBenefitComponent(); 13322 parseBackboneAttributes(xpp, res); 13323 next(xpp); 13324 int eventType = nextNoWhitespace(xpp); 13325 while (eventType != XmlPullParser.END_TAG) { 13326 if (!parseInsurancePlanCoverageBenefitComponentContent(eventType, xpp, owner, res)) 13327 unknownContent(xpp); 13328 eventType = nextNoWhitespace(xpp); 13329 } 13330 next(xpp); 13331 parseElementClose(res); 13332 return res; 13333 } 13334 13335 protected boolean parseInsurancePlanCoverageBenefitComponentContent(int eventType, XmlPullParser xpp, 13336 InsurancePlan owner, InsurancePlan.CoverageBenefitComponent res) 13337 throws XmlPullParserException, IOException, FHIRFormatError { 13338 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13339 res.setType(parseCodeableConcept(xpp)); 13340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirement")) { 13341 res.setRequirementElement(parseString(xpp)); 13342 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("limit")) { 13343 res.getLimit().add(parseInsurancePlanCoverageBenefitLimitComponent(xpp, owner)); 13344 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13345 return false; 13346 return true; 13347 } 13348 13349 protected InsurancePlan.CoverageBenefitLimitComponent parseInsurancePlanCoverageBenefitLimitComponent( 13350 XmlPullParser xpp, InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13351 InsurancePlan.CoverageBenefitLimitComponent res = new InsurancePlan.CoverageBenefitLimitComponent(); 13352 parseBackboneAttributes(xpp, res); 13353 next(xpp); 13354 int eventType = nextNoWhitespace(xpp); 13355 while (eventType != XmlPullParser.END_TAG) { 13356 if (!parseInsurancePlanCoverageBenefitLimitComponentContent(eventType, xpp, owner, res)) 13357 unknownContent(xpp); 13358 eventType = nextNoWhitespace(xpp); 13359 } 13360 next(xpp); 13361 parseElementClose(res); 13362 return res; 13363 } 13364 13365 protected boolean parseInsurancePlanCoverageBenefitLimitComponentContent(int eventType, XmlPullParser xpp, 13366 InsurancePlan owner, InsurancePlan.CoverageBenefitLimitComponent res) 13367 throws XmlPullParserException, IOException, FHIRFormatError { 13368 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 13369 res.setValue(parseQuantity(xpp)); 13370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 13371 res.setCode(parseCodeableConcept(xpp)); 13372 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13373 return false; 13374 return true; 13375 } 13376 13377 protected InsurancePlan.InsurancePlanPlanComponent parseInsurancePlanInsurancePlanPlanComponent(XmlPullParser xpp, 13378 InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13379 InsurancePlan.InsurancePlanPlanComponent res = new InsurancePlan.InsurancePlanPlanComponent(); 13380 parseBackboneAttributes(xpp, res); 13381 next(xpp); 13382 int eventType = nextNoWhitespace(xpp); 13383 while (eventType != XmlPullParser.END_TAG) { 13384 if (!parseInsurancePlanInsurancePlanPlanComponentContent(eventType, xpp, owner, res)) 13385 unknownContent(xpp); 13386 eventType = nextNoWhitespace(xpp); 13387 } 13388 next(xpp); 13389 parseElementClose(res); 13390 return res; 13391 } 13392 13393 protected boolean parseInsurancePlanInsurancePlanPlanComponentContent(int eventType, XmlPullParser xpp, 13394 InsurancePlan owner, InsurancePlan.InsurancePlanPlanComponent res) 13395 throws XmlPullParserException, IOException, FHIRFormatError { 13396 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13397 res.getIdentifier().add(parseIdentifier(xpp)); 13398 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13399 res.setType(parseCodeableConcept(xpp)); 13400 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coverageArea")) { 13401 res.getCoverageArea().add(parseReference(xpp)); 13402 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 13403 res.getNetwork().add(parseReference(xpp)); 13404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("generalCost")) { 13405 res.getGeneralCost().add(parseInsurancePlanInsurancePlanPlanGeneralCostComponent(xpp, owner)); 13406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specificCost")) { 13407 res.getSpecificCost().add(parseInsurancePlanInsurancePlanPlanSpecificCostComponent(xpp, owner)); 13408 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13409 return false; 13410 return true; 13411 } 13412 13413 protected InsurancePlan.InsurancePlanPlanGeneralCostComponent parseInsurancePlanInsurancePlanPlanGeneralCostComponent( 13414 XmlPullParser xpp, InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13415 InsurancePlan.InsurancePlanPlanGeneralCostComponent res = new InsurancePlan.InsurancePlanPlanGeneralCostComponent(); 13416 parseBackboneAttributes(xpp, res); 13417 next(xpp); 13418 int eventType = nextNoWhitespace(xpp); 13419 while (eventType != XmlPullParser.END_TAG) { 13420 if (!parseInsurancePlanInsurancePlanPlanGeneralCostComponentContent(eventType, xpp, owner, res)) 13421 unknownContent(xpp); 13422 eventType = nextNoWhitespace(xpp); 13423 } 13424 next(xpp); 13425 parseElementClose(res); 13426 return res; 13427 } 13428 13429 protected boolean parseInsurancePlanInsurancePlanPlanGeneralCostComponentContent(int eventType, XmlPullParser xpp, 13430 InsurancePlan owner, InsurancePlan.InsurancePlanPlanGeneralCostComponent res) 13431 throws XmlPullParserException, IOException, FHIRFormatError { 13432 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13433 res.setType(parseCodeableConcept(xpp)); 13434 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupSize")) { 13435 res.setGroupSizeElement(parsePositiveInt(xpp)); 13436 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cost")) { 13437 res.setCost(parseMoney(xpp)); 13438 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 13439 res.setCommentElement(parseString(xpp)); 13440 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13441 return false; 13442 return true; 13443 } 13444 13445 protected InsurancePlan.InsurancePlanPlanSpecificCostComponent parseInsurancePlanInsurancePlanPlanSpecificCostComponent( 13446 XmlPullParser xpp, InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13447 InsurancePlan.InsurancePlanPlanSpecificCostComponent res = new InsurancePlan.InsurancePlanPlanSpecificCostComponent(); 13448 parseBackboneAttributes(xpp, res); 13449 next(xpp); 13450 int eventType = nextNoWhitespace(xpp); 13451 while (eventType != XmlPullParser.END_TAG) { 13452 if (!parseInsurancePlanInsurancePlanPlanSpecificCostComponentContent(eventType, xpp, owner, res)) 13453 unknownContent(xpp); 13454 eventType = nextNoWhitespace(xpp); 13455 } 13456 next(xpp); 13457 parseElementClose(res); 13458 return res; 13459 } 13460 13461 protected boolean parseInsurancePlanInsurancePlanPlanSpecificCostComponentContent(int eventType, XmlPullParser xpp, 13462 InsurancePlan owner, InsurancePlan.InsurancePlanPlanSpecificCostComponent res) 13463 throws XmlPullParserException, IOException, FHIRFormatError { 13464 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 13465 res.setCategory(parseCodeableConcept(xpp)); 13466 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("benefit")) { 13467 res.getBenefit().add(parseInsurancePlanPlanBenefitComponent(xpp, owner)); 13468 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13469 return false; 13470 return true; 13471 } 13472 13473 protected InsurancePlan.PlanBenefitComponent parseInsurancePlanPlanBenefitComponent(XmlPullParser xpp, 13474 InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13475 InsurancePlan.PlanBenefitComponent res = new InsurancePlan.PlanBenefitComponent(); 13476 parseBackboneAttributes(xpp, res); 13477 next(xpp); 13478 int eventType = nextNoWhitespace(xpp); 13479 while (eventType != XmlPullParser.END_TAG) { 13480 if (!parseInsurancePlanPlanBenefitComponentContent(eventType, xpp, owner, res)) 13481 unknownContent(xpp); 13482 eventType = nextNoWhitespace(xpp); 13483 } 13484 next(xpp); 13485 parseElementClose(res); 13486 return res; 13487 } 13488 13489 protected boolean parseInsurancePlanPlanBenefitComponentContent(int eventType, XmlPullParser xpp, InsurancePlan owner, 13490 InsurancePlan.PlanBenefitComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13491 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13492 res.setType(parseCodeableConcept(xpp)); 13493 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cost")) { 13494 res.getCost().add(parseInsurancePlanPlanBenefitCostComponent(xpp, owner)); 13495 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13496 return false; 13497 return true; 13498 } 13499 13500 protected InsurancePlan.PlanBenefitCostComponent parseInsurancePlanPlanBenefitCostComponent(XmlPullParser xpp, 13501 InsurancePlan owner) throws XmlPullParserException, IOException, FHIRFormatError { 13502 InsurancePlan.PlanBenefitCostComponent res = new InsurancePlan.PlanBenefitCostComponent(); 13503 parseBackboneAttributes(xpp, res); 13504 next(xpp); 13505 int eventType = nextNoWhitespace(xpp); 13506 while (eventType != XmlPullParser.END_TAG) { 13507 if (!parseInsurancePlanPlanBenefitCostComponentContent(eventType, xpp, owner, res)) 13508 unknownContent(xpp); 13509 eventType = nextNoWhitespace(xpp); 13510 } 13511 next(xpp); 13512 parseElementClose(res); 13513 return res; 13514 } 13515 13516 protected boolean parseInsurancePlanPlanBenefitCostComponentContent(int eventType, XmlPullParser xpp, 13517 InsurancePlan owner, InsurancePlan.PlanBenefitCostComponent res) 13518 throws XmlPullParserException, IOException, FHIRFormatError { 13519 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13520 res.setType(parseCodeableConcept(xpp)); 13521 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("applicability")) { 13522 res.setApplicability(parseCodeableConcept(xpp)); 13523 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualifiers")) { 13524 res.getQualifiers().add(parseCodeableConcept(xpp)); 13525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 13526 res.setValue(parseQuantity(xpp)); 13527 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13528 return false; 13529 return true; 13530 } 13531 13532 protected Invoice parseInvoice(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 13533 Invoice res = new Invoice(); 13534 parseDomainResourceAttributes(xpp, res); 13535 next(xpp); 13536 int eventType = nextNoWhitespace(xpp); 13537 while (eventType != XmlPullParser.END_TAG) { 13538 if (!parseInvoiceContent(eventType, xpp, res)) 13539 unknownContent(xpp); 13540 eventType = nextNoWhitespace(xpp); 13541 } 13542 next(xpp); 13543 parseElementClose(res); 13544 return res; 13545 } 13546 13547 protected boolean parseInvoiceContent(int eventType, XmlPullParser xpp, Invoice res) 13548 throws XmlPullParserException, IOException, FHIRFormatError { 13549 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13550 res.getIdentifier().add(parseIdentifier(xpp)); 13551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 13552 res.setStatusElement(parseEnumeration(xpp, Invoice.InvoiceStatus.NULL, new Invoice.InvoiceStatusEnumFactory())); 13553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cancelledReason")) { 13554 res.setCancelledReasonElement(parseString(xpp)); 13555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13556 res.setType(parseCodeableConcept(xpp)); 13557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 13558 res.setSubject(parseReference(xpp)); 13559 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 13560 res.setRecipient(parseReference(xpp)); 13561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 13562 res.setDateElement(parseDateTime(xpp)); 13563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 13564 res.getParticipant().add(parseInvoiceInvoiceParticipantComponent(xpp, res)); 13565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { 13566 res.setIssuer(parseReference(xpp)); 13567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("account")) { 13568 res.setAccount(parseReference(xpp)); 13569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lineItem")) { 13570 res.getLineItem().add(parseInvoiceInvoiceLineItemComponent(xpp, res)); 13571 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalPriceComponent")) { 13572 res.getTotalPriceComponent().add(parseInvoiceInvoiceLineItemPriceComponentComponent(xpp, res)); 13573 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalNet")) { 13574 res.setTotalNet(parseMoney(xpp)); 13575 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("totalGross")) { 13576 res.setTotalGross(parseMoney(xpp)); 13577 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentTerms")) { 13578 res.setPaymentTermsElement(parseMarkdown(xpp)); 13579 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 13580 res.getNote().add(parseAnnotation(xpp)); 13581 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13582 return false; 13583 return true; 13584 } 13585 13586 protected Invoice.InvoiceParticipantComponent parseInvoiceInvoiceParticipantComponent(XmlPullParser xpp, 13587 Invoice owner) throws XmlPullParserException, IOException, FHIRFormatError { 13588 Invoice.InvoiceParticipantComponent res = new Invoice.InvoiceParticipantComponent(); 13589 parseBackboneAttributes(xpp, res); 13590 next(xpp); 13591 int eventType = nextNoWhitespace(xpp); 13592 while (eventType != XmlPullParser.END_TAG) { 13593 if (!parseInvoiceInvoiceParticipantComponentContent(eventType, xpp, owner, res)) 13594 unknownContent(xpp); 13595 eventType = nextNoWhitespace(xpp); 13596 } 13597 next(xpp); 13598 parseElementClose(res); 13599 return res; 13600 } 13601 13602 protected boolean parseInvoiceInvoiceParticipantComponentContent(int eventType, XmlPullParser xpp, Invoice owner, 13603 Invoice.InvoiceParticipantComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13604 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 13605 res.setRole(parseCodeableConcept(xpp)); 13606 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 13607 res.setActor(parseReference(xpp)); 13608 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13609 return false; 13610 return true; 13611 } 13612 13613 protected Invoice.InvoiceLineItemComponent parseInvoiceInvoiceLineItemComponent(XmlPullParser xpp, Invoice owner) 13614 throws XmlPullParserException, IOException, FHIRFormatError { 13615 Invoice.InvoiceLineItemComponent res = new Invoice.InvoiceLineItemComponent(); 13616 parseBackboneAttributes(xpp, res); 13617 next(xpp); 13618 int eventType = nextNoWhitespace(xpp); 13619 while (eventType != XmlPullParser.END_TAG) { 13620 if (!parseInvoiceInvoiceLineItemComponentContent(eventType, xpp, owner, res)) 13621 unknownContent(xpp); 13622 eventType = nextNoWhitespace(xpp); 13623 } 13624 next(xpp); 13625 parseElementClose(res); 13626 return res; 13627 } 13628 13629 protected boolean parseInvoiceInvoiceLineItemComponentContent(int eventType, XmlPullParser xpp, Invoice owner, 13630 Invoice.InvoiceLineItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13631 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 13632 res.setSequenceElement(parsePositiveInt(xpp)); 13633 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "chargeItem")) { 13634 res.setChargeItem(parseType("chargeItem", xpp)); 13635 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priceComponent")) { 13636 res.getPriceComponent().add(parseInvoiceInvoiceLineItemPriceComponentComponent(xpp, owner)); 13637 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13638 return false; 13639 return true; 13640 } 13641 13642 protected Invoice.InvoiceLineItemPriceComponentComponent parseInvoiceInvoiceLineItemPriceComponentComponent( 13643 XmlPullParser xpp, Invoice owner) throws XmlPullParserException, IOException, FHIRFormatError { 13644 Invoice.InvoiceLineItemPriceComponentComponent res = new Invoice.InvoiceLineItemPriceComponentComponent(); 13645 parseBackboneAttributes(xpp, res); 13646 next(xpp); 13647 int eventType = nextNoWhitespace(xpp); 13648 while (eventType != XmlPullParser.END_TAG) { 13649 if (!parseInvoiceInvoiceLineItemPriceComponentComponentContent(eventType, xpp, owner, res)) 13650 unknownContent(xpp); 13651 eventType = nextNoWhitespace(xpp); 13652 } 13653 next(xpp); 13654 parseElementClose(res); 13655 return res; 13656 } 13657 13658 protected boolean parseInvoiceInvoiceLineItemPriceComponentComponentContent(int eventType, XmlPullParser xpp, 13659 Invoice owner, Invoice.InvoiceLineItemPriceComponentComponent res) 13660 throws XmlPullParserException, IOException, FHIRFormatError { 13661 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13662 res.setTypeElement(parseEnumeration(xpp, Invoice.InvoicePriceComponentType.NULL, 13663 new Invoice.InvoicePriceComponentTypeEnumFactory())); 13664 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 13665 res.setCode(parseCodeableConcept(xpp)); 13666 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("factor")) { 13667 res.setFactorElement(parseDecimal(xpp)); 13668 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 13669 res.setAmount(parseMoney(xpp)); 13670 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13671 return false; 13672 return true; 13673 } 13674 13675 protected Library parseLibrary(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 13676 Library res = new Library(); 13677 parseDomainResourceAttributes(xpp, res); 13678 next(xpp); 13679 int eventType = nextNoWhitespace(xpp); 13680 while (eventType != XmlPullParser.END_TAG) { 13681 if (!parseLibraryContent(eventType, xpp, res)) 13682 unknownContent(xpp); 13683 eventType = nextNoWhitespace(xpp); 13684 } 13685 next(xpp); 13686 parseElementClose(res); 13687 return res; 13688 } 13689 13690 protected boolean parseLibraryContent(int eventType, XmlPullParser xpp, Library res) 13691 throws XmlPullParserException, IOException, FHIRFormatError { 13692 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 13693 res.setUrlElement(parseUri(xpp)); 13694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13695 res.getIdentifier().add(parseIdentifier(xpp)); 13696 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 13697 res.setVersionElement(parseString(xpp)); 13698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13699 res.setNameElement(parseString(xpp)); 13700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 13701 res.setTitleElement(parseString(xpp)); 13702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 13703 res.setSubtitleElement(parseString(xpp)); 13704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 13705 res.setStatusElement( 13706 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 13707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 13708 res.setExperimentalElement(parseBoolean(xpp)); 13709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13710 res.setType(parseCodeableConcept(xpp)); 13711 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 13712 res.setSubject(parseType("subject", xpp)); 13713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 13714 res.setDateElement(parseDateTime(xpp)); 13715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 13716 res.setPublisherElement(parseString(xpp)); 13717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 13718 res.getContact().add(parseContactDetail(xpp)); 13719 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 13720 res.setDescriptionElement(parseMarkdown(xpp)); 13721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 13722 res.getUseContext().add(parseUsageContext(xpp)); 13723 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 13724 res.getJurisdiction().add(parseCodeableConcept(xpp)); 13725 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 13726 res.setPurposeElement(parseMarkdown(xpp)); 13727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 13728 res.setUsageElement(parseString(xpp)); 13729 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 13730 res.setCopyrightElement(parseMarkdown(xpp)); 13731 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 13732 res.setApprovalDateElement(parseDate(xpp)); 13733 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 13734 res.setLastReviewDateElement(parseDate(xpp)); 13735 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 13736 res.setEffectivePeriod(parsePeriod(xpp)); 13737 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 13738 res.getTopic().add(parseCodeableConcept(xpp)); 13739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 13740 res.getAuthor().add(parseContactDetail(xpp)); 13741 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 13742 res.getEditor().add(parseContactDetail(xpp)); 13743 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 13744 res.getReviewer().add(parseContactDetail(xpp)); 13745 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 13746 res.getEndorser().add(parseContactDetail(xpp)); 13747 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 13748 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 13749 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 13750 res.getParameter().add(parseParameterDefinition(xpp)); 13751 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataRequirement")) { 13752 res.getDataRequirement().add(parseDataRequirement(xpp)); 13753 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { 13754 res.getContent().add(parseAttachment(xpp)); 13755 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13756 return false; 13757 return true; 13758 } 13759 13760 protected Linkage parseLinkage(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 13761 Linkage res = new Linkage(); 13762 parseDomainResourceAttributes(xpp, res); 13763 next(xpp); 13764 int eventType = nextNoWhitespace(xpp); 13765 while (eventType != XmlPullParser.END_TAG) { 13766 if (!parseLinkageContent(eventType, xpp, res)) 13767 unknownContent(xpp); 13768 eventType = nextNoWhitespace(xpp); 13769 } 13770 next(xpp); 13771 parseElementClose(res); 13772 return res; 13773 } 13774 13775 protected boolean parseLinkageContent(int eventType, XmlPullParser xpp, Linkage res) 13776 throws XmlPullParserException, IOException, FHIRFormatError { 13777 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 13778 res.setActiveElement(parseBoolean(xpp)); 13779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 13780 res.setAuthor(parseReference(xpp)); 13781 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 13782 res.getItem().add(parseLinkageLinkageItemComponent(xpp, res)); 13783 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13784 return false; 13785 return true; 13786 } 13787 13788 protected Linkage.LinkageItemComponent parseLinkageLinkageItemComponent(XmlPullParser xpp, Linkage owner) 13789 throws XmlPullParserException, IOException, FHIRFormatError { 13790 Linkage.LinkageItemComponent res = new Linkage.LinkageItemComponent(); 13791 parseBackboneAttributes(xpp, res); 13792 next(xpp); 13793 int eventType = nextNoWhitespace(xpp); 13794 while (eventType != XmlPullParser.END_TAG) { 13795 if (!parseLinkageLinkageItemComponentContent(eventType, xpp, owner, res)) 13796 unknownContent(xpp); 13797 eventType = nextNoWhitespace(xpp); 13798 } 13799 next(xpp); 13800 parseElementClose(res); 13801 return res; 13802 } 13803 13804 protected boolean parseLinkageLinkageItemComponentContent(int eventType, XmlPullParser xpp, Linkage owner, 13805 Linkage.LinkageItemComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13806 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13807 res.setTypeElement(parseEnumeration(xpp, Linkage.LinkageType.NULL, new Linkage.LinkageTypeEnumFactory())); 13808 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 13809 res.setResource(parseReference(xpp)); 13810 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13811 return false; 13812 return true; 13813 } 13814 13815 protected ListResource parseListResource(XmlPullParser xpp) 13816 throws XmlPullParserException, IOException, FHIRFormatError { 13817 ListResource res = new ListResource(); 13818 parseDomainResourceAttributes(xpp, res); 13819 next(xpp); 13820 int eventType = nextNoWhitespace(xpp); 13821 while (eventType != XmlPullParser.END_TAG) { 13822 if (!parseListResourceContent(eventType, xpp, res)) 13823 unknownContent(xpp); 13824 eventType = nextNoWhitespace(xpp); 13825 } 13826 next(xpp); 13827 parseElementClose(res); 13828 return res; 13829 } 13830 13831 protected boolean parseListResourceContent(int eventType, XmlPullParser xpp, ListResource res) 13832 throws XmlPullParserException, IOException, FHIRFormatError { 13833 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13834 res.getIdentifier().add(parseIdentifier(xpp)); 13835 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 13836 res.setStatusElement( 13837 parseEnumeration(xpp, ListResource.ListStatus.NULL, new ListResource.ListStatusEnumFactory())); 13838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 13839 res.setModeElement(parseEnumeration(xpp, ListResource.ListMode.NULL, new ListResource.ListModeEnumFactory())); 13840 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 13841 res.setTitleElement(parseString(xpp)); 13842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 13843 res.setCode(parseCodeableConcept(xpp)); 13844 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 13845 res.setSubject(parseReference(xpp)); 13846 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 13847 res.setEncounter(parseReference(xpp)); 13848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 13849 res.setDateElement(parseDateTime(xpp)); 13850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 13851 res.setSource(parseReference(xpp)); 13852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderedBy")) { 13853 res.setOrderedBy(parseCodeableConcept(xpp)); 13854 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 13855 res.getNote().add(parseAnnotation(xpp)); 13856 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entry")) { 13857 res.getEntry().add(parseListResourceListEntryComponent(xpp, res)); 13858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("emptyReason")) { 13859 res.setEmptyReason(parseCodeableConcept(xpp)); 13860 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13861 return false; 13862 return true; 13863 } 13864 13865 protected ListResource.ListEntryComponent parseListResourceListEntryComponent(XmlPullParser xpp, ListResource owner) 13866 throws XmlPullParserException, IOException, FHIRFormatError { 13867 ListResource.ListEntryComponent res = new ListResource.ListEntryComponent(); 13868 parseBackboneAttributes(xpp, res); 13869 next(xpp); 13870 int eventType = nextNoWhitespace(xpp); 13871 while (eventType != XmlPullParser.END_TAG) { 13872 if (!parseListResourceListEntryComponentContent(eventType, xpp, owner, res)) 13873 unknownContent(xpp); 13874 eventType = nextNoWhitespace(xpp); 13875 } 13876 next(xpp); 13877 parseElementClose(res); 13878 return res; 13879 } 13880 13881 protected boolean parseListResourceListEntryComponentContent(int eventType, XmlPullParser xpp, ListResource owner, 13882 ListResource.ListEntryComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13883 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("flag")) { 13884 res.setFlag(parseCodeableConcept(xpp)); 13885 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deleted")) { 13886 res.setDeletedElement(parseBoolean(xpp)); 13887 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 13888 res.setDateElement(parseDateTime(xpp)); 13889 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 13890 res.setItem(parseReference(xpp)); 13891 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13892 return false; 13893 return true; 13894 } 13895 13896 protected Location parseLocation(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 13897 Location res = new Location(); 13898 parseDomainResourceAttributes(xpp, res); 13899 next(xpp); 13900 int eventType = nextNoWhitespace(xpp); 13901 while (eventType != XmlPullParser.END_TAG) { 13902 if (!parseLocationContent(eventType, xpp, res)) 13903 unknownContent(xpp); 13904 eventType = nextNoWhitespace(xpp); 13905 } 13906 next(xpp); 13907 parseElementClose(res); 13908 return res; 13909 } 13910 13911 protected boolean parseLocationContent(int eventType, XmlPullParser xpp, Location res) 13912 throws XmlPullParserException, IOException, FHIRFormatError { 13913 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 13914 res.getIdentifier().add(parseIdentifier(xpp)); 13915 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 13916 res.setStatusElement( 13917 parseEnumeration(xpp, Location.LocationStatus.NULL, new Location.LocationStatusEnumFactory())); 13918 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationalStatus")) { 13919 res.setOperationalStatus(parseCoding(xpp)); 13920 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 13921 res.setNameElement(parseString(xpp)); 13922 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 13923 res.getAlias().add(parseString(xpp)); 13924 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 13925 res.setDescriptionElement(parseString(xpp)); 13926 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 13927 res.setModeElement(parseEnumeration(xpp, Location.LocationMode.NULL, new Location.LocationModeEnumFactory())); 13928 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 13929 res.getType().add(parseCodeableConcept(xpp)); 13930 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 13931 res.getTelecom().add(parseContactPoint(xpp)); 13932 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 13933 res.setAddress(parseAddress(xpp)); 13934 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalType")) { 13935 res.setPhysicalType(parseCodeableConcept(xpp)); 13936 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("position")) { 13937 res.setPosition(parseLocationLocationPositionComponent(xpp, res)); 13938 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 13939 res.setManagingOrganization(parseReference(xpp)); 13940 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 13941 res.setPartOf(parseReference(xpp)); 13942 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hoursOfOperation")) { 13943 res.getHoursOfOperation().add(parseLocationLocationHoursOfOperationComponent(xpp, res)); 13944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { 13945 res.setAvailabilityExceptionsElement(parseString(xpp)); 13946 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 13947 res.getEndpoint().add(parseReference(xpp)); 13948 } else if (!parseDomainResourceContent(eventType, xpp, res)) 13949 return false; 13950 return true; 13951 } 13952 13953 protected Location.LocationPositionComponent parseLocationLocationPositionComponent(XmlPullParser xpp, Location owner) 13954 throws XmlPullParserException, IOException, FHIRFormatError { 13955 Location.LocationPositionComponent res = new Location.LocationPositionComponent(); 13956 parseBackboneAttributes(xpp, res); 13957 next(xpp); 13958 int eventType = nextNoWhitespace(xpp); 13959 while (eventType != XmlPullParser.END_TAG) { 13960 if (!parseLocationLocationPositionComponentContent(eventType, xpp, owner, res)) 13961 unknownContent(xpp); 13962 eventType = nextNoWhitespace(xpp); 13963 } 13964 next(xpp); 13965 parseElementClose(res); 13966 return res; 13967 } 13968 13969 protected boolean parseLocationLocationPositionComponentContent(int eventType, XmlPullParser xpp, Location owner, 13970 Location.LocationPositionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 13971 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("longitude")) { 13972 res.setLongitudeElement(parseDecimal(xpp)); 13973 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("latitude")) { 13974 res.setLatitudeElement(parseDecimal(xpp)); 13975 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("altitude")) { 13976 res.setAltitudeElement(parseDecimal(xpp)); 13977 } else if (!parseBackboneElementContent(eventType, xpp, res)) 13978 return false; 13979 return true; 13980 } 13981 13982 protected Location.LocationHoursOfOperationComponent parseLocationLocationHoursOfOperationComponent(XmlPullParser xpp, 13983 Location owner) throws XmlPullParserException, IOException, FHIRFormatError { 13984 Location.LocationHoursOfOperationComponent res = new Location.LocationHoursOfOperationComponent(); 13985 parseBackboneAttributes(xpp, res); 13986 next(xpp); 13987 int eventType = nextNoWhitespace(xpp); 13988 while (eventType != XmlPullParser.END_TAG) { 13989 if (!parseLocationLocationHoursOfOperationComponentContent(eventType, xpp, owner, res)) 13990 unknownContent(xpp); 13991 eventType = nextNoWhitespace(xpp); 13992 } 13993 next(xpp); 13994 parseElementClose(res); 13995 return res; 13996 } 13997 13998 protected boolean parseLocationLocationHoursOfOperationComponentContent(int eventType, XmlPullParser xpp, 13999 Location owner, Location.LocationHoursOfOperationComponent res) 14000 throws XmlPullParserException, IOException, FHIRFormatError { 14001 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { 14002 res.getDaysOfWeek().add(parseEnumeration(xpp, Location.DaysOfWeek.NULL, new Location.DaysOfWeekEnumFactory())); 14003 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { 14004 res.setAllDayElement(parseBoolean(xpp)); 14005 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("openingTime")) { 14006 res.setOpeningTimeElement(parseTime(xpp)); 14007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("closingTime")) { 14008 res.setClosingTimeElement(parseTime(xpp)); 14009 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14010 return false; 14011 return true; 14012 } 14013 14014 protected Measure parseMeasure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 14015 Measure res = new Measure(); 14016 parseDomainResourceAttributes(xpp, res); 14017 next(xpp); 14018 int eventType = nextNoWhitespace(xpp); 14019 while (eventType != XmlPullParser.END_TAG) { 14020 if (!parseMeasureContent(eventType, xpp, res)) 14021 unknownContent(xpp); 14022 eventType = nextNoWhitespace(xpp); 14023 } 14024 next(xpp); 14025 parseElementClose(res); 14026 return res; 14027 } 14028 14029 protected boolean parseMeasureContent(int eventType, XmlPullParser xpp, Measure res) 14030 throws XmlPullParserException, IOException, FHIRFormatError { 14031 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 14032 res.setUrlElement(parseUri(xpp)); 14033 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14034 res.getIdentifier().add(parseIdentifier(xpp)); 14035 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 14036 res.setVersionElement(parseString(xpp)); 14037 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 14038 res.setNameElement(parseString(xpp)); 14039 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 14040 res.setTitleElement(parseString(xpp)); 14041 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 14042 res.setSubtitleElement(parseString(xpp)); 14043 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14044 res.setStatusElement( 14045 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 14046 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 14047 res.setExperimentalElement(parseBoolean(xpp)); 14048 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 14049 res.setSubject(parseType("subject", xpp)); 14050 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 14051 res.setDateElement(parseDateTime(xpp)); 14052 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 14053 res.setPublisherElement(parseString(xpp)); 14054 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 14055 res.getContact().add(parseContactDetail(xpp)); 14056 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14057 res.setDescriptionElement(parseMarkdown(xpp)); 14058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 14059 res.getUseContext().add(parseUsageContext(xpp)); 14060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 14061 res.getJurisdiction().add(parseCodeableConcept(xpp)); 14062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 14063 res.setPurposeElement(parseMarkdown(xpp)); 14064 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 14065 res.setUsageElement(parseString(xpp)); 14066 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 14067 res.setCopyrightElement(parseMarkdown(xpp)); 14068 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 14069 res.setApprovalDateElement(parseDate(xpp)); 14070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 14071 res.setLastReviewDateElement(parseDate(xpp)); 14072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 14073 res.setEffectivePeriod(parsePeriod(xpp)); 14074 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 14075 res.getTopic().add(parseCodeableConcept(xpp)); 14076 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 14077 res.getAuthor().add(parseContactDetail(xpp)); 14078 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 14079 res.getEditor().add(parseContactDetail(xpp)); 14080 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 14081 res.getReviewer().add(parseContactDetail(xpp)); 14082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 14083 res.getEndorser().add(parseContactDetail(xpp)); 14084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 14085 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 14086 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { 14087 res.getLibrary().add(parseCanonical(xpp)); 14088 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disclaimer")) { 14089 res.setDisclaimerElement(parseMarkdown(xpp)); 14090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("scoring")) { 14091 res.setScoring(parseCodeableConcept(xpp)); 14092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositeScoring")) { 14093 res.setCompositeScoring(parseCodeableConcept(xpp)); 14094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 14095 res.getType().add(parseCodeableConcept(xpp)); 14096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("riskAdjustment")) { 14097 res.setRiskAdjustmentElement(parseString(xpp)); 14098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rateAggregation")) { 14099 res.setRateAggregationElement(parseString(xpp)); 14100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { 14101 res.setRationaleElement(parseMarkdown(xpp)); 14102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalRecommendationStatement")) { 14103 res.setClinicalRecommendationStatementElement(parseMarkdown(xpp)); 14104 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("improvementNotation")) { 14105 res.setImprovementNotation(parseCodeableConcept(xpp)); 14106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 14107 res.getDefinition().add(parseMarkdown(xpp)); 14108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("guidance")) { 14109 res.setGuidanceElement(parseMarkdown(xpp)); 14110 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 14111 res.getGroup().add(parseMeasureMeasureGroupComponent(xpp, res)); 14112 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplementalData")) { 14113 res.getSupplementalData().add(parseMeasureMeasureSupplementalDataComponent(xpp, res)); 14114 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14115 return false; 14116 return true; 14117 } 14118 14119 protected Measure.MeasureGroupComponent parseMeasureMeasureGroupComponent(XmlPullParser xpp, Measure owner) 14120 throws XmlPullParserException, IOException, FHIRFormatError { 14121 Measure.MeasureGroupComponent res = new Measure.MeasureGroupComponent(); 14122 parseBackboneAttributes(xpp, res); 14123 next(xpp); 14124 int eventType = nextNoWhitespace(xpp); 14125 while (eventType != XmlPullParser.END_TAG) { 14126 if (!parseMeasureMeasureGroupComponentContent(eventType, xpp, owner, res)) 14127 unknownContent(xpp); 14128 eventType = nextNoWhitespace(xpp); 14129 } 14130 next(xpp); 14131 parseElementClose(res); 14132 return res; 14133 } 14134 14135 protected boolean parseMeasureMeasureGroupComponentContent(int eventType, XmlPullParser xpp, Measure owner, 14136 Measure.MeasureGroupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 14137 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14138 res.setCode(parseCodeableConcept(xpp)); 14139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14140 res.setDescriptionElement(parseString(xpp)); 14141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 14142 res.getPopulation().add(parseMeasureMeasureGroupPopulationComponent(xpp, owner)); 14143 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { 14144 res.getStratifier().add(parseMeasureMeasureGroupStratifierComponent(xpp, owner)); 14145 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14146 return false; 14147 return true; 14148 } 14149 14150 protected Measure.MeasureGroupPopulationComponent parseMeasureMeasureGroupPopulationComponent(XmlPullParser xpp, 14151 Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { 14152 Measure.MeasureGroupPopulationComponent res = new Measure.MeasureGroupPopulationComponent(); 14153 parseBackboneAttributes(xpp, res); 14154 next(xpp); 14155 int eventType = nextNoWhitespace(xpp); 14156 while (eventType != XmlPullParser.END_TAG) { 14157 if (!parseMeasureMeasureGroupPopulationComponentContent(eventType, xpp, owner, res)) 14158 unknownContent(xpp); 14159 eventType = nextNoWhitespace(xpp); 14160 } 14161 next(xpp); 14162 parseElementClose(res); 14163 return res; 14164 } 14165 14166 protected boolean parseMeasureMeasureGroupPopulationComponentContent(int eventType, XmlPullParser xpp, Measure owner, 14167 Measure.MeasureGroupPopulationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 14168 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14169 res.setCode(parseCodeableConcept(xpp)); 14170 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14171 res.setDescriptionElement(parseString(xpp)); 14172 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { 14173 res.setCriteria(parseExpression(xpp)); 14174 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14175 return false; 14176 return true; 14177 } 14178 14179 protected Measure.MeasureGroupStratifierComponent parseMeasureMeasureGroupStratifierComponent(XmlPullParser xpp, 14180 Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { 14181 Measure.MeasureGroupStratifierComponent res = new Measure.MeasureGroupStratifierComponent(); 14182 parseBackboneAttributes(xpp, res); 14183 next(xpp); 14184 int eventType = nextNoWhitespace(xpp); 14185 while (eventType != XmlPullParser.END_TAG) { 14186 if (!parseMeasureMeasureGroupStratifierComponentContent(eventType, xpp, owner, res)) 14187 unknownContent(xpp); 14188 eventType = nextNoWhitespace(xpp); 14189 } 14190 next(xpp); 14191 parseElementClose(res); 14192 return res; 14193 } 14194 14195 protected boolean parseMeasureMeasureGroupStratifierComponentContent(int eventType, XmlPullParser xpp, Measure owner, 14196 Measure.MeasureGroupStratifierComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 14197 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14198 res.setCode(parseCodeableConcept(xpp)); 14199 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14200 res.setDescriptionElement(parseString(xpp)); 14201 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { 14202 res.setCriteria(parseExpression(xpp)); 14203 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { 14204 res.getComponent().add(parseMeasureMeasureGroupStratifierComponentComponent(xpp, owner)); 14205 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14206 return false; 14207 return true; 14208 } 14209 14210 protected Measure.MeasureGroupStratifierComponentComponent parseMeasureMeasureGroupStratifierComponentComponent( 14211 XmlPullParser xpp, Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { 14212 Measure.MeasureGroupStratifierComponentComponent res = new Measure.MeasureGroupStratifierComponentComponent(); 14213 parseBackboneAttributes(xpp, res); 14214 next(xpp); 14215 int eventType = nextNoWhitespace(xpp); 14216 while (eventType != XmlPullParser.END_TAG) { 14217 if (!parseMeasureMeasureGroupStratifierComponentComponentContent(eventType, xpp, owner, res)) 14218 unknownContent(xpp); 14219 eventType = nextNoWhitespace(xpp); 14220 } 14221 next(xpp); 14222 parseElementClose(res); 14223 return res; 14224 } 14225 14226 protected boolean parseMeasureMeasureGroupStratifierComponentComponentContent(int eventType, XmlPullParser xpp, 14227 Measure owner, Measure.MeasureGroupStratifierComponentComponent res) 14228 throws XmlPullParserException, IOException, FHIRFormatError { 14229 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14230 res.setCode(parseCodeableConcept(xpp)); 14231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14232 res.setDescriptionElement(parseString(xpp)); 14233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { 14234 res.setCriteria(parseExpression(xpp)); 14235 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14236 return false; 14237 return true; 14238 } 14239 14240 protected Measure.MeasureSupplementalDataComponent parseMeasureMeasureSupplementalDataComponent(XmlPullParser xpp, 14241 Measure owner) throws XmlPullParserException, IOException, FHIRFormatError { 14242 Measure.MeasureSupplementalDataComponent res = new Measure.MeasureSupplementalDataComponent(); 14243 parseBackboneAttributes(xpp, res); 14244 next(xpp); 14245 int eventType = nextNoWhitespace(xpp); 14246 while (eventType != XmlPullParser.END_TAG) { 14247 if (!parseMeasureMeasureSupplementalDataComponentContent(eventType, xpp, owner, res)) 14248 unknownContent(xpp); 14249 eventType = nextNoWhitespace(xpp); 14250 } 14251 next(xpp); 14252 parseElementClose(res); 14253 return res; 14254 } 14255 14256 protected boolean parseMeasureMeasureSupplementalDataComponentContent(int eventType, XmlPullParser xpp, Measure owner, 14257 Measure.MeasureSupplementalDataComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 14258 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14259 res.setCode(parseCodeableConcept(xpp)); 14260 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 14261 res.getUsage().add(parseCodeableConcept(xpp)); 14262 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 14263 res.setDescriptionElement(parseString(xpp)); 14264 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { 14265 res.setCriteria(parseExpression(xpp)); 14266 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14267 return false; 14268 return true; 14269 } 14270 14271 protected MeasureReport parseMeasureReport(XmlPullParser xpp) 14272 throws XmlPullParserException, IOException, FHIRFormatError { 14273 MeasureReport res = new MeasureReport(); 14274 parseDomainResourceAttributes(xpp, res); 14275 next(xpp); 14276 int eventType = nextNoWhitespace(xpp); 14277 while (eventType != XmlPullParser.END_TAG) { 14278 if (!parseMeasureReportContent(eventType, xpp, res)) 14279 unknownContent(xpp); 14280 eventType = nextNoWhitespace(xpp); 14281 } 14282 next(xpp); 14283 parseElementClose(res); 14284 return res; 14285 } 14286 14287 protected boolean parseMeasureReportContent(int eventType, XmlPullParser xpp, MeasureReport res) 14288 throws XmlPullParserException, IOException, FHIRFormatError { 14289 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14290 res.getIdentifier().add(parseIdentifier(xpp)); 14291 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14292 res.setStatusElement(parseEnumeration(xpp, MeasureReport.MeasureReportStatus.NULL, 14293 new MeasureReport.MeasureReportStatusEnumFactory())); 14294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 14295 res.setTypeElement(parseEnumeration(xpp, MeasureReport.MeasureReportType.NULL, 14296 new MeasureReport.MeasureReportTypeEnumFactory())); 14297 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { 14298 res.setMeasureElement(parseCanonical(xpp)); 14299 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 14300 res.setSubject(parseReference(xpp)); 14301 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 14302 res.setDateElement(parseDateTime(xpp)); 14303 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reporter")) { 14304 res.setReporter(parseReference(xpp)); 14305 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 14306 res.setPeriod(parsePeriod(xpp)); 14307 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("improvementNotation")) { 14308 res.setImprovementNotation(parseCodeableConcept(xpp)); 14309 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 14310 res.getGroup().add(parseMeasureReportMeasureReportGroupComponent(xpp, res)); 14311 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("evaluatedResource")) { 14312 res.getEvaluatedResource().add(parseReference(xpp)); 14313 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14314 return false; 14315 return true; 14316 } 14317 14318 protected MeasureReport.MeasureReportGroupComponent parseMeasureReportMeasureReportGroupComponent(XmlPullParser xpp, 14319 MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14320 MeasureReport.MeasureReportGroupComponent res = new MeasureReport.MeasureReportGroupComponent(); 14321 parseBackboneAttributes(xpp, res); 14322 next(xpp); 14323 int eventType = nextNoWhitespace(xpp); 14324 while (eventType != XmlPullParser.END_TAG) { 14325 if (!parseMeasureReportMeasureReportGroupComponentContent(eventType, xpp, owner, res)) 14326 unknownContent(xpp); 14327 eventType = nextNoWhitespace(xpp); 14328 } 14329 next(xpp); 14330 parseElementClose(res); 14331 return res; 14332 } 14333 14334 protected boolean parseMeasureReportMeasureReportGroupComponentContent(int eventType, XmlPullParser xpp, 14335 MeasureReport owner, MeasureReport.MeasureReportGroupComponent res) 14336 throws XmlPullParserException, IOException, FHIRFormatError { 14337 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14338 res.setCode(parseCodeableConcept(xpp)); 14339 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 14340 res.getPopulation().add(parseMeasureReportMeasureReportGroupPopulationComponent(xpp, owner)); 14341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { 14342 res.setMeasureScore(parseQuantity(xpp)); 14343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratifier")) { 14344 res.getStratifier().add(parseMeasureReportMeasureReportGroupStratifierComponent(xpp, owner)); 14345 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14346 return false; 14347 return true; 14348 } 14349 14350 protected MeasureReport.MeasureReportGroupPopulationComponent parseMeasureReportMeasureReportGroupPopulationComponent( 14351 XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14352 MeasureReport.MeasureReportGroupPopulationComponent res = new MeasureReport.MeasureReportGroupPopulationComponent(); 14353 parseBackboneAttributes(xpp, res); 14354 next(xpp); 14355 int eventType = nextNoWhitespace(xpp); 14356 while (eventType != XmlPullParser.END_TAG) { 14357 if (!parseMeasureReportMeasureReportGroupPopulationComponentContent(eventType, xpp, owner, res)) 14358 unknownContent(xpp); 14359 eventType = nextNoWhitespace(xpp); 14360 } 14361 next(xpp); 14362 parseElementClose(res); 14363 return res; 14364 } 14365 14366 protected boolean parseMeasureReportMeasureReportGroupPopulationComponentContent(int eventType, XmlPullParser xpp, 14367 MeasureReport owner, MeasureReport.MeasureReportGroupPopulationComponent res) 14368 throws XmlPullParserException, IOException, FHIRFormatError { 14369 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14370 res.setCode(parseCodeableConcept(xpp)); 14371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { 14372 res.setCountElement(parseInteger(xpp)); 14373 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectResults")) { 14374 res.setSubjectResults(parseReference(xpp)); 14375 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14376 return false; 14377 return true; 14378 } 14379 14380 protected MeasureReport.MeasureReportGroupStratifierComponent parseMeasureReportMeasureReportGroupStratifierComponent( 14381 XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14382 MeasureReport.MeasureReportGroupStratifierComponent res = new MeasureReport.MeasureReportGroupStratifierComponent(); 14383 parseBackboneAttributes(xpp, res); 14384 next(xpp); 14385 int eventType = nextNoWhitespace(xpp); 14386 while (eventType != XmlPullParser.END_TAG) { 14387 if (!parseMeasureReportMeasureReportGroupStratifierComponentContent(eventType, xpp, owner, res)) 14388 unknownContent(xpp); 14389 eventType = nextNoWhitespace(xpp); 14390 } 14391 next(xpp); 14392 parseElementClose(res); 14393 return res; 14394 } 14395 14396 protected boolean parseMeasureReportMeasureReportGroupStratifierComponentContent(int eventType, XmlPullParser xpp, 14397 MeasureReport owner, MeasureReport.MeasureReportGroupStratifierComponent res) 14398 throws XmlPullParserException, IOException, FHIRFormatError { 14399 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14400 res.getCode().add(parseCodeableConcept(xpp)); 14401 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stratum")) { 14402 res.getStratum().add(parseMeasureReportStratifierGroupComponent(xpp, owner)); 14403 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14404 return false; 14405 return true; 14406 } 14407 14408 protected MeasureReport.StratifierGroupComponent parseMeasureReportStratifierGroupComponent(XmlPullParser xpp, 14409 MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14410 MeasureReport.StratifierGroupComponent res = new MeasureReport.StratifierGroupComponent(); 14411 parseBackboneAttributes(xpp, res); 14412 next(xpp); 14413 int eventType = nextNoWhitespace(xpp); 14414 while (eventType != XmlPullParser.END_TAG) { 14415 if (!parseMeasureReportStratifierGroupComponentContent(eventType, xpp, owner, res)) 14416 unknownContent(xpp); 14417 eventType = nextNoWhitespace(xpp); 14418 } 14419 next(xpp); 14420 parseElementClose(res); 14421 return res; 14422 } 14423 14424 protected boolean parseMeasureReportStratifierGroupComponentContent(int eventType, XmlPullParser xpp, 14425 MeasureReport owner, MeasureReport.StratifierGroupComponent res) 14426 throws XmlPullParserException, IOException, FHIRFormatError { 14427 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 14428 res.setValue(parseCodeableConcept(xpp)); 14429 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { 14430 res.getComponent().add(parseMeasureReportStratifierGroupComponentComponent(xpp, owner)); 14431 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 14432 res.getPopulation().add(parseMeasureReportStratifierGroupPopulationComponent(xpp, owner)); 14433 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measureScore")) { 14434 res.setMeasureScore(parseQuantity(xpp)); 14435 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14436 return false; 14437 return true; 14438 } 14439 14440 protected MeasureReport.StratifierGroupComponentComponent parseMeasureReportStratifierGroupComponentComponent( 14441 XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14442 MeasureReport.StratifierGroupComponentComponent res = new MeasureReport.StratifierGroupComponentComponent(); 14443 parseBackboneAttributes(xpp, res); 14444 next(xpp); 14445 int eventType = nextNoWhitespace(xpp); 14446 while (eventType != XmlPullParser.END_TAG) { 14447 if (!parseMeasureReportStratifierGroupComponentComponentContent(eventType, xpp, owner, res)) 14448 unknownContent(xpp); 14449 eventType = nextNoWhitespace(xpp); 14450 } 14451 next(xpp); 14452 parseElementClose(res); 14453 return res; 14454 } 14455 14456 protected boolean parseMeasureReportStratifierGroupComponentComponentContent(int eventType, XmlPullParser xpp, 14457 MeasureReport owner, MeasureReport.StratifierGroupComponentComponent res) 14458 throws XmlPullParserException, IOException, FHIRFormatError { 14459 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14460 res.setCode(parseCodeableConcept(xpp)); 14461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 14462 res.setValue(parseCodeableConcept(xpp)); 14463 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14464 return false; 14465 return true; 14466 } 14467 14468 protected MeasureReport.StratifierGroupPopulationComponent parseMeasureReportStratifierGroupPopulationComponent( 14469 XmlPullParser xpp, MeasureReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 14470 MeasureReport.StratifierGroupPopulationComponent res = new MeasureReport.StratifierGroupPopulationComponent(); 14471 parseBackboneAttributes(xpp, res); 14472 next(xpp); 14473 int eventType = nextNoWhitespace(xpp); 14474 while (eventType != XmlPullParser.END_TAG) { 14475 if (!parseMeasureReportStratifierGroupPopulationComponentContent(eventType, xpp, owner, res)) 14476 unknownContent(xpp); 14477 eventType = nextNoWhitespace(xpp); 14478 } 14479 next(xpp); 14480 parseElementClose(res); 14481 return res; 14482 } 14483 14484 protected boolean parseMeasureReportStratifierGroupPopulationComponentContent(int eventType, XmlPullParser xpp, 14485 MeasureReport owner, MeasureReport.StratifierGroupPopulationComponent res) 14486 throws XmlPullParserException, IOException, FHIRFormatError { 14487 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14488 res.setCode(parseCodeableConcept(xpp)); 14489 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("count")) { 14490 res.setCountElement(parseInteger(xpp)); 14491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectResults")) { 14492 res.setSubjectResults(parseReference(xpp)); 14493 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14494 return false; 14495 return true; 14496 } 14497 14498 protected Media parseMedia(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 14499 Media res = new Media(); 14500 parseDomainResourceAttributes(xpp, res); 14501 next(xpp); 14502 int eventType = nextNoWhitespace(xpp); 14503 while (eventType != XmlPullParser.END_TAG) { 14504 if (!parseMediaContent(eventType, xpp, res)) 14505 unknownContent(xpp); 14506 eventType = nextNoWhitespace(xpp); 14507 } 14508 next(xpp); 14509 parseElementClose(res); 14510 return res; 14511 } 14512 14513 protected boolean parseMediaContent(int eventType, XmlPullParser xpp, Media res) 14514 throws XmlPullParserException, IOException, FHIRFormatError { 14515 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14516 res.getIdentifier().add(parseIdentifier(xpp)); 14517 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 14518 res.getBasedOn().add(parseReference(xpp)); 14519 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 14520 res.getPartOf().add(parseReference(xpp)); 14521 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14522 res.setStatusElement(parseEnumeration(xpp, Media.MediaStatus.NULL, new Media.MediaStatusEnumFactory())); 14523 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 14524 res.setType(parseCodeableConcept(xpp)); 14525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modality")) { 14526 res.setModality(parseCodeableConcept(xpp)); 14527 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("view")) { 14528 res.setView(parseCodeableConcept(xpp)); 14529 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 14530 res.setSubject(parseReference(xpp)); 14531 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 14532 res.setEncounter(parseReference(xpp)); 14533 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "created")) { 14534 res.setCreated(parseType("created", xpp)); 14535 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 14536 res.setIssuedElement(parseInstant(xpp)); 14537 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { 14538 res.setOperator(parseReference(xpp)); 14539 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 14540 res.getReasonCode().add(parseCodeableConcept(xpp)); 14541 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 14542 res.setBodySite(parseCodeableConcept(xpp)); 14543 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deviceName")) { 14544 res.setDeviceNameElement(parseString(xpp)); 14545 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 14546 res.setDevice(parseReference(xpp)); 14547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("height")) { 14548 res.setHeightElement(parsePositiveInt(xpp)); 14549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("width")) { 14550 res.setWidthElement(parsePositiveInt(xpp)); 14551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frames")) { 14552 res.setFramesElement(parsePositiveInt(xpp)); 14553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 14554 res.setDurationElement(parseDecimal(xpp)); 14555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("content")) { 14556 res.setContent(parseAttachment(xpp)); 14557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 14558 res.getNote().add(parseAnnotation(xpp)); 14559 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14560 return false; 14561 return true; 14562 } 14563 14564 protected Medication parseMedication(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 14565 Medication res = new Medication(); 14566 parseDomainResourceAttributes(xpp, res); 14567 next(xpp); 14568 int eventType = nextNoWhitespace(xpp); 14569 while (eventType != XmlPullParser.END_TAG) { 14570 if (!parseMedicationContent(eventType, xpp, res)) 14571 unknownContent(xpp); 14572 eventType = nextNoWhitespace(xpp); 14573 } 14574 next(xpp); 14575 parseElementClose(res); 14576 return res; 14577 } 14578 14579 protected boolean parseMedicationContent(int eventType, XmlPullParser xpp, Medication res) 14580 throws XmlPullParserException, IOException, FHIRFormatError { 14581 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14582 res.getIdentifier().add(parseIdentifier(xpp)); 14583 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14584 res.setCode(parseCodeableConcept(xpp)); 14585 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14586 res.setStatusElement( 14587 parseEnumeration(xpp, Medication.MedicationStatus.NULL, new Medication.MedicationStatusEnumFactory())); 14588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 14589 res.setManufacturer(parseReference(xpp)); 14590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("form")) { 14591 res.setForm(parseCodeableConcept(xpp)); 14592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 14593 res.setAmount(parseRatio(xpp)); 14594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { 14595 res.getIngredient().add(parseMedicationMedicationIngredientComponent(xpp, res)); 14596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("batch")) { 14597 res.setBatch(parseMedicationMedicationBatchComponent(xpp, res)); 14598 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14599 return false; 14600 return true; 14601 } 14602 14603 protected Medication.MedicationIngredientComponent parseMedicationMedicationIngredientComponent(XmlPullParser xpp, 14604 Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { 14605 Medication.MedicationIngredientComponent res = new Medication.MedicationIngredientComponent(); 14606 parseBackboneAttributes(xpp, res); 14607 next(xpp); 14608 int eventType = nextNoWhitespace(xpp); 14609 while (eventType != XmlPullParser.END_TAG) { 14610 if (!parseMedicationMedicationIngredientComponentContent(eventType, xpp, owner, res)) 14611 unknownContent(xpp); 14612 eventType = nextNoWhitespace(xpp); 14613 } 14614 next(xpp); 14615 parseElementClose(res); 14616 return res; 14617 } 14618 14619 protected boolean parseMedicationMedicationIngredientComponentContent(int eventType, XmlPullParser xpp, 14620 Medication owner, Medication.MedicationIngredientComponent res) 14621 throws XmlPullParserException, IOException, FHIRFormatError { 14622 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { 14623 res.setItem(parseType("item", xpp)); 14624 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isActive")) { 14625 res.setIsActiveElement(parseBoolean(xpp)); 14626 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 14627 res.setStrength(parseRatio(xpp)); 14628 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14629 return false; 14630 return true; 14631 } 14632 14633 protected Medication.MedicationBatchComponent parseMedicationMedicationBatchComponent(XmlPullParser xpp, 14634 Medication owner) throws XmlPullParserException, IOException, FHIRFormatError { 14635 Medication.MedicationBatchComponent res = new Medication.MedicationBatchComponent(); 14636 parseBackboneAttributes(xpp, res); 14637 next(xpp); 14638 int eventType = nextNoWhitespace(xpp); 14639 while (eventType != XmlPullParser.END_TAG) { 14640 if (!parseMedicationMedicationBatchComponentContent(eventType, xpp, owner, res)) 14641 unknownContent(xpp); 14642 eventType = nextNoWhitespace(xpp); 14643 } 14644 next(xpp); 14645 parseElementClose(res); 14646 return res; 14647 } 14648 14649 protected boolean parseMedicationMedicationBatchComponentContent(int eventType, XmlPullParser xpp, Medication owner, 14650 Medication.MedicationBatchComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 14651 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lotNumber")) { 14652 res.setLotNumberElement(parseString(xpp)); 14653 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expirationDate")) { 14654 res.setExpirationDateElement(parseDateTime(xpp)); 14655 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14656 return false; 14657 return true; 14658 } 14659 14660 protected MedicationAdministration parseMedicationAdministration(XmlPullParser xpp) 14661 throws XmlPullParserException, IOException, FHIRFormatError { 14662 MedicationAdministration res = new MedicationAdministration(); 14663 parseDomainResourceAttributes(xpp, res); 14664 next(xpp); 14665 int eventType = nextNoWhitespace(xpp); 14666 while (eventType != XmlPullParser.END_TAG) { 14667 if (!parseMedicationAdministrationContent(eventType, xpp, res)) 14668 unknownContent(xpp); 14669 eventType = nextNoWhitespace(xpp); 14670 } 14671 next(xpp); 14672 parseElementClose(res); 14673 return res; 14674 } 14675 14676 protected boolean parseMedicationAdministrationContent(int eventType, XmlPullParser xpp, MedicationAdministration res) 14677 throws XmlPullParserException, IOException, FHIRFormatError { 14678 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14679 res.getIdentifier().add(parseIdentifier(xpp)); 14680 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiates")) { 14681 res.getInstantiates().add(parseUri(xpp)); 14682 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 14683 res.getPartOf().add(parseReference(xpp)); 14684 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14685 res.setStatusElement(parseEnumeration(xpp, MedicationAdministration.MedicationAdministrationStatus.NULL, 14686 new MedicationAdministration.MedicationAdministrationStatusEnumFactory())); 14687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 14688 res.getStatusReason().add(parseCodeableConcept(xpp)); 14689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 14690 res.setCategory(parseCodeableConcept(xpp)); 14691 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 14692 res.setMedication(parseType("medication", xpp)); 14693 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 14694 res.setSubject(parseReference(xpp)); 14695 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 14696 res.setContext(parseReference(xpp)); 14697 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 14698 res.getSupportingInformation().add(parseReference(xpp)); 14699 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { 14700 res.setEffective(parseType("effective", xpp)); 14701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 14702 res.getPerformer().add(parseMedicationAdministrationMedicationAdministrationPerformerComponent(xpp, res)); 14703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 14704 res.getReasonCode().add(parseCodeableConcept(xpp)); 14705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 14706 res.getReasonReference().add(parseReference(xpp)); 14707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 14708 res.setRequest(parseReference(xpp)); 14709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 14710 res.getDevice().add(parseReference(xpp)); 14711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 14712 res.getNote().add(parseAnnotation(xpp)); 14713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { 14714 res.setDosage(parseMedicationAdministrationMedicationAdministrationDosageComponent(xpp, res)); 14715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { 14716 res.getEventHistory().add(parseReference(xpp)); 14717 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14718 return false; 14719 return true; 14720 } 14721 14722 protected MedicationAdministration.MedicationAdministrationPerformerComponent parseMedicationAdministrationMedicationAdministrationPerformerComponent( 14723 XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { 14724 MedicationAdministration.MedicationAdministrationPerformerComponent res = new MedicationAdministration.MedicationAdministrationPerformerComponent(); 14725 parseBackboneAttributes(xpp, res); 14726 next(xpp); 14727 int eventType = nextNoWhitespace(xpp); 14728 while (eventType != XmlPullParser.END_TAG) { 14729 if (!parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(eventType, xpp, owner, res)) 14730 unknownContent(xpp); 14731 eventType = nextNoWhitespace(xpp); 14732 } 14733 next(xpp); 14734 parseElementClose(res); 14735 return res; 14736 } 14737 14738 protected boolean parseMedicationAdministrationMedicationAdministrationPerformerComponentContent(int eventType, 14739 XmlPullParser xpp, MedicationAdministration owner, 14740 MedicationAdministration.MedicationAdministrationPerformerComponent res) 14741 throws XmlPullParserException, IOException, FHIRFormatError { 14742 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 14743 res.setFunction(parseCodeableConcept(xpp)); 14744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 14745 res.setActor(parseReference(xpp)); 14746 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14747 return false; 14748 return true; 14749 } 14750 14751 protected MedicationAdministration.MedicationAdministrationDosageComponent parseMedicationAdministrationMedicationAdministrationDosageComponent( 14752 XmlPullParser xpp, MedicationAdministration owner) throws XmlPullParserException, IOException, FHIRFormatError { 14753 MedicationAdministration.MedicationAdministrationDosageComponent res = new MedicationAdministration.MedicationAdministrationDosageComponent(); 14754 parseBackboneAttributes(xpp, res); 14755 next(xpp); 14756 int eventType = nextNoWhitespace(xpp); 14757 while (eventType != XmlPullParser.END_TAG) { 14758 if (!parseMedicationAdministrationMedicationAdministrationDosageComponentContent(eventType, xpp, owner, res)) 14759 unknownContent(xpp); 14760 eventType = nextNoWhitespace(xpp); 14761 } 14762 next(xpp); 14763 parseElementClose(res); 14764 return res; 14765 } 14766 14767 protected boolean parseMedicationAdministrationMedicationAdministrationDosageComponentContent(int eventType, 14768 XmlPullParser xpp, MedicationAdministration owner, 14769 MedicationAdministration.MedicationAdministrationDosageComponent res) 14770 throws XmlPullParserException, IOException, FHIRFormatError { 14771 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 14772 res.setTextElement(parseString(xpp)); 14773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 14774 res.setSite(parseCodeableConcept(xpp)); 14775 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("route")) { 14776 res.setRoute(parseCodeableConcept(xpp)); 14777 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 14778 res.setMethod(parseCodeableConcept(xpp)); 14779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dose")) { 14780 res.setDose(parseQuantity(xpp)); 14781 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { 14782 res.setRate(parseType("rate", xpp)); 14783 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14784 return false; 14785 return true; 14786 } 14787 14788 protected MedicationDispense parseMedicationDispense(XmlPullParser xpp) 14789 throws XmlPullParserException, IOException, FHIRFormatError { 14790 MedicationDispense res = new MedicationDispense(); 14791 parseDomainResourceAttributes(xpp, res); 14792 next(xpp); 14793 int eventType = nextNoWhitespace(xpp); 14794 while (eventType != XmlPullParser.END_TAG) { 14795 if (!parseMedicationDispenseContent(eventType, xpp, res)) 14796 unknownContent(xpp); 14797 eventType = nextNoWhitespace(xpp); 14798 } 14799 next(xpp); 14800 parseElementClose(res); 14801 return res; 14802 } 14803 14804 protected boolean parseMedicationDispenseContent(int eventType, XmlPullParser xpp, MedicationDispense res) 14805 throws XmlPullParserException, IOException, FHIRFormatError { 14806 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 14807 res.getIdentifier().add(parseIdentifier(xpp)); 14808 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 14809 res.getPartOf().add(parseReference(xpp)); 14810 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14811 res.setStatusElement(parseEnumeration(xpp, MedicationDispense.MedicationDispenseStatus.NULL, 14812 new MedicationDispense.MedicationDispenseStatusEnumFactory())); 14813 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "statusReason")) { 14814 res.setStatusReason(parseType("statusReason", xpp)); 14815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 14816 res.setCategory(parseCodeableConcept(xpp)); 14817 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 14818 res.setMedication(parseType("medication", xpp)); 14819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 14820 res.setSubject(parseReference(xpp)); 14821 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 14822 res.setContext(parseReference(xpp)); 14823 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 14824 res.getSupportingInformation().add(parseReference(xpp)); 14825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 14826 res.getPerformer().add(parseMedicationDispenseMedicationDispensePerformerComponent(xpp, res)); 14827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 14828 res.setLocation(parseReference(xpp)); 14829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorizingPrescription")) { 14830 res.getAuthorizingPrescription().add(parseReference(xpp)); 14831 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 14832 res.setType(parseCodeableConcept(xpp)); 14833 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 14834 res.setQuantity(parseQuantity(xpp)); 14835 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysSupply")) { 14836 res.setDaysSupply(parseQuantity(xpp)); 14837 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenPrepared")) { 14838 res.setWhenPreparedElement(parseDateTime(xpp)); 14839 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("whenHandedOver")) { 14840 res.setWhenHandedOverElement(parseDateTime(xpp)); 14841 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 14842 res.setDestination(parseReference(xpp)); 14843 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { 14844 res.getReceiver().add(parseReference(xpp)); 14845 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 14846 res.getNote().add(parseAnnotation(xpp)); 14847 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { 14848 res.getDosageInstruction().add(parseDosage(xpp)); 14849 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { 14850 res.setSubstitution(parseMedicationDispenseMedicationDispenseSubstitutionComponent(xpp, res)); 14851 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { 14852 res.getDetectedIssue().add(parseReference(xpp)); 14853 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { 14854 res.getEventHistory().add(parseReference(xpp)); 14855 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14856 return false; 14857 return true; 14858 } 14859 14860 protected MedicationDispense.MedicationDispensePerformerComponent parseMedicationDispenseMedicationDispensePerformerComponent( 14861 XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { 14862 MedicationDispense.MedicationDispensePerformerComponent res = new MedicationDispense.MedicationDispensePerformerComponent(); 14863 parseBackboneAttributes(xpp, res); 14864 next(xpp); 14865 int eventType = nextNoWhitespace(xpp); 14866 while (eventType != XmlPullParser.END_TAG) { 14867 if (!parseMedicationDispenseMedicationDispensePerformerComponentContent(eventType, xpp, owner, res)) 14868 unknownContent(xpp); 14869 eventType = nextNoWhitespace(xpp); 14870 } 14871 next(xpp); 14872 parseElementClose(res); 14873 return res; 14874 } 14875 14876 protected boolean parseMedicationDispenseMedicationDispensePerformerComponentContent(int eventType, XmlPullParser xpp, 14877 MedicationDispense owner, MedicationDispense.MedicationDispensePerformerComponent res) 14878 throws XmlPullParserException, IOException, FHIRFormatError { 14879 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 14880 res.setFunction(parseCodeableConcept(xpp)); 14881 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 14882 res.setActor(parseReference(xpp)); 14883 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14884 return false; 14885 return true; 14886 } 14887 14888 protected MedicationDispense.MedicationDispenseSubstitutionComponent parseMedicationDispenseMedicationDispenseSubstitutionComponent( 14889 XmlPullParser xpp, MedicationDispense owner) throws XmlPullParserException, IOException, FHIRFormatError { 14890 MedicationDispense.MedicationDispenseSubstitutionComponent res = new MedicationDispense.MedicationDispenseSubstitutionComponent(); 14891 parseBackboneAttributes(xpp, res); 14892 next(xpp); 14893 int eventType = nextNoWhitespace(xpp); 14894 while (eventType != XmlPullParser.END_TAG) { 14895 if (!parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(eventType, xpp, owner, res)) 14896 unknownContent(xpp); 14897 eventType = nextNoWhitespace(xpp); 14898 } 14899 next(xpp); 14900 parseElementClose(res); 14901 return res; 14902 } 14903 14904 protected boolean parseMedicationDispenseMedicationDispenseSubstitutionComponentContent(int eventType, 14905 XmlPullParser xpp, MedicationDispense owner, MedicationDispense.MedicationDispenseSubstitutionComponent res) 14906 throws XmlPullParserException, IOException, FHIRFormatError { 14907 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("wasSubstituted")) { 14908 res.setWasSubstitutedElement(parseBoolean(xpp)); 14909 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 14910 res.setType(parseCodeableConcept(xpp)); 14911 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 14912 res.getReason().add(parseCodeableConcept(xpp)); 14913 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsibleParty")) { 14914 res.getResponsibleParty().add(parseReference(xpp)); 14915 } else if (!parseBackboneElementContent(eventType, xpp, res)) 14916 return false; 14917 return true; 14918 } 14919 14920 protected MedicationKnowledge parseMedicationKnowledge(XmlPullParser xpp) 14921 throws XmlPullParserException, IOException, FHIRFormatError { 14922 MedicationKnowledge res = new MedicationKnowledge(); 14923 parseDomainResourceAttributes(xpp, res); 14924 next(xpp); 14925 int eventType = nextNoWhitespace(xpp); 14926 while (eventType != XmlPullParser.END_TAG) { 14927 if (!parseMedicationKnowledgeContent(eventType, xpp, res)) 14928 unknownContent(xpp); 14929 eventType = nextNoWhitespace(xpp); 14930 } 14931 next(xpp); 14932 parseElementClose(res); 14933 return res; 14934 } 14935 14936 protected boolean parseMedicationKnowledgeContent(int eventType, XmlPullParser xpp, MedicationKnowledge res) 14937 throws XmlPullParserException, IOException, FHIRFormatError { 14938 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 14939 res.setCode(parseCodeableConcept(xpp)); 14940 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 14941 res.setStatusElement(parseEnumeration(xpp, MedicationKnowledge.MedicationKnowledgeStatus.NULL, 14942 new MedicationKnowledge.MedicationKnowledgeStatusEnumFactory())); 14943 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 14944 res.setManufacturer(parseReference(xpp)); 14945 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doseForm")) { 14946 res.setDoseForm(parseCodeableConcept(xpp)); 14947 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 14948 res.setAmount(parseQuantity(xpp)); 14949 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("synonym")) { 14950 res.getSynonym().add(parseString(xpp)); 14951 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedMedicationKnowledge")) { 14952 res.getRelatedMedicationKnowledge() 14953 .add(parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(xpp, res)); 14954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("associatedMedication")) { 14955 res.getAssociatedMedication().add(parseReference(xpp)); 14956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productType")) { 14957 res.getProductType().add(parseCodeableConcept(xpp)); 14958 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("monograph")) { 14959 res.getMonograph().add(parseMedicationKnowledgeMedicationKnowledgeMonographComponent(xpp, res)); 14960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { 14961 res.getIngredient().add(parseMedicationKnowledgeMedicationKnowledgeIngredientComponent(xpp, res)); 14962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preparationInstruction")) { 14963 res.setPreparationInstructionElement(parseMarkdown(xpp)); 14964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intendedRoute")) { 14965 res.getIntendedRoute().add(parseCodeableConcept(xpp)); 14966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cost")) { 14967 res.getCost().add(parseMedicationKnowledgeMedicationKnowledgeCostComponent(xpp, res)); 14968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("monitoringProgram")) { 14969 res.getMonitoringProgram().add(parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(xpp, res)); 14970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administrationGuidelines")) { 14971 res.getAdministrationGuidelines() 14972 .add(parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(xpp, res)); 14973 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("medicineClassification")) { 14974 res.getMedicineClassification() 14975 .add(parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(xpp, res)); 14976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packaging")) { 14977 res.setPackaging(parseMedicationKnowledgeMedicationKnowledgePackagingComponent(xpp, res)); 14978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("drugCharacteristic")) { 14979 res.getDrugCharacteristic().add(parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(xpp, res)); 14980 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contraindication")) { 14981 res.getContraindication().add(parseReference(xpp)); 14982 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("regulatory")) { 14983 res.getRegulatory().add(parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(xpp, res)); 14984 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kinetics")) { 14985 res.getKinetics().add(parseMedicationKnowledgeMedicationKnowledgeKineticsComponent(xpp, res)); 14986 } else if (!parseDomainResourceContent(eventType, xpp, res)) 14987 return false; 14988 return true; 14989 } 14990 14991 protected MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent( 14992 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 14993 MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent res = new MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent(); 14994 parseBackboneAttributes(xpp, res); 14995 next(xpp); 14996 int eventType = nextNoWhitespace(xpp); 14997 while (eventType != XmlPullParser.END_TAG) { 14998 if (!parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentContent(eventType, xpp, owner, 14999 res)) 15000 unknownContent(xpp); 15001 eventType = nextNoWhitespace(xpp); 15002 } 15003 next(xpp); 15004 parseElementClose(res); 15005 return res; 15006 } 15007 15008 protected boolean parseMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentContent(int eventType, 15009 XmlPullParser xpp, MedicationKnowledge owner, 15010 MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent res) 15011 throws XmlPullParserException, IOException, FHIRFormatError { 15012 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15013 res.setType(parseCodeableConcept(xpp)); 15014 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reference")) { 15015 res.getReference().add(parseReference(xpp)); 15016 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15017 return false; 15018 return true; 15019 } 15020 15021 protected MedicationKnowledge.MedicationKnowledgeMonographComponent parseMedicationKnowledgeMedicationKnowledgeMonographComponent( 15022 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15023 MedicationKnowledge.MedicationKnowledgeMonographComponent res = new MedicationKnowledge.MedicationKnowledgeMonographComponent(); 15024 parseBackboneAttributes(xpp, res); 15025 next(xpp); 15026 int eventType = nextNoWhitespace(xpp); 15027 while (eventType != XmlPullParser.END_TAG) { 15028 if (!parseMedicationKnowledgeMedicationKnowledgeMonographComponentContent(eventType, xpp, owner, res)) 15029 unknownContent(xpp); 15030 eventType = nextNoWhitespace(xpp); 15031 } 15032 next(xpp); 15033 parseElementClose(res); 15034 return res; 15035 } 15036 15037 protected boolean parseMedicationKnowledgeMedicationKnowledgeMonographComponentContent(int eventType, 15038 XmlPullParser xpp, MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeMonographComponent res) 15039 throws XmlPullParserException, IOException, FHIRFormatError { 15040 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15041 res.setType(parseCodeableConcept(xpp)); 15042 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 15043 res.setSource(parseReference(xpp)); 15044 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15045 return false; 15046 return true; 15047 } 15048 15049 protected MedicationKnowledge.MedicationKnowledgeIngredientComponent parseMedicationKnowledgeMedicationKnowledgeIngredientComponent( 15050 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15051 MedicationKnowledge.MedicationKnowledgeIngredientComponent res = new MedicationKnowledge.MedicationKnowledgeIngredientComponent(); 15052 parseBackboneAttributes(xpp, res); 15053 next(xpp); 15054 int eventType = nextNoWhitespace(xpp); 15055 while (eventType != XmlPullParser.END_TAG) { 15056 if (!parseMedicationKnowledgeMedicationKnowledgeIngredientComponentContent(eventType, xpp, owner, res)) 15057 unknownContent(xpp); 15058 eventType = nextNoWhitespace(xpp); 15059 } 15060 next(xpp); 15061 parseElementClose(res); 15062 return res; 15063 } 15064 15065 protected boolean parseMedicationKnowledgeMedicationKnowledgeIngredientComponentContent(int eventType, 15066 XmlPullParser xpp, MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeIngredientComponent res) 15067 throws XmlPullParserException, IOException, FHIRFormatError { 15068 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { 15069 res.setItem(parseType("item", xpp)); 15070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isActive")) { 15071 res.setIsActiveElement(parseBoolean(xpp)); 15072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 15073 res.setStrength(parseRatio(xpp)); 15074 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15075 return false; 15076 return true; 15077 } 15078 15079 protected MedicationKnowledge.MedicationKnowledgeCostComponent parseMedicationKnowledgeMedicationKnowledgeCostComponent( 15080 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15081 MedicationKnowledge.MedicationKnowledgeCostComponent res = new MedicationKnowledge.MedicationKnowledgeCostComponent(); 15082 parseBackboneAttributes(xpp, res); 15083 next(xpp); 15084 int eventType = nextNoWhitespace(xpp); 15085 while (eventType != XmlPullParser.END_TAG) { 15086 if (!parseMedicationKnowledgeMedicationKnowledgeCostComponentContent(eventType, xpp, owner, res)) 15087 unknownContent(xpp); 15088 eventType = nextNoWhitespace(xpp); 15089 } 15090 next(xpp); 15091 parseElementClose(res); 15092 return res; 15093 } 15094 15095 protected boolean parseMedicationKnowledgeMedicationKnowledgeCostComponentContent(int eventType, XmlPullParser xpp, 15096 MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeCostComponent res) 15097 throws XmlPullParserException, IOException, FHIRFormatError { 15098 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15099 res.setType(parseCodeableConcept(xpp)); 15100 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 15101 res.setSourceElement(parseString(xpp)); 15102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cost")) { 15103 res.setCost(parseMoney(xpp)); 15104 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15105 return false; 15106 return true; 15107 } 15108 15109 protected MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent( 15110 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15111 MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent res = new MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent(); 15112 parseBackboneAttributes(xpp, res); 15113 next(xpp); 15114 int eventType = nextNoWhitespace(xpp); 15115 while (eventType != XmlPullParser.END_TAG) { 15116 if (!parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentContent(eventType, xpp, owner, res)) 15117 unknownContent(xpp); 15118 eventType = nextNoWhitespace(xpp); 15119 } 15120 next(xpp); 15121 parseElementClose(res); 15122 return res; 15123 } 15124 15125 protected boolean parseMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentContent(int eventType, 15126 XmlPullParser xpp, MedicationKnowledge owner, 15127 MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent res) 15128 throws XmlPullParserException, IOException, FHIRFormatError { 15129 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15130 res.setType(parseCodeableConcept(xpp)); 15131 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 15132 res.setNameElement(parseString(xpp)); 15133 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15134 return false; 15135 return true; 15136 } 15137 15138 protected MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent( 15139 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15140 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent(); 15141 parseBackboneAttributes(xpp, res); 15142 next(xpp); 15143 int eventType = nextNoWhitespace(xpp); 15144 while (eventType != XmlPullParser.END_TAG) { 15145 if (!parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentContent(eventType, xpp, owner, 15146 res)) 15147 unknownContent(xpp); 15148 eventType = nextNoWhitespace(xpp); 15149 } 15150 next(xpp); 15151 parseElementClose(res); 15152 return res; 15153 } 15154 15155 protected boolean parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentContent(int eventType, 15156 XmlPullParser xpp, MedicationKnowledge owner, 15157 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent res) 15158 throws XmlPullParserException, IOException, FHIRFormatError { 15159 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { 15160 res.getDosage() 15161 .add(parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(xpp, owner)); 15162 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "indication")) { 15163 res.setIndication(parseType("indication", xpp)); 15164 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientCharacteristics")) { 15165 res.getPatientCharacteristics() 15166 .add(parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(xpp, 15167 owner)); 15168 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15169 return false; 15170 return true; 15171 } 15172 15173 protected MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent( 15174 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15175 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent(); 15176 parseBackboneAttributes(xpp, res); 15177 next(xpp); 15178 int eventType = nextNoWhitespace(xpp); 15179 while (eventType != XmlPullParser.END_TAG) { 15180 if (!parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentContent(eventType, xpp, 15181 owner, res)) 15182 unknownContent(xpp); 15183 eventType = nextNoWhitespace(xpp); 15184 } 15185 next(xpp); 15186 parseElementClose(res); 15187 return res; 15188 } 15189 15190 protected boolean parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentContent( 15191 int eventType, XmlPullParser xpp, MedicationKnowledge owner, 15192 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent res) 15193 throws XmlPullParserException, IOException, FHIRFormatError { 15194 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15195 res.setType(parseCodeableConcept(xpp)); 15196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { 15197 res.getDosage().add(parseDosage(xpp)); 15198 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15199 return false; 15200 return true; 15201 } 15202 15203 protected MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent( 15204 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15205 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent res = new MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(); 15206 parseBackboneAttributes(xpp, res); 15207 next(xpp); 15208 int eventType = nextNoWhitespace(xpp); 15209 while (eventType != XmlPullParser.END_TAG) { 15210 if (!parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentContent( 15211 eventType, xpp, owner, res)) 15212 unknownContent(xpp); 15213 eventType = nextNoWhitespace(xpp); 15214 } 15215 next(xpp); 15216 parseElementClose(res); 15217 return res; 15218 } 15219 15220 protected boolean parseMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentContent( 15221 int eventType, XmlPullParser xpp, MedicationKnowledge owner, 15222 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent res) 15223 throws XmlPullParserException, IOException, FHIRFormatError { 15224 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "characteristic")) { 15225 res.setCharacteristic(parseType("characteristic", xpp)); 15226 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 15227 res.getValue().add(parseString(xpp)); 15228 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15229 return false; 15230 return true; 15231 } 15232 15233 protected MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent( 15234 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15235 MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res = new MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent(); 15236 parseBackboneAttributes(xpp, res); 15237 next(xpp); 15238 int eventType = nextNoWhitespace(xpp); 15239 while (eventType != XmlPullParser.END_TAG) { 15240 if (!parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentContent(eventType, xpp, owner, 15241 res)) 15242 unknownContent(xpp); 15243 eventType = nextNoWhitespace(xpp); 15244 } 15245 next(xpp); 15246 parseElementClose(res); 15247 return res; 15248 } 15249 15250 protected boolean parseMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentContent(int eventType, 15251 XmlPullParser xpp, MedicationKnowledge owner, 15252 MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent res) 15253 throws XmlPullParserException, IOException, FHIRFormatError { 15254 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15255 res.setType(parseCodeableConcept(xpp)); 15256 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 15257 res.getClassification().add(parseCodeableConcept(xpp)); 15258 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15259 return false; 15260 return true; 15261 } 15262 15263 protected MedicationKnowledge.MedicationKnowledgePackagingComponent parseMedicationKnowledgeMedicationKnowledgePackagingComponent( 15264 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15265 MedicationKnowledge.MedicationKnowledgePackagingComponent res = new MedicationKnowledge.MedicationKnowledgePackagingComponent(); 15266 parseBackboneAttributes(xpp, res); 15267 next(xpp); 15268 int eventType = nextNoWhitespace(xpp); 15269 while (eventType != XmlPullParser.END_TAG) { 15270 if (!parseMedicationKnowledgeMedicationKnowledgePackagingComponentContent(eventType, xpp, owner, res)) 15271 unknownContent(xpp); 15272 eventType = nextNoWhitespace(xpp); 15273 } 15274 next(xpp); 15275 parseElementClose(res); 15276 return res; 15277 } 15278 15279 protected boolean parseMedicationKnowledgeMedicationKnowledgePackagingComponentContent(int eventType, 15280 XmlPullParser xpp, MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgePackagingComponent res) 15281 throws XmlPullParserException, IOException, FHIRFormatError { 15282 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15283 res.setType(parseCodeableConcept(xpp)); 15284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 15285 res.setQuantity(parseQuantity(xpp)); 15286 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15287 return false; 15288 return true; 15289 } 15290 15291 protected MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent( 15292 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15293 MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent res = new MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent(); 15294 parseBackboneAttributes(xpp, res); 15295 next(xpp); 15296 int eventType = nextNoWhitespace(xpp); 15297 while (eventType != XmlPullParser.END_TAG) { 15298 if (!parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentContent(eventType, xpp, owner, res)) 15299 unknownContent(xpp); 15300 eventType = nextNoWhitespace(xpp); 15301 } 15302 next(xpp); 15303 parseElementClose(res); 15304 return res; 15305 } 15306 15307 protected boolean parseMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentContent(int eventType, 15308 XmlPullParser xpp, MedicationKnowledge owner, 15309 MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent res) 15310 throws XmlPullParserException, IOException, FHIRFormatError { 15311 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15312 res.setType(parseCodeableConcept(xpp)); 15313 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 15314 res.setValue(parseType("value", xpp)); 15315 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15316 return false; 15317 return true; 15318 } 15319 15320 protected MedicationKnowledge.MedicationKnowledgeRegulatoryComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponent( 15321 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15322 MedicationKnowledge.MedicationKnowledgeRegulatoryComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryComponent(); 15323 parseBackboneAttributes(xpp, res); 15324 next(xpp); 15325 int eventType = nextNoWhitespace(xpp); 15326 while (eventType != XmlPullParser.END_TAG) { 15327 if (!parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponentContent(eventType, xpp, owner, res)) 15328 unknownContent(xpp); 15329 eventType = nextNoWhitespace(xpp); 15330 } 15331 next(xpp); 15332 parseElementClose(res); 15333 return res; 15334 } 15335 15336 protected boolean parseMedicationKnowledgeMedicationKnowledgeRegulatoryComponentContent(int eventType, 15337 XmlPullParser xpp, MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeRegulatoryComponent res) 15338 throws XmlPullParserException, IOException, FHIRFormatError { 15339 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("regulatoryAuthority")) { 15340 res.setRegulatoryAuthority(parseReference(xpp)); 15341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { 15342 res.getSubstitution().add(parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(xpp, owner)); 15343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 15344 res.getSchedule().add(parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(xpp, owner)); 15345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDispense")) { 15346 res.setMaxDispense(parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent(xpp, owner)); 15347 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15348 return false; 15349 return true; 15350 } 15351 15352 protected MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent( 15353 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15354 MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent(); 15355 parseBackboneAttributes(xpp, res); 15356 next(xpp); 15357 int eventType = nextNoWhitespace(xpp); 15358 while (eventType != XmlPullParser.END_TAG) { 15359 if (!parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentContent(eventType, xpp, owner, 15360 res)) 15361 unknownContent(xpp); 15362 eventType = nextNoWhitespace(xpp); 15363 } 15364 next(xpp); 15365 parseElementClose(res); 15366 return res; 15367 } 15368 15369 protected boolean parseMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentContent(int eventType, 15370 XmlPullParser xpp, MedicationKnowledge owner, 15371 MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent res) 15372 throws XmlPullParserException, IOException, FHIRFormatError { 15373 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15374 res.setType(parseCodeableConcept(xpp)); 15375 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowed")) { 15376 res.setAllowedElement(parseBoolean(xpp)); 15377 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15378 return false; 15379 return true; 15380 } 15381 15382 protected MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent( 15383 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15384 MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent(); 15385 parseBackboneAttributes(xpp, res); 15386 next(xpp); 15387 int eventType = nextNoWhitespace(xpp); 15388 while (eventType != XmlPullParser.END_TAG) { 15389 if (!parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentContent(eventType, xpp, owner, res)) 15390 unknownContent(xpp); 15391 eventType = nextNoWhitespace(xpp); 15392 } 15393 next(xpp); 15394 parseElementClose(res); 15395 return res; 15396 } 15397 15398 protected boolean parseMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentContent(int eventType, 15399 XmlPullParser xpp, MedicationKnowledge owner, 15400 MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent res) 15401 throws XmlPullParserException, IOException, FHIRFormatError { 15402 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 15403 res.setSchedule(parseCodeableConcept(xpp)); 15404 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15405 return false; 15406 return true; 15407 } 15408 15409 protected MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent( 15410 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15411 MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent res = new MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent(); 15412 parseBackboneAttributes(xpp, res); 15413 next(xpp); 15414 int eventType = nextNoWhitespace(xpp); 15415 while (eventType != XmlPullParser.END_TAG) { 15416 if (!parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentContent(eventType, xpp, owner, res)) 15417 unknownContent(xpp); 15418 eventType = nextNoWhitespace(xpp); 15419 } 15420 next(xpp); 15421 parseElementClose(res); 15422 return res; 15423 } 15424 15425 protected boolean parseMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentContent(int eventType, 15426 XmlPullParser xpp, MedicationKnowledge owner, 15427 MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent res) 15428 throws XmlPullParserException, IOException, FHIRFormatError { 15429 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 15430 res.setQuantity(parseQuantity(xpp)); 15431 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 15432 res.setPeriod(parseDuration(xpp)); 15433 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15434 return false; 15435 return true; 15436 } 15437 15438 protected MedicationKnowledge.MedicationKnowledgeKineticsComponent parseMedicationKnowledgeMedicationKnowledgeKineticsComponent( 15439 XmlPullParser xpp, MedicationKnowledge owner) throws XmlPullParserException, IOException, FHIRFormatError { 15440 MedicationKnowledge.MedicationKnowledgeKineticsComponent res = new MedicationKnowledge.MedicationKnowledgeKineticsComponent(); 15441 parseBackboneAttributes(xpp, res); 15442 next(xpp); 15443 int eventType = nextNoWhitespace(xpp); 15444 while (eventType != XmlPullParser.END_TAG) { 15445 if (!parseMedicationKnowledgeMedicationKnowledgeKineticsComponentContent(eventType, xpp, owner, res)) 15446 unknownContent(xpp); 15447 eventType = nextNoWhitespace(xpp); 15448 } 15449 next(xpp); 15450 parseElementClose(res); 15451 return res; 15452 } 15453 15454 protected boolean parseMedicationKnowledgeMedicationKnowledgeKineticsComponentContent(int eventType, 15455 XmlPullParser xpp, MedicationKnowledge owner, MedicationKnowledge.MedicationKnowledgeKineticsComponent res) 15456 throws XmlPullParserException, IOException, FHIRFormatError { 15457 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("areaUnderCurve")) { 15458 res.getAreaUnderCurve().add(parseQuantity(xpp)); 15459 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lethalDose50")) { 15460 res.getLethalDose50().add(parseQuantity(xpp)); 15461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("halfLifePeriod")) { 15462 res.setHalfLifePeriod(parseDuration(xpp)); 15463 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15464 return false; 15465 return true; 15466 } 15467 15468 protected MedicationRequest parseMedicationRequest(XmlPullParser xpp) 15469 throws XmlPullParserException, IOException, FHIRFormatError { 15470 MedicationRequest res = new MedicationRequest(); 15471 parseDomainResourceAttributes(xpp, res); 15472 next(xpp); 15473 int eventType = nextNoWhitespace(xpp); 15474 while (eventType != XmlPullParser.END_TAG) { 15475 if (!parseMedicationRequestContent(eventType, xpp, res)) 15476 unknownContent(xpp); 15477 eventType = nextNoWhitespace(xpp); 15478 } 15479 next(xpp); 15480 parseElementClose(res); 15481 return res; 15482 } 15483 15484 protected boolean parseMedicationRequestContent(int eventType, XmlPullParser xpp, MedicationRequest res) 15485 throws XmlPullParserException, IOException, FHIRFormatError { 15486 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 15487 res.getIdentifier().add(parseIdentifier(xpp)); 15488 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 15489 res.setStatusElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestStatus.NULL, 15490 new MedicationRequest.MedicationRequestStatusEnumFactory())); 15491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 15492 res.setStatusReason(parseCodeableConcept(xpp)); 15493 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 15494 res.setIntentElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestIntent.NULL, 15495 new MedicationRequest.MedicationRequestIntentEnumFactory())); 15496 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 15497 res.getCategory().add(parseCodeableConcept(xpp)); 15498 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 15499 res.setPriorityElement(parseEnumeration(xpp, MedicationRequest.MedicationRequestPriority.NULL, 15500 new MedicationRequest.MedicationRequestPriorityEnumFactory())); 15501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 15502 res.setDoNotPerformElement(parseBoolean(xpp)); 15503 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "reported")) { 15504 res.setReported(parseType("reported", xpp)); 15505 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 15506 res.setMedication(parseType("medication", xpp)); 15507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 15508 res.setSubject(parseReference(xpp)); 15509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 15510 res.setEncounter(parseReference(xpp)); 15511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 15512 res.getSupportingInformation().add(parseReference(xpp)); 15513 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 15514 res.setAuthoredOnElement(parseDateTime(xpp)); 15515 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 15516 res.setRequester(parseReference(xpp)); 15517 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 15518 res.setPerformer(parseReference(xpp)); 15519 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { 15520 res.setPerformerType(parseCodeableConcept(xpp)); 15521 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { 15522 res.setRecorder(parseReference(xpp)); 15523 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 15524 res.getReasonCode().add(parseCodeableConcept(xpp)); 15525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 15526 res.getReasonReference().add(parseReference(xpp)); 15527 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 15528 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 15529 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 15530 res.getInstantiatesUri().add(parseUri(xpp)); 15531 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 15532 res.getBasedOn().add(parseReference(xpp)); 15533 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { 15534 res.setGroupIdentifier(parseIdentifier(xpp)); 15535 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("courseOfTherapyType")) { 15536 res.setCourseOfTherapyType(parseCodeableConcept(xpp)); 15537 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 15538 res.getInsurance().add(parseReference(xpp)); 15539 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 15540 res.getNote().add(parseAnnotation(xpp)); 15541 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosageInstruction")) { 15542 res.getDosageInstruction().add(parseDosage(xpp)); 15543 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispenseRequest")) { 15544 res.setDispenseRequest(parseMedicationRequestMedicationRequestDispenseRequestComponent(xpp, res)); 15545 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { 15546 res.setSubstitution(parseMedicationRequestMedicationRequestSubstitutionComponent(xpp, res)); 15547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priorPrescription")) { 15548 res.setPriorPrescription(parseReference(xpp)); 15549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detectedIssue")) { 15550 res.getDetectedIssue().add(parseReference(xpp)); 15551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eventHistory")) { 15552 res.getEventHistory().add(parseReference(xpp)); 15553 } else if (!parseDomainResourceContent(eventType, xpp, res)) 15554 return false; 15555 return true; 15556 } 15557 15558 protected MedicationRequest.MedicationRequestDispenseRequestComponent parseMedicationRequestMedicationRequestDispenseRequestComponent( 15559 XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 15560 MedicationRequest.MedicationRequestDispenseRequestComponent res = new MedicationRequest.MedicationRequestDispenseRequestComponent(); 15561 parseBackboneAttributes(xpp, res); 15562 next(xpp); 15563 int eventType = nextNoWhitespace(xpp); 15564 while (eventType != XmlPullParser.END_TAG) { 15565 if (!parseMedicationRequestMedicationRequestDispenseRequestComponentContent(eventType, xpp, owner, res)) 15566 unknownContent(xpp); 15567 eventType = nextNoWhitespace(xpp); 15568 } 15569 next(xpp); 15570 parseElementClose(res); 15571 return res; 15572 } 15573 15574 protected boolean parseMedicationRequestMedicationRequestDispenseRequestComponentContent(int eventType, 15575 XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestDispenseRequestComponent res) 15576 throws XmlPullParserException, IOException, FHIRFormatError { 15577 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initialFill")) { 15578 res.setInitialFill(parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponent(xpp, owner)); 15579 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dispenseInterval")) { 15580 res.setDispenseInterval(parseDuration(xpp)); 15581 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { 15582 res.setValidityPeriod(parsePeriod(xpp)); 15583 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfRepeatsAllowed")) { 15584 res.setNumberOfRepeatsAllowedElement(parseUnsignedInt(xpp)); 15585 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 15586 res.setQuantity(parseQuantity(xpp)); 15587 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expectedSupplyDuration")) { 15588 res.setExpectedSupplyDuration(parseDuration(xpp)); 15589 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 15590 res.setPerformer(parseReference(xpp)); 15591 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15592 return false; 15593 return true; 15594 } 15595 15596 protected MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponent( 15597 XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 15598 MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent res = new MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent(); 15599 parseBackboneAttributes(xpp, res); 15600 next(xpp); 15601 int eventType = nextNoWhitespace(xpp); 15602 while (eventType != XmlPullParser.END_TAG) { 15603 if (!parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponentContent(eventType, xpp, owner, 15604 res)) 15605 unknownContent(xpp); 15606 eventType = nextNoWhitespace(xpp); 15607 } 15608 next(xpp); 15609 parseElementClose(res); 15610 return res; 15611 } 15612 15613 protected boolean parseMedicationRequestMedicationRequestDispenseRequestInitialFillComponentContent(int eventType, 15614 XmlPullParser xpp, MedicationRequest owner, 15615 MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent res) 15616 throws XmlPullParserException, IOException, FHIRFormatError { 15617 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 15618 res.setQuantity(parseQuantity(xpp)); 15619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 15620 res.setDuration(parseDuration(xpp)); 15621 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15622 return false; 15623 return true; 15624 } 15625 15626 protected MedicationRequest.MedicationRequestSubstitutionComponent parseMedicationRequestMedicationRequestSubstitutionComponent( 15627 XmlPullParser xpp, MedicationRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 15628 MedicationRequest.MedicationRequestSubstitutionComponent res = new MedicationRequest.MedicationRequestSubstitutionComponent(); 15629 parseBackboneAttributes(xpp, res); 15630 next(xpp); 15631 int eventType = nextNoWhitespace(xpp); 15632 while (eventType != XmlPullParser.END_TAG) { 15633 if (!parseMedicationRequestMedicationRequestSubstitutionComponentContent(eventType, xpp, owner, res)) 15634 unknownContent(xpp); 15635 eventType = nextNoWhitespace(xpp); 15636 } 15637 next(xpp); 15638 parseElementClose(res); 15639 return res; 15640 } 15641 15642 protected boolean parseMedicationRequestMedicationRequestSubstitutionComponentContent(int eventType, 15643 XmlPullParser xpp, MedicationRequest owner, MedicationRequest.MedicationRequestSubstitutionComponent res) 15644 throws XmlPullParserException, IOException, FHIRFormatError { 15645 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "allowed")) { 15646 res.setAllowed(parseType("allowed", xpp)); 15647 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 15648 res.setReason(parseCodeableConcept(xpp)); 15649 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15650 return false; 15651 return true; 15652 } 15653 15654 protected MedicationStatement parseMedicationStatement(XmlPullParser xpp) 15655 throws XmlPullParserException, IOException, FHIRFormatError { 15656 MedicationStatement res = new MedicationStatement(); 15657 parseDomainResourceAttributes(xpp, res); 15658 next(xpp); 15659 int eventType = nextNoWhitespace(xpp); 15660 while (eventType != XmlPullParser.END_TAG) { 15661 if (!parseMedicationStatementContent(eventType, xpp, res)) 15662 unknownContent(xpp); 15663 eventType = nextNoWhitespace(xpp); 15664 } 15665 next(xpp); 15666 parseElementClose(res); 15667 return res; 15668 } 15669 15670 protected boolean parseMedicationStatementContent(int eventType, XmlPullParser xpp, MedicationStatement res) 15671 throws XmlPullParserException, IOException, FHIRFormatError { 15672 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 15673 res.getIdentifier().add(parseIdentifier(xpp)); 15674 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 15675 res.getBasedOn().add(parseReference(xpp)); 15676 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 15677 res.getPartOf().add(parseReference(xpp)); 15678 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 15679 res.setStatusElement(parseEnumeration(xpp, MedicationStatement.MedicationStatementStatus.NULL, 15680 new MedicationStatement.MedicationStatementStatusEnumFactory())); 15681 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 15682 res.getStatusReason().add(parseCodeableConcept(xpp)); 15683 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 15684 res.setCategory(parseCodeableConcept(xpp)); 15685 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 15686 res.setMedication(parseType("medication", xpp)); 15687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 15688 res.setSubject(parseReference(xpp)); 15689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 15690 res.setContext(parseReference(xpp)); 15691 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { 15692 res.setEffective(parseType("effective", xpp)); 15693 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateAsserted")) { 15694 res.setDateAssertedElement(parseDateTime(xpp)); 15695 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("informationSource")) { 15696 res.setInformationSource(parseReference(xpp)); 15697 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { 15698 res.getDerivedFrom().add(parseReference(xpp)); 15699 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 15700 res.getReasonCode().add(parseCodeableConcept(xpp)); 15701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 15702 res.getReasonReference().add(parseReference(xpp)); 15703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 15704 res.getNote().add(parseAnnotation(xpp)); 15705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dosage")) { 15706 res.getDosage().add(parseDosage(xpp)); 15707 } else if (!parseDomainResourceContent(eventType, xpp, res)) 15708 return false; 15709 return true; 15710 } 15711 15712 protected MedicinalProduct parseMedicinalProduct(XmlPullParser xpp) 15713 throws XmlPullParserException, IOException, FHIRFormatError { 15714 MedicinalProduct res = new MedicinalProduct(); 15715 parseDomainResourceAttributes(xpp, res); 15716 next(xpp); 15717 int eventType = nextNoWhitespace(xpp); 15718 while (eventType != XmlPullParser.END_TAG) { 15719 if (!parseMedicinalProductContent(eventType, xpp, res)) 15720 unknownContent(xpp); 15721 eventType = nextNoWhitespace(xpp); 15722 } 15723 next(xpp); 15724 parseElementClose(res); 15725 return res; 15726 } 15727 15728 protected boolean parseMedicinalProductContent(int eventType, XmlPullParser xpp, MedicinalProduct res) 15729 throws XmlPullParserException, IOException, FHIRFormatError { 15730 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 15731 res.getIdentifier().add(parseIdentifier(xpp)); 15732 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15733 res.setType(parseCodeableConcept(xpp)); 15734 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { 15735 res.setDomain(parseCoding(xpp)); 15736 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("combinedPharmaceuticalDoseForm")) { 15737 res.setCombinedPharmaceuticalDoseForm(parseCodeableConcept(xpp)); 15738 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legalStatusOfSupply")) { 15739 res.setLegalStatusOfSupply(parseCodeableConcept(xpp)); 15740 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additionalMonitoringIndicator")) { 15741 res.setAdditionalMonitoringIndicator(parseCodeableConcept(xpp)); 15742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialMeasures")) { 15743 res.getSpecialMeasures().add(parseString(xpp)); 15744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paediatricUseIndicator")) { 15745 res.setPaediatricUseIndicator(parseCodeableConcept(xpp)); 15746 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productClassification")) { 15747 res.getProductClassification().add(parseCodeableConcept(xpp)); 15748 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("marketingStatus")) { 15749 res.getMarketingStatus().add(parseMarketingStatus(xpp)); 15750 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pharmaceuticalProduct")) { 15751 res.getPharmaceuticalProduct().add(parseReference(xpp)); 15752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packagedMedicinalProduct")) { 15753 res.getPackagedMedicinalProduct().add(parseReference(xpp)); 15754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachedDocument")) { 15755 res.getAttachedDocument().add(parseReference(xpp)); 15756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("masterFile")) { 15757 res.getMasterFile().add(parseReference(xpp)); 15758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 15759 res.getContact().add(parseReference(xpp)); 15760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("clinicalTrial")) { 15761 res.getClinicalTrial().add(parseReference(xpp)); 15762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 15763 res.getName().add(parseMedicinalProductMedicinalProductNameComponent(xpp, res)); 15764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("crossReference")) { 15765 res.getCrossReference().add(parseIdentifier(xpp)); 15766 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturingBusinessOperation")) { 15767 res.getManufacturingBusinessOperation() 15768 .add(parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(xpp, res)); 15769 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialDesignation")) { 15770 res.getSpecialDesignation().add(parseMedicinalProductMedicinalProductSpecialDesignationComponent(xpp, res)); 15771 } else if (!parseDomainResourceContent(eventType, xpp, res)) 15772 return false; 15773 return true; 15774 } 15775 15776 protected MedicinalProduct.MedicinalProductNameComponent parseMedicinalProductMedicinalProductNameComponent( 15777 XmlPullParser xpp, MedicinalProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 15778 MedicinalProduct.MedicinalProductNameComponent res = new MedicinalProduct.MedicinalProductNameComponent(); 15779 parseBackboneAttributes(xpp, res); 15780 next(xpp); 15781 int eventType = nextNoWhitespace(xpp); 15782 while (eventType != XmlPullParser.END_TAG) { 15783 if (!parseMedicinalProductMedicinalProductNameComponentContent(eventType, xpp, owner, res)) 15784 unknownContent(xpp); 15785 eventType = nextNoWhitespace(xpp); 15786 } 15787 next(xpp); 15788 parseElementClose(res); 15789 return res; 15790 } 15791 15792 protected boolean parseMedicinalProductMedicinalProductNameComponentContent(int eventType, XmlPullParser xpp, 15793 MedicinalProduct owner, MedicinalProduct.MedicinalProductNameComponent res) 15794 throws XmlPullParserException, IOException, FHIRFormatError { 15795 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productName")) { 15796 res.setProductNameElement(parseString(xpp)); 15797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("namePart")) { 15798 res.getNamePart().add(parseMedicinalProductMedicinalProductNameNamePartComponent(xpp, owner)); 15799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("countryLanguage")) { 15800 res.getCountryLanguage().add(parseMedicinalProductMedicinalProductNameCountryLanguageComponent(xpp, owner)); 15801 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15802 return false; 15803 return true; 15804 } 15805 15806 protected MedicinalProduct.MedicinalProductNameNamePartComponent parseMedicinalProductMedicinalProductNameNamePartComponent( 15807 XmlPullParser xpp, MedicinalProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 15808 MedicinalProduct.MedicinalProductNameNamePartComponent res = new MedicinalProduct.MedicinalProductNameNamePartComponent(); 15809 parseBackboneAttributes(xpp, res); 15810 next(xpp); 15811 int eventType = nextNoWhitespace(xpp); 15812 while (eventType != XmlPullParser.END_TAG) { 15813 if (!parseMedicinalProductMedicinalProductNameNamePartComponentContent(eventType, xpp, owner, res)) 15814 unknownContent(xpp); 15815 eventType = nextNoWhitespace(xpp); 15816 } 15817 next(xpp); 15818 parseElementClose(res); 15819 return res; 15820 } 15821 15822 protected boolean parseMedicinalProductMedicinalProductNameNamePartComponentContent(int eventType, XmlPullParser xpp, 15823 MedicinalProduct owner, MedicinalProduct.MedicinalProductNameNamePartComponent res) 15824 throws XmlPullParserException, IOException, FHIRFormatError { 15825 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { 15826 res.setPartElement(parseString(xpp)); 15827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15828 res.setType(parseCoding(xpp)); 15829 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15830 return false; 15831 return true; 15832 } 15833 15834 protected MedicinalProduct.MedicinalProductNameCountryLanguageComponent parseMedicinalProductMedicinalProductNameCountryLanguageComponent( 15835 XmlPullParser xpp, MedicinalProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 15836 MedicinalProduct.MedicinalProductNameCountryLanguageComponent res = new MedicinalProduct.MedicinalProductNameCountryLanguageComponent(); 15837 parseBackboneAttributes(xpp, res); 15838 next(xpp); 15839 int eventType = nextNoWhitespace(xpp); 15840 while (eventType != XmlPullParser.END_TAG) { 15841 if (!parseMedicinalProductMedicinalProductNameCountryLanguageComponentContent(eventType, xpp, owner, res)) 15842 unknownContent(xpp); 15843 eventType = nextNoWhitespace(xpp); 15844 } 15845 next(xpp); 15846 parseElementClose(res); 15847 return res; 15848 } 15849 15850 protected boolean parseMedicinalProductMedicinalProductNameCountryLanguageComponentContent(int eventType, 15851 XmlPullParser xpp, MedicinalProduct owner, MedicinalProduct.MedicinalProductNameCountryLanguageComponent res) 15852 throws XmlPullParserException, IOException, FHIRFormatError { 15853 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 15854 res.setCountry(parseCodeableConcept(xpp)); 15855 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 15856 res.setJurisdiction(parseCodeableConcept(xpp)); 15857 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 15858 res.setLanguage(parseCodeableConcept(xpp)); 15859 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15860 return false; 15861 return true; 15862 } 15863 15864 protected MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponent( 15865 XmlPullParser xpp, MedicinalProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 15866 MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent res = new MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent(); 15867 parseBackboneAttributes(xpp, res); 15868 next(xpp); 15869 int eventType = nextNoWhitespace(xpp); 15870 while (eventType != XmlPullParser.END_TAG) { 15871 if (!parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponentContent(eventType, xpp, owner, 15872 res)) 15873 unknownContent(xpp); 15874 eventType = nextNoWhitespace(xpp); 15875 } 15876 next(xpp); 15877 parseElementClose(res); 15878 return res; 15879 } 15880 15881 protected boolean parseMedicinalProductMedicinalProductManufacturingBusinessOperationComponentContent(int eventType, 15882 XmlPullParser xpp, MedicinalProduct owner, 15883 MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent res) 15884 throws XmlPullParserException, IOException, FHIRFormatError { 15885 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operationType")) { 15886 res.setOperationType(parseCodeableConcept(xpp)); 15887 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorisationReferenceNumber")) { 15888 res.setAuthorisationReferenceNumber(parseIdentifier(xpp)); 15889 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectiveDate")) { 15890 res.setEffectiveDateElement(parseDateTime(xpp)); 15891 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("confidentialityIndicator")) { 15892 res.setConfidentialityIndicator(parseCodeableConcept(xpp)); 15893 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 15894 res.getManufacturer().add(parseReference(xpp)); 15895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("regulator")) { 15896 res.setRegulator(parseReference(xpp)); 15897 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15898 return false; 15899 return true; 15900 } 15901 15902 protected MedicinalProduct.MedicinalProductSpecialDesignationComponent parseMedicinalProductMedicinalProductSpecialDesignationComponent( 15903 XmlPullParser xpp, MedicinalProduct owner) throws XmlPullParserException, IOException, FHIRFormatError { 15904 MedicinalProduct.MedicinalProductSpecialDesignationComponent res = new MedicinalProduct.MedicinalProductSpecialDesignationComponent(); 15905 parseBackboneAttributes(xpp, res); 15906 next(xpp); 15907 int eventType = nextNoWhitespace(xpp); 15908 while (eventType != XmlPullParser.END_TAG) { 15909 if (!parseMedicinalProductMedicinalProductSpecialDesignationComponentContent(eventType, xpp, owner, res)) 15910 unknownContent(xpp); 15911 eventType = nextNoWhitespace(xpp); 15912 } 15913 next(xpp); 15914 parseElementClose(res); 15915 return res; 15916 } 15917 15918 protected boolean parseMedicinalProductMedicinalProductSpecialDesignationComponentContent(int eventType, 15919 XmlPullParser xpp, MedicinalProduct owner, MedicinalProduct.MedicinalProductSpecialDesignationComponent res) 15920 throws XmlPullParserException, IOException, FHIRFormatError { 15921 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 15922 res.getIdentifier().add(parseIdentifier(xpp)); 15923 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 15924 res.setType(parseCodeableConcept(xpp)); 15925 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intendedUse")) { 15926 res.setIntendedUse(parseCodeableConcept(xpp)); 15927 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "indication")) { 15928 res.setIndication(parseType("indication", xpp)); 15929 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 15930 res.setStatus(parseCodeableConcept(xpp)); 15931 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 15932 res.setDateElement(parseDateTime(xpp)); 15933 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("species")) { 15934 res.setSpecies(parseCodeableConcept(xpp)); 15935 } else if (!parseBackboneElementContent(eventType, xpp, res)) 15936 return false; 15937 return true; 15938 } 15939 15940 protected MedicinalProductAuthorization parseMedicinalProductAuthorization(XmlPullParser xpp) 15941 throws XmlPullParserException, IOException, FHIRFormatError { 15942 MedicinalProductAuthorization res = new MedicinalProductAuthorization(); 15943 parseDomainResourceAttributes(xpp, res); 15944 next(xpp); 15945 int eventType = nextNoWhitespace(xpp); 15946 while (eventType != XmlPullParser.END_TAG) { 15947 if (!parseMedicinalProductAuthorizationContent(eventType, xpp, res)) 15948 unknownContent(xpp); 15949 eventType = nextNoWhitespace(xpp); 15950 } 15951 next(xpp); 15952 parseElementClose(res); 15953 return res; 15954 } 15955 15956 protected boolean parseMedicinalProductAuthorizationContent(int eventType, XmlPullParser xpp, 15957 MedicinalProductAuthorization res) throws XmlPullParserException, IOException, FHIRFormatError { 15958 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 15959 res.getIdentifier().add(parseIdentifier(xpp)); 15960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 15961 res.setSubject(parseReference(xpp)); 15962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 15963 res.getCountry().add(parseCodeableConcept(xpp)); 15964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 15965 res.getJurisdiction().add(parseCodeableConcept(xpp)); 15966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 15967 res.setStatus(parseCodeableConcept(xpp)); 15968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { 15969 res.setStatusDateElement(parseDateTime(xpp)); 15970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("restoreDate")) { 15971 res.setRestoreDateElement(parseDateTime(xpp)); 15972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { 15973 res.setValidityPeriod(parsePeriod(xpp)); 15974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataExclusivityPeriod")) { 15975 res.setDataExclusivityPeriod(parsePeriod(xpp)); 15976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateOfFirstAuthorization")) { 15977 res.setDateOfFirstAuthorizationElement(parseDateTime(xpp)); 15978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("internationalBirthDate")) { 15979 res.setInternationalBirthDateElement(parseDateTime(xpp)); 15980 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legalBasis")) { 15981 res.setLegalBasis(parseCodeableConcept(xpp)); 15982 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdictionalAuthorization")) { 15983 res.getJurisdictionalAuthorization() 15984 .add(parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(xpp, 15985 res)); 15986 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("holder")) { 15987 res.setHolder(parseReference(xpp)); 15988 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("regulator")) { 15989 res.setRegulator(parseReference(xpp)); 15990 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { 15991 res.setProcedure(parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(xpp, res)); 15992 } else if (!parseDomainResourceContent(eventType, xpp, res)) 15993 return false; 15994 return true; 15995 } 15996 15997 protected MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent( 15998 XmlPullParser xpp, MedicinalProductAuthorization owner) 15999 throws XmlPullParserException, IOException, FHIRFormatError { 16000 MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent res = new MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent(); 16001 parseBackboneAttributes(xpp, res); 16002 next(xpp); 16003 int eventType = nextNoWhitespace(xpp); 16004 while (eventType != XmlPullParser.END_TAG) { 16005 if (!parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentContent( 16006 eventType, xpp, owner, res)) 16007 unknownContent(xpp); 16008 eventType = nextNoWhitespace(xpp); 16009 } 16010 next(xpp); 16011 parseElementClose(res); 16012 return res; 16013 } 16014 16015 protected boolean parseMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentContent( 16016 int eventType, XmlPullParser xpp, MedicinalProductAuthorization owner, 16017 MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent res) 16018 throws XmlPullParserException, IOException, FHIRFormatError { 16019 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16020 res.getIdentifier().add(parseIdentifier(xpp)); 16021 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 16022 res.setCountry(parseCodeableConcept(xpp)); 16023 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 16024 res.getJurisdiction().add(parseCodeableConcept(xpp)); 16025 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legalStatusOfSupply")) { 16026 res.setLegalStatusOfSupply(parseCodeableConcept(xpp)); 16027 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validityPeriod")) { 16028 res.setValidityPeriod(parsePeriod(xpp)); 16029 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16030 return false; 16031 return true; 16032 } 16033 16034 protected MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent( 16035 XmlPullParser xpp, MedicinalProductAuthorization owner) 16036 throws XmlPullParserException, IOException, FHIRFormatError { 16037 MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent res = new MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent(); 16038 parseBackboneAttributes(xpp, res); 16039 next(xpp); 16040 int eventType = nextNoWhitespace(xpp); 16041 while (eventType != XmlPullParser.END_TAG) { 16042 if (!parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentContent(eventType, xpp, 16043 owner, res)) 16044 unknownContent(xpp); 16045 eventType = nextNoWhitespace(xpp); 16046 } 16047 next(xpp); 16048 parseElementClose(res); 16049 return res; 16050 } 16051 16052 protected boolean parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentContent( 16053 int eventType, XmlPullParser xpp, MedicinalProductAuthorization owner, 16054 MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent res) 16055 throws XmlPullParserException, IOException, FHIRFormatError { 16056 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16057 res.setIdentifier(parseIdentifier(xpp)); 16058 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 16059 res.setType(parseCodeableConcept(xpp)); 16060 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "date")) { 16061 res.setDate(parseType("date", xpp)); 16062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("application")) { 16063 res.getApplication() 16064 .add(parseMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(xpp, owner)); 16065 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16066 return false; 16067 return true; 16068 } 16069 16070 protected MedicinalProductContraindication parseMedicinalProductContraindication(XmlPullParser xpp) 16071 throws XmlPullParserException, IOException, FHIRFormatError { 16072 MedicinalProductContraindication res = new MedicinalProductContraindication(); 16073 parseDomainResourceAttributes(xpp, res); 16074 next(xpp); 16075 int eventType = nextNoWhitespace(xpp); 16076 while (eventType != XmlPullParser.END_TAG) { 16077 if (!parseMedicinalProductContraindicationContent(eventType, xpp, res)) 16078 unknownContent(xpp); 16079 eventType = nextNoWhitespace(xpp); 16080 } 16081 next(xpp); 16082 parseElementClose(res); 16083 return res; 16084 } 16085 16086 protected boolean parseMedicinalProductContraindicationContent(int eventType, XmlPullParser xpp, 16087 MedicinalProductContraindication res) throws XmlPullParserException, IOException, FHIRFormatError { 16088 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 16089 res.getSubject().add(parseReference(xpp)); 16090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disease")) { 16091 res.setDisease(parseCodeableConcept(xpp)); 16092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diseaseStatus")) { 16093 res.setDiseaseStatus(parseCodeableConcept(xpp)); 16094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comorbidity")) { 16095 res.getComorbidity().add(parseCodeableConcept(xpp)); 16096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("therapeuticIndication")) { 16097 res.getTherapeuticIndication().add(parseReference(xpp)); 16098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("otherTherapy")) { 16099 res.getOtherTherapy() 16100 .add(parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent(xpp, res)); 16101 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 16102 res.getPopulation().add(parsePopulation(xpp)); 16103 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16104 return false; 16105 return true; 16106 } 16107 16108 protected MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent( 16109 XmlPullParser xpp, MedicinalProductContraindication owner) 16110 throws XmlPullParserException, IOException, FHIRFormatError { 16111 MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent res = new MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent(); 16112 parseBackboneAttributes(xpp, res); 16113 next(xpp); 16114 int eventType = nextNoWhitespace(xpp); 16115 while (eventType != XmlPullParser.END_TAG) { 16116 if (!parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentContent(eventType, 16117 xpp, owner, res)) 16118 unknownContent(xpp); 16119 eventType = nextNoWhitespace(xpp); 16120 } 16121 next(xpp); 16122 parseElementClose(res); 16123 return res; 16124 } 16125 16126 protected boolean parseMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentContent( 16127 int eventType, XmlPullParser xpp, MedicinalProductContraindication owner, 16128 MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent res) 16129 throws XmlPullParserException, IOException, FHIRFormatError { 16130 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("therapyRelationshipType")) { 16131 res.setTherapyRelationshipType(parseCodeableConcept(xpp)); 16132 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 16133 res.setMedication(parseType("medication", xpp)); 16134 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16135 return false; 16136 return true; 16137 } 16138 16139 protected MedicinalProductIndication parseMedicinalProductIndication(XmlPullParser xpp) 16140 throws XmlPullParserException, IOException, FHIRFormatError { 16141 MedicinalProductIndication res = new MedicinalProductIndication(); 16142 parseDomainResourceAttributes(xpp, res); 16143 next(xpp); 16144 int eventType = nextNoWhitespace(xpp); 16145 while (eventType != XmlPullParser.END_TAG) { 16146 if (!parseMedicinalProductIndicationContent(eventType, xpp, res)) 16147 unknownContent(xpp); 16148 eventType = nextNoWhitespace(xpp); 16149 } 16150 next(xpp); 16151 parseElementClose(res); 16152 return res; 16153 } 16154 16155 protected boolean parseMedicinalProductIndicationContent(int eventType, XmlPullParser xpp, 16156 MedicinalProductIndication res) throws XmlPullParserException, IOException, FHIRFormatError { 16157 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 16158 res.getSubject().add(parseReference(xpp)); 16159 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diseaseSymptomProcedure")) { 16160 res.setDiseaseSymptomProcedure(parseCodeableConcept(xpp)); 16161 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diseaseStatus")) { 16162 res.setDiseaseStatus(parseCodeableConcept(xpp)); 16163 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comorbidity")) { 16164 res.getComorbidity().add(parseCodeableConcept(xpp)); 16165 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intendedEffect")) { 16166 res.setIntendedEffect(parseCodeableConcept(xpp)); 16167 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 16168 res.setDuration(parseQuantity(xpp)); 16169 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("otherTherapy")) { 16170 res.getOtherTherapy() 16171 .add(parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(xpp, res)); 16172 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("undesirableEffect")) { 16173 res.getUndesirableEffect().add(parseReference(xpp)); 16174 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 16175 res.getPopulation().add(parsePopulation(xpp)); 16176 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16177 return false; 16178 return true; 16179 } 16180 16181 protected MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent( 16182 XmlPullParser xpp, MedicinalProductIndication owner) throws XmlPullParserException, IOException, FHIRFormatError { 16183 MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent res = new MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent(); 16184 parseBackboneAttributes(xpp, res); 16185 next(xpp); 16186 int eventType = nextNoWhitespace(xpp); 16187 while (eventType != XmlPullParser.END_TAG) { 16188 if (!parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentContent(eventType, xpp, owner, 16189 res)) 16190 unknownContent(xpp); 16191 eventType = nextNoWhitespace(xpp); 16192 } 16193 next(xpp); 16194 parseElementClose(res); 16195 return res; 16196 } 16197 16198 protected boolean parseMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentContent(int eventType, 16199 XmlPullParser xpp, MedicinalProductIndication owner, 16200 MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent res) 16201 throws XmlPullParserException, IOException, FHIRFormatError { 16202 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("therapyRelationshipType")) { 16203 res.setTherapyRelationshipType(parseCodeableConcept(xpp)); 16204 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "medication")) { 16205 res.setMedication(parseType("medication", xpp)); 16206 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16207 return false; 16208 return true; 16209 } 16210 16211 protected MedicinalProductIngredient parseMedicinalProductIngredient(XmlPullParser xpp) 16212 throws XmlPullParserException, IOException, FHIRFormatError { 16213 MedicinalProductIngredient res = new MedicinalProductIngredient(); 16214 parseDomainResourceAttributes(xpp, res); 16215 next(xpp); 16216 int eventType = nextNoWhitespace(xpp); 16217 while (eventType != XmlPullParser.END_TAG) { 16218 if (!parseMedicinalProductIngredientContent(eventType, xpp, res)) 16219 unknownContent(xpp); 16220 eventType = nextNoWhitespace(xpp); 16221 } 16222 next(xpp); 16223 parseElementClose(res); 16224 return res; 16225 } 16226 16227 protected boolean parseMedicinalProductIngredientContent(int eventType, XmlPullParser xpp, 16228 MedicinalProductIngredient res) throws XmlPullParserException, IOException, FHIRFormatError { 16229 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16230 res.setIdentifier(parseIdentifier(xpp)); 16231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 16232 res.setRole(parseCodeableConcept(xpp)); 16233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allergenicIndicator")) { 16234 res.setAllergenicIndicatorElement(parseBoolean(xpp)); 16235 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 16236 res.getManufacturer().add(parseReference(xpp)); 16237 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specifiedSubstance")) { 16238 res.getSpecifiedSubstance() 16239 .add(parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(xpp, res)); 16240 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { 16241 res.setSubstance(parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent(xpp, res)); 16242 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16243 return false; 16244 return true; 16245 } 16246 16247 protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent( 16248 XmlPullParser xpp, MedicinalProductIngredient owner) throws XmlPullParserException, IOException, FHIRFormatError { 16249 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent(); 16250 parseBackboneAttributes(xpp, res); 16251 next(xpp); 16252 int eventType = nextNoWhitespace(xpp); 16253 while (eventType != XmlPullParser.END_TAG) { 16254 if (!parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentContent(eventType, xpp, 16255 owner, res)) 16256 unknownContent(xpp); 16257 eventType = nextNoWhitespace(xpp); 16258 } 16259 next(xpp); 16260 parseElementClose(res); 16261 return res; 16262 } 16263 16264 protected boolean parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentContent( 16265 int eventType, XmlPullParser xpp, MedicinalProductIngredient owner, 16266 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent res) 16267 throws XmlPullParserException, IOException, FHIRFormatError { 16268 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16269 res.setCode(parseCodeableConcept(xpp)); 16270 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 16271 res.setGroup(parseCodeableConcept(xpp)); 16272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("confidentiality")) { 16273 res.setConfidentiality(parseCodeableConcept(xpp)); 16274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 16275 res.getStrength().add( 16276 parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(xpp, owner)); 16277 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16278 return false; 16279 return true; 16280 } 16281 16282 protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent( 16283 XmlPullParser xpp, MedicinalProductIngredient owner) throws XmlPullParserException, IOException, FHIRFormatError { 16284 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent(); 16285 parseBackboneAttributes(xpp, res); 16286 next(xpp); 16287 int eventType = nextNoWhitespace(xpp); 16288 while (eventType != XmlPullParser.END_TAG) { 16289 if (!parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentContent( 16290 eventType, xpp, owner, res)) 16291 unknownContent(xpp); 16292 eventType = nextNoWhitespace(xpp); 16293 } 16294 next(xpp); 16295 parseElementClose(res); 16296 return res; 16297 } 16298 16299 protected boolean parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentContent( 16300 int eventType, XmlPullParser xpp, MedicinalProductIngredient owner, 16301 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent res) 16302 throws XmlPullParserException, IOException, FHIRFormatError { 16303 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentation")) { 16304 res.setPresentation(parseRatio(xpp)); 16305 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("presentationLowLimit")) { 16306 res.setPresentationLowLimit(parseRatio(xpp)); 16307 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concentration")) { 16308 res.setConcentration(parseRatio(xpp)); 16309 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concentrationLowLimit")) { 16310 res.setConcentrationLowLimit(parseRatio(xpp)); 16311 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPoint")) { 16312 res.setMeasurementPointElement(parseString(xpp)); 16313 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 16314 res.getCountry().add(parseCodeableConcept(xpp)); 16315 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceStrength")) { 16316 res.getReferenceStrength().add( 16317 parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent( 16318 xpp, owner)); 16319 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16320 return false; 16321 return true; 16322 } 16323 16324 protected MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent( 16325 XmlPullParser xpp, MedicinalProductIngredient owner) throws XmlPullParserException, IOException, FHIRFormatError { 16326 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(); 16327 parseBackboneAttributes(xpp, res); 16328 next(xpp); 16329 int eventType = nextNoWhitespace(xpp); 16330 while (eventType != XmlPullParser.END_TAG) { 16331 if (!parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentContent( 16332 eventType, xpp, owner, res)) 16333 unknownContent(xpp); 16334 eventType = nextNoWhitespace(xpp); 16335 } 16336 next(xpp); 16337 parseElementClose(res); 16338 return res; 16339 } 16340 16341 protected boolean parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentContent( 16342 int eventType, XmlPullParser xpp, MedicinalProductIngredient owner, 16343 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent res) 16344 throws XmlPullParserException, IOException, FHIRFormatError { 16345 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substance")) { 16346 res.setSubstance(parseCodeableConcept(xpp)); 16347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 16348 res.setStrength(parseRatio(xpp)); 16349 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strengthLowLimit")) { 16350 res.setStrengthLowLimit(parseRatio(xpp)); 16351 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measurementPoint")) { 16352 res.setMeasurementPointElement(parseString(xpp)); 16353 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("country")) { 16354 res.getCountry().add(parseCodeableConcept(xpp)); 16355 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16356 return false; 16357 return true; 16358 } 16359 16360 protected MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent( 16361 XmlPullParser xpp, MedicinalProductIngredient owner) throws XmlPullParserException, IOException, FHIRFormatError { 16362 MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent res = new MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent(); 16363 parseBackboneAttributes(xpp, res); 16364 next(xpp); 16365 int eventType = nextNoWhitespace(xpp); 16366 while (eventType != XmlPullParser.END_TAG) { 16367 if (!parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentContent(eventType, xpp, owner, 16368 res)) 16369 unknownContent(xpp); 16370 eventType = nextNoWhitespace(xpp); 16371 } 16372 next(xpp); 16373 parseElementClose(res); 16374 return res; 16375 } 16376 16377 protected boolean parseMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentContent(int eventType, 16378 XmlPullParser xpp, MedicinalProductIngredient owner, 16379 MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent res) 16380 throws XmlPullParserException, IOException, FHIRFormatError { 16381 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16382 res.setCode(parseCodeableConcept(xpp)); 16383 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 16384 res.getStrength().add( 16385 parseMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(xpp, owner)); 16386 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16387 return false; 16388 return true; 16389 } 16390 16391 protected MedicinalProductInteraction parseMedicinalProductInteraction(XmlPullParser xpp) 16392 throws XmlPullParserException, IOException, FHIRFormatError { 16393 MedicinalProductInteraction res = new MedicinalProductInteraction(); 16394 parseDomainResourceAttributes(xpp, res); 16395 next(xpp); 16396 int eventType = nextNoWhitespace(xpp); 16397 while (eventType != XmlPullParser.END_TAG) { 16398 if (!parseMedicinalProductInteractionContent(eventType, xpp, res)) 16399 unknownContent(xpp); 16400 eventType = nextNoWhitespace(xpp); 16401 } 16402 next(xpp); 16403 parseElementClose(res); 16404 return res; 16405 } 16406 16407 protected boolean parseMedicinalProductInteractionContent(int eventType, XmlPullParser xpp, 16408 MedicinalProductInteraction res) throws XmlPullParserException, IOException, FHIRFormatError { 16409 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 16410 res.getSubject().add(parseReference(xpp)); 16411 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 16412 res.setDescriptionElement(parseString(xpp)); 16413 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interactant")) { 16414 res.getInteractant() 16415 .add(parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(xpp, res)); 16416 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 16417 res.setType(parseCodeableConcept(xpp)); 16418 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effect")) { 16419 res.setEffect(parseCodeableConcept(xpp)); 16420 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incidence")) { 16421 res.setIncidence(parseCodeableConcept(xpp)); 16422 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("management")) { 16423 res.setManagement(parseCodeableConcept(xpp)); 16424 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16425 return false; 16426 return true; 16427 } 16428 16429 protected MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponent( 16430 XmlPullParser xpp, MedicinalProductInteraction owner) 16431 throws XmlPullParserException, IOException, FHIRFormatError { 16432 MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent res = new MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent(); 16433 parseBackboneAttributes(xpp, res); 16434 next(xpp); 16435 int eventType = nextNoWhitespace(xpp); 16436 while (eventType != XmlPullParser.END_TAG) { 16437 if (!parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponentContent(eventType, xpp, owner, 16438 res)) 16439 unknownContent(xpp); 16440 eventType = nextNoWhitespace(xpp); 16441 } 16442 next(xpp); 16443 parseElementClose(res); 16444 return res; 16445 } 16446 16447 protected boolean parseMedicinalProductInteractionMedicinalProductInteractionInteractantComponentContent( 16448 int eventType, XmlPullParser xpp, MedicinalProductInteraction owner, 16449 MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent res) 16450 throws XmlPullParserException, IOException, FHIRFormatError { 16451 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { 16452 res.setItem(parseType("item", xpp)); 16453 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16454 return false; 16455 return true; 16456 } 16457 16458 protected MedicinalProductManufactured parseMedicinalProductManufactured(XmlPullParser xpp) 16459 throws XmlPullParserException, IOException, FHIRFormatError { 16460 MedicinalProductManufactured res = new MedicinalProductManufactured(); 16461 parseDomainResourceAttributes(xpp, res); 16462 next(xpp); 16463 int eventType = nextNoWhitespace(xpp); 16464 while (eventType != XmlPullParser.END_TAG) { 16465 if (!parseMedicinalProductManufacturedContent(eventType, xpp, res)) 16466 unknownContent(xpp); 16467 eventType = nextNoWhitespace(xpp); 16468 } 16469 next(xpp); 16470 parseElementClose(res); 16471 return res; 16472 } 16473 16474 protected boolean parseMedicinalProductManufacturedContent(int eventType, XmlPullParser xpp, 16475 MedicinalProductManufactured res) throws XmlPullParserException, IOException, FHIRFormatError { 16476 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturedDoseForm")) { 16477 res.setManufacturedDoseForm(parseCodeableConcept(xpp)); 16478 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitOfPresentation")) { 16479 res.setUnitOfPresentation(parseCodeableConcept(xpp)); 16480 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 16481 res.setQuantity(parseQuantity(xpp)); 16482 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 16483 res.getManufacturer().add(parseReference(xpp)); 16484 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { 16485 res.getIngredient().add(parseReference(xpp)); 16486 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalCharacteristics")) { 16487 res.setPhysicalCharacteristics(parseProdCharacteristic(xpp)); 16488 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("otherCharacteristics")) { 16489 res.getOtherCharacteristics().add(parseCodeableConcept(xpp)); 16490 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16491 return false; 16492 return true; 16493 } 16494 16495 protected MedicinalProductPackaged parseMedicinalProductPackaged(XmlPullParser xpp) 16496 throws XmlPullParserException, IOException, FHIRFormatError { 16497 MedicinalProductPackaged res = new MedicinalProductPackaged(); 16498 parseDomainResourceAttributes(xpp, res); 16499 next(xpp); 16500 int eventType = nextNoWhitespace(xpp); 16501 while (eventType != XmlPullParser.END_TAG) { 16502 if (!parseMedicinalProductPackagedContent(eventType, xpp, res)) 16503 unknownContent(xpp); 16504 eventType = nextNoWhitespace(xpp); 16505 } 16506 next(xpp); 16507 parseElementClose(res); 16508 return res; 16509 } 16510 16511 protected boolean parseMedicinalProductPackagedContent(int eventType, XmlPullParser xpp, MedicinalProductPackaged res) 16512 throws XmlPullParserException, IOException, FHIRFormatError { 16513 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16514 res.getIdentifier().add(parseIdentifier(xpp)); 16515 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 16516 res.getSubject().add(parseReference(xpp)); 16517 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 16518 res.setDescriptionElement(parseString(xpp)); 16519 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("legalStatusOfSupply")) { 16520 res.setLegalStatusOfSupply(parseCodeableConcept(xpp)); 16521 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("marketingStatus")) { 16522 res.getMarketingStatus().add(parseMarketingStatus(xpp)); 16523 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("marketingAuthorization")) { 16524 res.setMarketingAuthorization(parseReference(xpp)); 16525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 16526 res.getManufacturer().add(parseReference(xpp)); 16527 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("batchIdentifier")) { 16528 res.getBatchIdentifier() 16529 .add(parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(xpp, res)); 16530 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageItem")) { 16531 res.getPackageItem().add(parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(xpp, res)); 16532 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16533 return false; 16534 return true; 16535 } 16536 16537 protected MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent( 16538 XmlPullParser xpp, MedicinalProductPackaged owner) throws XmlPullParserException, IOException, FHIRFormatError { 16539 MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent res = new MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent(); 16540 parseBackboneAttributes(xpp, res); 16541 next(xpp); 16542 int eventType = nextNoWhitespace(xpp); 16543 while (eventType != XmlPullParser.END_TAG) { 16544 if (!parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentContent(eventType, xpp, owner, 16545 res)) 16546 unknownContent(xpp); 16547 eventType = nextNoWhitespace(xpp); 16548 } 16549 next(xpp); 16550 parseElementClose(res); 16551 return res; 16552 } 16553 16554 protected boolean parseMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentContent(int eventType, 16555 XmlPullParser xpp, MedicinalProductPackaged owner, 16556 MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent res) 16557 throws XmlPullParserException, IOException, FHIRFormatError { 16558 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outerPackaging")) { 16559 res.setOuterPackaging(parseIdentifier(xpp)); 16560 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("immediatePackaging")) { 16561 res.setImmediatePackaging(parseIdentifier(xpp)); 16562 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16563 return false; 16564 return true; 16565 } 16566 16567 protected MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent( 16568 XmlPullParser xpp, MedicinalProductPackaged owner) throws XmlPullParserException, IOException, FHIRFormatError { 16569 MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent res = new MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent(); 16570 parseBackboneAttributes(xpp, res); 16571 next(xpp); 16572 int eventType = nextNoWhitespace(xpp); 16573 while (eventType != XmlPullParser.END_TAG) { 16574 if (!parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentContent(eventType, xpp, owner, res)) 16575 unknownContent(xpp); 16576 eventType = nextNoWhitespace(xpp); 16577 } 16578 next(xpp); 16579 parseElementClose(res); 16580 return res; 16581 } 16582 16583 protected boolean parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentContent(int eventType, 16584 XmlPullParser xpp, MedicinalProductPackaged owner, 16585 MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent res) 16586 throws XmlPullParserException, IOException, FHIRFormatError { 16587 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16588 res.getIdentifier().add(parseIdentifier(xpp)); 16589 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 16590 res.setType(parseCodeableConcept(xpp)); 16591 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 16592 res.setQuantity(parseQuantity(xpp)); 16593 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("material")) { 16594 res.getMaterial().add(parseCodeableConcept(xpp)); 16595 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alternateMaterial")) { 16596 res.getAlternateMaterial().add(parseCodeableConcept(xpp)); 16597 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 16598 res.getDevice().add(parseReference(xpp)); 16599 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturedItem")) { 16600 res.getManufacturedItem().add(parseReference(xpp)); 16601 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("packageItem")) { 16602 res.getPackageItem().add(parseMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(xpp, owner)); 16603 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("physicalCharacteristics")) { 16604 res.setPhysicalCharacteristics(parseProdCharacteristic(xpp)); 16605 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("otherCharacteristics")) { 16606 res.getOtherCharacteristics().add(parseCodeableConcept(xpp)); 16607 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shelfLifeStorage")) { 16608 res.getShelfLifeStorage().add(parseProductShelfLife(xpp)); 16609 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manufacturer")) { 16610 res.getManufacturer().add(parseReference(xpp)); 16611 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16612 return false; 16613 return true; 16614 } 16615 16616 protected MedicinalProductPharmaceutical parseMedicinalProductPharmaceutical(XmlPullParser xpp) 16617 throws XmlPullParserException, IOException, FHIRFormatError { 16618 MedicinalProductPharmaceutical res = new MedicinalProductPharmaceutical(); 16619 parseDomainResourceAttributes(xpp, res); 16620 next(xpp); 16621 int eventType = nextNoWhitespace(xpp); 16622 while (eventType != XmlPullParser.END_TAG) { 16623 if (!parseMedicinalProductPharmaceuticalContent(eventType, xpp, res)) 16624 unknownContent(xpp); 16625 eventType = nextNoWhitespace(xpp); 16626 } 16627 next(xpp); 16628 parseElementClose(res); 16629 return res; 16630 } 16631 16632 protected boolean parseMedicinalProductPharmaceuticalContent(int eventType, XmlPullParser xpp, 16633 MedicinalProductPharmaceutical res) throws XmlPullParserException, IOException, FHIRFormatError { 16634 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16635 res.getIdentifier().add(parseIdentifier(xpp)); 16636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administrableDoseForm")) { 16637 res.setAdministrableDoseForm(parseCodeableConcept(xpp)); 16638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitOfPresentation")) { 16639 res.setUnitOfPresentation(parseCodeableConcept(xpp)); 16640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { 16641 res.getIngredient().add(parseReference(xpp)); 16642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 16643 res.getDevice().add(parseReference(xpp)); 16644 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristics")) { 16645 res.getCharacteristics() 16646 .add(parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent(xpp, res)); 16647 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("routeOfAdministration")) { 16648 res.getRouteOfAdministration().add( 16649 parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent(xpp, res)); 16650 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16651 return false; 16652 return true; 16653 } 16654 16655 protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent( 16656 XmlPullParser xpp, MedicinalProductPharmaceutical owner) 16657 throws XmlPullParserException, IOException, FHIRFormatError { 16658 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent(); 16659 parseBackboneAttributes(xpp, res); 16660 next(xpp); 16661 int eventType = nextNoWhitespace(xpp); 16662 while (eventType != XmlPullParser.END_TAG) { 16663 if (!parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentContent(eventType, 16664 xpp, owner, res)) 16665 unknownContent(xpp); 16666 eventType = nextNoWhitespace(xpp); 16667 } 16668 next(xpp); 16669 parseElementClose(res); 16670 return res; 16671 } 16672 16673 protected boolean parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentContent( 16674 int eventType, XmlPullParser xpp, MedicinalProductPharmaceutical owner, 16675 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent res) 16676 throws XmlPullParserException, IOException, FHIRFormatError { 16677 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16678 res.setCode(parseCodeableConcept(xpp)); 16679 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 16680 res.setStatus(parseCodeableConcept(xpp)); 16681 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16682 return false; 16683 return true; 16684 } 16685 16686 protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent( 16687 XmlPullParser xpp, MedicinalProductPharmaceutical owner) 16688 throws XmlPullParserException, IOException, FHIRFormatError { 16689 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent(); 16690 parseBackboneAttributes(xpp, res); 16691 next(xpp); 16692 int eventType = nextNoWhitespace(xpp); 16693 while (eventType != XmlPullParser.END_TAG) { 16694 if (!parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentContent( 16695 eventType, xpp, owner, res)) 16696 unknownContent(xpp); 16697 eventType = nextNoWhitespace(xpp); 16698 } 16699 next(xpp); 16700 parseElementClose(res); 16701 return res; 16702 } 16703 16704 protected boolean parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentContent( 16705 int eventType, XmlPullParser xpp, MedicinalProductPharmaceutical owner, 16706 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent res) 16707 throws XmlPullParserException, IOException, FHIRFormatError { 16708 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16709 res.setCode(parseCodeableConcept(xpp)); 16710 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("firstDose")) { 16711 res.setFirstDose(parseQuantity(xpp)); 16712 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxSingleDose")) { 16713 res.setMaxSingleDose(parseQuantity(xpp)); 16714 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerDay")) { 16715 res.setMaxDosePerDay(parseQuantity(xpp)); 16716 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDosePerTreatmentPeriod")) { 16717 res.setMaxDosePerTreatmentPeriod(parseRatio(xpp)); 16718 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxTreatmentPeriod")) { 16719 res.setMaxTreatmentPeriod(parseDuration(xpp)); 16720 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetSpecies")) { 16721 res.getTargetSpecies().add( 16722 parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent( 16723 xpp, owner)); 16724 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16725 return false; 16726 return true; 16727 } 16728 16729 protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent( 16730 XmlPullParser xpp, MedicinalProductPharmaceutical owner) 16731 throws XmlPullParserException, IOException, FHIRFormatError { 16732 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(); 16733 parseBackboneAttributes(xpp, res); 16734 next(xpp); 16735 int eventType = nextNoWhitespace(xpp); 16736 while (eventType != XmlPullParser.END_TAG) { 16737 if (!parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentContent( 16738 eventType, xpp, owner, res)) 16739 unknownContent(xpp); 16740 eventType = nextNoWhitespace(xpp); 16741 } 16742 next(xpp); 16743 parseElementClose(res); 16744 return res; 16745 } 16746 16747 protected boolean parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentContent( 16748 int eventType, XmlPullParser xpp, MedicinalProductPharmaceutical owner, 16749 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent res) 16750 throws XmlPullParserException, IOException, FHIRFormatError { 16751 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16752 res.setCode(parseCodeableConcept(xpp)); 16753 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("withdrawalPeriod")) { 16754 res.getWithdrawalPeriod().add( 16755 parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent( 16756 xpp, owner)); 16757 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16758 return false; 16759 return true; 16760 } 16761 16762 protected MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent( 16763 XmlPullParser xpp, MedicinalProductPharmaceutical owner) 16764 throws XmlPullParserException, IOException, FHIRFormatError { 16765 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent res = new MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(); 16766 parseBackboneAttributes(xpp, res); 16767 next(xpp); 16768 int eventType = nextNoWhitespace(xpp); 16769 while (eventType != XmlPullParser.END_TAG) { 16770 if (!parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentContent( 16771 eventType, xpp, owner, res)) 16772 unknownContent(xpp); 16773 eventType = nextNoWhitespace(xpp); 16774 } 16775 next(xpp); 16776 parseElementClose(res); 16777 return res; 16778 } 16779 16780 protected boolean parseMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentContent( 16781 int eventType, XmlPullParser xpp, MedicinalProductPharmaceutical owner, 16782 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent res) 16783 throws XmlPullParserException, IOException, FHIRFormatError { 16784 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tissue")) { 16785 res.setTissue(parseCodeableConcept(xpp)); 16786 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 16787 res.setValue(parseQuantity(xpp)); 16788 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInformation")) { 16789 res.setSupportingInformationElement(parseString(xpp)); 16790 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16791 return false; 16792 return true; 16793 } 16794 16795 protected MedicinalProductUndesirableEffect parseMedicinalProductUndesirableEffect(XmlPullParser xpp) 16796 throws XmlPullParserException, IOException, FHIRFormatError { 16797 MedicinalProductUndesirableEffect res = new MedicinalProductUndesirableEffect(); 16798 parseDomainResourceAttributes(xpp, res); 16799 next(xpp); 16800 int eventType = nextNoWhitespace(xpp); 16801 while (eventType != XmlPullParser.END_TAG) { 16802 if (!parseMedicinalProductUndesirableEffectContent(eventType, xpp, res)) 16803 unknownContent(xpp); 16804 eventType = nextNoWhitespace(xpp); 16805 } 16806 next(xpp); 16807 parseElementClose(res); 16808 return res; 16809 } 16810 16811 protected boolean parseMedicinalProductUndesirableEffectContent(int eventType, XmlPullParser xpp, 16812 MedicinalProductUndesirableEffect res) throws XmlPullParserException, IOException, FHIRFormatError { 16813 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 16814 res.getSubject().add(parseReference(xpp)); 16815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("symptomConditionEffect")) { 16816 res.setSymptomConditionEffect(parseCodeableConcept(xpp)); 16817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 16818 res.setClassification(parseCodeableConcept(xpp)); 16819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequencyOfOccurrence")) { 16820 res.setFrequencyOfOccurrence(parseCodeableConcept(xpp)); 16821 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 16822 res.getPopulation().add(parsePopulation(xpp)); 16823 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16824 return false; 16825 return true; 16826 } 16827 16828 protected MessageDefinition parseMessageDefinition(XmlPullParser xpp) 16829 throws XmlPullParserException, IOException, FHIRFormatError { 16830 MessageDefinition res = new MessageDefinition(); 16831 parseDomainResourceAttributes(xpp, res); 16832 next(xpp); 16833 int eventType = nextNoWhitespace(xpp); 16834 while (eventType != XmlPullParser.END_TAG) { 16835 if (!parseMessageDefinitionContent(eventType, xpp, res)) 16836 unknownContent(xpp); 16837 eventType = nextNoWhitespace(xpp); 16838 } 16839 next(xpp); 16840 parseElementClose(res); 16841 return res; 16842 } 16843 16844 protected boolean parseMessageDefinitionContent(int eventType, XmlPullParser xpp, MessageDefinition res) 16845 throws XmlPullParserException, IOException, FHIRFormatError { 16846 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 16847 res.setUrlElement(parseUri(xpp)); 16848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 16849 res.getIdentifier().add(parseIdentifier(xpp)); 16850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 16851 res.setVersionElement(parseString(xpp)); 16852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 16853 res.setNameElement(parseString(xpp)); 16854 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 16855 res.setTitleElement(parseString(xpp)); 16856 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 16857 res.getReplaces().add(parseCanonical(xpp)); 16858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 16859 res.setStatusElement( 16860 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 16861 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 16862 res.setExperimentalElement(parseBoolean(xpp)); 16863 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 16864 res.setDateElement(parseDateTime(xpp)); 16865 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 16866 res.setPublisherElement(parseString(xpp)); 16867 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 16868 res.getContact().add(parseContactDetail(xpp)); 16869 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 16870 res.setDescriptionElement(parseMarkdown(xpp)); 16871 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 16872 res.getUseContext().add(parseUsageContext(xpp)); 16873 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 16874 res.getJurisdiction().add(parseCodeableConcept(xpp)); 16875 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 16876 res.setPurposeElement(parseMarkdown(xpp)); 16877 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 16878 res.setCopyrightElement(parseMarkdown(xpp)); 16879 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { 16880 res.setBaseElement(parseCanonical(xpp)); 16881 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 16882 res.getParent().add(parseCanonical(xpp)); 16883 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "event")) { 16884 res.setEvent(parseType("event", xpp)); 16885 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 16886 res.setCategoryElement(parseEnumeration(xpp, MessageDefinition.MessageSignificanceCategory.NULL, 16887 new MessageDefinition.MessageSignificanceCategoryEnumFactory())); 16888 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 16889 res.getFocus().add(parseMessageDefinitionMessageDefinitionFocusComponent(xpp, res)); 16890 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseRequired")) { 16891 res.setResponseRequiredElement(parseEnumeration(xpp, MessageDefinition.MessageheaderResponseRequest.NULL, 16892 new MessageDefinition.MessageheaderResponseRequestEnumFactory())); 16893 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allowedResponse")) { 16894 res.getAllowedResponse().add(parseMessageDefinitionMessageDefinitionAllowedResponseComponent(xpp, res)); 16895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("graph")) { 16896 res.getGraph().add(parseCanonical(xpp)); 16897 } else if (!parseDomainResourceContent(eventType, xpp, res)) 16898 return false; 16899 return true; 16900 } 16901 16902 protected MessageDefinition.MessageDefinitionFocusComponent parseMessageDefinitionMessageDefinitionFocusComponent( 16903 XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 16904 MessageDefinition.MessageDefinitionFocusComponent res = new MessageDefinition.MessageDefinitionFocusComponent(); 16905 parseBackboneAttributes(xpp, res); 16906 next(xpp); 16907 int eventType = nextNoWhitespace(xpp); 16908 while (eventType != XmlPullParser.END_TAG) { 16909 if (!parseMessageDefinitionMessageDefinitionFocusComponentContent(eventType, xpp, owner, res)) 16910 unknownContent(xpp); 16911 eventType = nextNoWhitespace(xpp); 16912 } 16913 next(xpp); 16914 parseElementClose(res); 16915 return res; 16916 } 16917 16918 protected boolean parseMessageDefinitionMessageDefinitionFocusComponentContent(int eventType, XmlPullParser xpp, 16919 MessageDefinition owner, MessageDefinition.MessageDefinitionFocusComponent res) 16920 throws XmlPullParserException, IOException, FHIRFormatError { 16921 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 16922 res.setCodeElement(parseCode(xpp)); 16923 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 16924 res.setProfileElement(parseCanonical(xpp)); 16925 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 16926 res.setMinElement(parseUnsignedInt(xpp)); 16927 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 16928 res.setMaxElement(parseString(xpp)); 16929 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16930 return false; 16931 return true; 16932 } 16933 16934 protected MessageDefinition.MessageDefinitionAllowedResponseComponent parseMessageDefinitionMessageDefinitionAllowedResponseComponent( 16935 XmlPullParser xpp, MessageDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 16936 MessageDefinition.MessageDefinitionAllowedResponseComponent res = new MessageDefinition.MessageDefinitionAllowedResponseComponent(); 16937 parseBackboneAttributes(xpp, res); 16938 next(xpp); 16939 int eventType = nextNoWhitespace(xpp); 16940 while (eventType != XmlPullParser.END_TAG) { 16941 if (!parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(eventType, xpp, owner, res)) 16942 unknownContent(xpp); 16943 eventType = nextNoWhitespace(xpp); 16944 } 16945 next(xpp); 16946 parseElementClose(res); 16947 return res; 16948 } 16949 16950 protected boolean parseMessageDefinitionMessageDefinitionAllowedResponseComponentContent(int eventType, 16951 XmlPullParser xpp, MessageDefinition owner, MessageDefinition.MessageDefinitionAllowedResponseComponent res) 16952 throws XmlPullParserException, IOException, FHIRFormatError { 16953 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { 16954 res.setMessageElement(parseCanonical(xpp)); 16955 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("situation")) { 16956 res.setSituationElement(parseMarkdown(xpp)); 16957 } else if (!parseBackboneElementContent(eventType, xpp, res)) 16958 return false; 16959 return true; 16960 } 16961 16962 protected MessageHeader parseMessageHeader(XmlPullParser xpp) 16963 throws XmlPullParserException, IOException, FHIRFormatError { 16964 MessageHeader res = new MessageHeader(); 16965 parseDomainResourceAttributes(xpp, res); 16966 next(xpp); 16967 int eventType = nextNoWhitespace(xpp); 16968 while (eventType != XmlPullParser.END_TAG) { 16969 if (!parseMessageHeaderContent(eventType, xpp, res)) 16970 unknownContent(xpp); 16971 eventType = nextNoWhitespace(xpp); 16972 } 16973 next(xpp); 16974 parseElementClose(res); 16975 return res; 16976 } 16977 16978 protected boolean parseMessageHeaderContent(int eventType, XmlPullParser xpp, MessageHeader res) 16979 throws XmlPullParserException, IOException, FHIRFormatError { 16980 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "event")) { 16981 res.setEvent(parseType("event", xpp)); 16982 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 16983 res.getDestination().add(parseMessageHeaderMessageDestinationComponent(xpp, res)); 16984 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sender")) { 16985 res.setSender(parseReference(xpp)); 16986 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enterer")) { 16987 res.setEnterer(parseReference(xpp)); 16988 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 16989 res.setAuthor(parseReference(xpp)); 16990 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 16991 res.setSource(parseMessageHeaderMessageSourceComponent(xpp, res)); 16992 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 16993 res.setResponsible(parseReference(xpp)); 16994 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 16995 res.setReason(parseCodeableConcept(xpp)); 16996 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 16997 res.setResponse(parseMessageHeaderMessageHeaderResponseComponent(xpp, res)); 16998 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 16999 res.getFocus().add(parseReference(xpp)); 17000 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 17001 res.setDefinitionElement(parseCanonical(xpp)); 17002 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17003 return false; 17004 return true; 17005 } 17006 17007 protected MessageHeader.MessageDestinationComponent parseMessageHeaderMessageDestinationComponent(XmlPullParser xpp, 17008 MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { 17009 MessageHeader.MessageDestinationComponent res = new MessageHeader.MessageDestinationComponent(); 17010 parseBackboneAttributes(xpp, res); 17011 next(xpp); 17012 int eventType = nextNoWhitespace(xpp); 17013 while (eventType != XmlPullParser.END_TAG) { 17014 if (!parseMessageHeaderMessageDestinationComponentContent(eventType, xpp, owner, res)) 17015 unknownContent(xpp); 17016 eventType = nextNoWhitespace(xpp); 17017 } 17018 next(xpp); 17019 parseElementClose(res); 17020 return res; 17021 } 17022 17023 protected boolean parseMessageHeaderMessageDestinationComponentContent(int eventType, XmlPullParser xpp, 17024 MessageHeader owner, MessageHeader.MessageDestinationComponent res) 17025 throws XmlPullParserException, IOException, FHIRFormatError { 17026 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 17027 res.setNameElement(parseString(xpp)); 17028 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 17029 res.setTarget(parseReference(xpp)); 17030 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 17031 res.setEndpointElement(parseUrl(xpp)); 17032 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { 17033 res.setReceiver(parseReference(xpp)); 17034 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17035 return false; 17036 return true; 17037 } 17038 17039 protected MessageHeader.MessageSourceComponent parseMessageHeaderMessageSourceComponent(XmlPullParser xpp, 17040 MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { 17041 MessageHeader.MessageSourceComponent res = new MessageHeader.MessageSourceComponent(); 17042 parseBackboneAttributes(xpp, res); 17043 next(xpp); 17044 int eventType = nextNoWhitespace(xpp); 17045 while (eventType != XmlPullParser.END_TAG) { 17046 if (!parseMessageHeaderMessageSourceComponentContent(eventType, xpp, owner, res)) 17047 unknownContent(xpp); 17048 eventType = nextNoWhitespace(xpp); 17049 } 17050 next(xpp); 17051 parseElementClose(res); 17052 return res; 17053 } 17054 17055 protected boolean parseMessageHeaderMessageSourceComponentContent(int eventType, XmlPullParser xpp, 17056 MessageHeader owner, MessageHeader.MessageSourceComponent res) 17057 throws XmlPullParserException, IOException, FHIRFormatError { 17058 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 17059 res.setNameElement(parseString(xpp)); 17060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { 17061 res.setSoftwareElement(parseString(xpp)); 17062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 17063 res.setVersionElement(parseString(xpp)); 17064 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 17065 res.setContact(parseContactPoint(xpp)); 17066 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 17067 res.setEndpointElement(parseUrl(xpp)); 17068 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17069 return false; 17070 return true; 17071 } 17072 17073 protected MessageHeader.MessageHeaderResponseComponent parseMessageHeaderMessageHeaderResponseComponent( 17074 XmlPullParser xpp, MessageHeader owner) throws XmlPullParserException, IOException, FHIRFormatError { 17075 MessageHeader.MessageHeaderResponseComponent res = new MessageHeader.MessageHeaderResponseComponent(); 17076 parseBackboneAttributes(xpp, res); 17077 next(xpp); 17078 int eventType = nextNoWhitespace(xpp); 17079 while (eventType != XmlPullParser.END_TAG) { 17080 if (!parseMessageHeaderMessageHeaderResponseComponentContent(eventType, xpp, owner, res)) 17081 unknownContent(xpp); 17082 eventType = nextNoWhitespace(xpp); 17083 } 17084 next(xpp); 17085 parseElementClose(res); 17086 return res; 17087 } 17088 17089 protected boolean parseMessageHeaderMessageHeaderResponseComponentContent(int eventType, XmlPullParser xpp, 17090 MessageHeader owner, MessageHeader.MessageHeaderResponseComponent res) 17091 throws XmlPullParserException, IOException, FHIRFormatError { 17092 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 17093 res.setIdentifierElement(parseId(xpp)); 17094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 17095 res.setCodeElement( 17096 parseEnumeration(xpp, MessageHeader.ResponseType.NULL, new MessageHeader.ResponseTypeEnumFactory())); 17097 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { 17098 res.setDetails(parseReference(xpp)); 17099 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17100 return false; 17101 return true; 17102 } 17103 17104 protected MolecularSequence parseMolecularSequence(XmlPullParser xpp) 17105 throws XmlPullParserException, IOException, FHIRFormatError { 17106 MolecularSequence res = new MolecularSequence(); 17107 parseDomainResourceAttributes(xpp, res); 17108 next(xpp); 17109 int eventType = nextNoWhitespace(xpp); 17110 while (eventType != XmlPullParser.END_TAG) { 17111 if (!parseMolecularSequenceContent(eventType, xpp, res)) 17112 unknownContent(xpp); 17113 eventType = nextNoWhitespace(xpp); 17114 } 17115 next(xpp); 17116 parseElementClose(res); 17117 return res; 17118 } 17119 17120 protected boolean parseMolecularSequenceContent(int eventType, XmlPullParser xpp, MolecularSequence res) 17121 throws XmlPullParserException, IOException, FHIRFormatError { 17122 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 17123 res.getIdentifier().add(parseIdentifier(xpp)); 17124 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17125 res.setTypeElement( 17126 parseEnumeration(xpp, MolecularSequence.SequenceType.NULL, new MolecularSequence.SequenceTypeEnumFactory())); 17127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("coordinateSystem")) { 17128 res.setCoordinateSystemElement(parseInteger(xpp)); 17129 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 17130 res.setPatient(parseReference(xpp)); 17131 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { 17132 res.setSpecimen(parseReference(xpp)); 17133 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 17134 res.setDevice(parseReference(xpp)); 17135 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 17136 res.setPerformer(parseReference(xpp)); 17137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 17138 res.setQuantity(parseQuantity(xpp)); 17139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeq")) { 17140 res.setReferenceSeq(parseMolecularSequenceMolecularSequenceReferenceSeqComponent(xpp, res)); 17141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variant")) { 17142 res.getVariant().add(parseMolecularSequenceMolecularSequenceVariantComponent(xpp, res)); 17143 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedSeq")) { 17144 res.setObservedSeqElement(parseString(xpp)); 17145 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quality")) { 17146 res.getQuality().add(parseMolecularSequenceMolecularSequenceQualityComponent(xpp, res)); 17147 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readCoverage")) { 17148 res.setReadCoverageElement(parseInteger(xpp)); 17149 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repository")) { 17150 res.getRepository().add(parseMolecularSequenceMolecularSequenceRepositoryComponent(xpp, res)); 17151 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pointer")) { 17152 res.getPointer().add(parseReference(xpp)); 17153 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structureVariant")) { 17154 res.getStructureVariant().add(parseMolecularSequenceMolecularSequenceStructureVariantComponent(xpp, res)); 17155 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17156 return false; 17157 return true; 17158 } 17159 17160 protected MolecularSequence.MolecularSequenceReferenceSeqComponent parseMolecularSequenceMolecularSequenceReferenceSeqComponent( 17161 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17162 MolecularSequence.MolecularSequenceReferenceSeqComponent res = new MolecularSequence.MolecularSequenceReferenceSeqComponent(); 17163 parseBackboneAttributes(xpp, res); 17164 next(xpp); 17165 int eventType = nextNoWhitespace(xpp); 17166 while (eventType != XmlPullParser.END_TAG) { 17167 if (!parseMolecularSequenceMolecularSequenceReferenceSeqComponentContent(eventType, xpp, owner, res)) 17168 unknownContent(xpp); 17169 eventType = nextNoWhitespace(xpp); 17170 } 17171 next(xpp); 17172 parseElementClose(res); 17173 return res; 17174 } 17175 17176 protected boolean parseMolecularSequenceMolecularSequenceReferenceSeqComponentContent(int eventType, 17177 XmlPullParser xpp, MolecularSequence owner, MolecularSequence.MolecularSequenceReferenceSeqComponent res) 17178 throws XmlPullParserException, IOException, FHIRFormatError { 17179 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chromosome")) { 17180 res.setChromosome(parseCodeableConcept(xpp)); 17181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genomeBuild")) { 17182 res.setGenomeBuildElement(parseString(xpp)); 17183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orientation")) { 17184 res.setOrientationElement(parseEnumeration(xpp, MolecularSequence.OrientationType.NULL, 17185 new MolecularSequence.OrientationTypeEnumFactory())); 17186 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqId")) { 17187 res.setReferenceSeqId(parseCodeableConcept(xpp)); 17188 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqPointer")) { 17189 res.setReferenceSeqPointer(parseReference(xpp)); 17190 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceSeqString")) { 17191 res.setReferenceSeqStringElement(parseString(xpp)); 17192 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strand")) { 17193 res.setStrandElement( 17194 parseEnumeration(xpp, MolecularSequence.StrandType.NULL, new MolecularSequence.StrandTypeEnumFactory())); 17195 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowStart")) { 17196 res.setWindowStartElement(parseInteger(xpp)); 17197 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("windowEnd")) { 17198 res.setWindowEndElement(parseInteger(xpp)); 17199 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17200 return false; 17201 return true; 17202 } 17203 17204 protected MolecularSequence.MolecularSequenceVariantComponent parseMolecularSequenceMolecularSequenceVariantComponent( 17205 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17206 MolecularSequence.MolecularSequenceVariantComponent res = new MolecularSequence.MolecularSequenceVariantComponent(); 17207 parseBackboneAttributes(xpp, res); 17208 next(xpp); 17209 int eventType = nextNoWhitespace(xpp); 17210 while (eventType != XmlPullParser.END_TAG) { 17211 if (!parseMolecularSequenceMolecularSequenceVariantComponentContent(eventType, xpp, owner, res)) 17212 unknownContent(xpp); 17213 eventType = nextNoWhitespace(xpp); 17214 } 17215 next(xpp); 17216 parseElementClose(res); 17217 return res; 17218 } 17219 17220 protected boolean parseMolecularSequenceMolecularSequenceVariantComponentContent(int eventType, XmlPullParser xpp, 17221 MolecularSequence owner, MolecularSequence.MolecularSequenceVariantComponent res) 17222 throws XmlPullParserException, IOException, FHIRFormatError { 17223 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 17224 res.setStartElement(parseInteger(xpp)); 17225 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 17226 res.setEndElement(parseInteger(xpp)); 17227 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("observedAllele")) { 17228 res.setObservedAlleleElement(parseString(xpp)); 17229 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceAllele")) { 17230 res.setReferenceAlleleElement(parseString(xpp)); 17231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cigar")) { 17232 res.setCigarElement(parseString(xpp)); 17233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantPointer")) { 17234 res.setVariantPointer(parseReference(xpp)); 17235 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17236 return false; 17237 return true; 17238 } 17239 17240 protected MolecularSequence.MolecularSequenceQualityComponent parseMolecularSequenceMolecularSequenceQualityComponent( 17241 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17242 MolecularSequence.MolecularSequenceQualityComponent res = new MolecularSequence.MolecularSequenceQualityComponent(); 17243 parseBackboneAttributes(xpp, res); 17244 next(xpp); 17245 int eventType = nextNoWhitespace(xpp); 17246 while (eventType != XmlPullParser.END_TAG) { 17247 if (!parseMolecularSequenceMolecularSequenceQualityComponentContent(eventType, xpp, owner, res)) 17248 unknownContent(xpp); 17249 eventType = nextNoWhitespace(xpp); 17250 } 17251 next(xpp); 17252 parseElementClose(res); 17253 return res; 17254 } 17255 17256 protected boolean parseMolecularSequenceMolecularSequenceQualityComponentContent(int eventType, XmlPullParser xpp, 17257 MolecularSequence owner, MolecularSequence.MolecularSequenceQualityComponent res) 17258 throws XmlPullParserException, IOException, FHIRFormatError { 17259 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17260 res.setTypeElement( 17261 parseEnumeration(xpp, MolecularSequence.QualityType.NULL, new MolecularSequence.QualityTypeEnumFactory())); 17262 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("standardSequence")) { 17263 res.setStandardSequence(parseCodeableConcept(xpp)); 17264 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 17265 res.setStartElement(parseInteger(xpp)); 17266 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 17267 res.setEndElement(parseInteger(xpp)); 17268 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { 17269 res.setScore(parseQuantity(xpp)); 17270 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 17271 res.setMethod(parseCodeableConcept(xpp)); 17272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthTP")) { 17273 res.setTruthTPElement(parseDecimal(xpp)); 17274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryTP")) { 17275 res.setQueryTPElement(parseDecimal(xpp)); 17276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("truthFN")) { 17277 res.setTruthFNElement(parseDecimal(xpp)); 17278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("queryFP")) { 17279 res.setQueryFPElement(parseDecimal(xpp)); 17280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gtFP")) { 17281 res.setGtFPElement(parseDecimal(xpp)); 17282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { 17283 res.setPrecisionElement(parseDecimal(xpp)); 17284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recall")) { 17285 res.setRecallElement(parseDecimal(xpp)); 17286 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fScore")) { 17287 res.setFScoreElement(parseDecimal(xpp)); 17288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("roc")) { 17289 res.setRoc(parseMolecularSequenceMolecularSequenceQualityRocComponent(xpp, owner)); 17290 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17291 return false; 17292 return true; 17293 } 17294 17295 protected MolecularSequence.MolecularSequenceQualityRocComponent parseMolecularSequenceMolecularSequenceQualityRocComponent( 17296 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17297 MolecularSequence.MolecularSequenceQualityRocComponent res = new MolecularSequence.MolecularSequenceQualityRocComponent(); 17298 parseBackboneAttributes(xpp, res); 17299 next(xpp); 17300 int eventType = nextNoWhitespace(xpp); 17301 while (eventType != XmlPullParser.END_TAG) { 17302 if (!parseMolecularSequenceMolecularSequenceQualityRocComponentContent(eventType, xpp, owner, res)) 17303 unknownContent(xpp); 17304 eventType = nextNoWhitespace(xpp); 17305 } 17306 next(xpp); 17307 parseElementClose(res); 17308 return res; 17309 } 17310 17311 protected boolean parseMolecularSequenceMolecularSequenceQualityRocComponentContent(int eventType, XmlPullParser xpp, 17312 MolecularSequence owner, MolecularSequence.MolecularSequenceQualityRocComponent res) 17313 throws XmlPullParserException, IOException, FHIRFormatError { 17314 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { 17315 res.getScore().add(parseInteger(xpp)); 17316 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numTP")) { 17317 res.getNumTP().add(parseInteger(xpp)); 17318 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numFP")) { 17319 res.getNumFP().add(parseInteger(xpp)); 17320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numFN")) { 17321 res.getNumFN().add(parseInteger(xpp)); 17322 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precision")) { 17323 res.getPrecision().add(parseDecimal(xpp)); 17324 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sensitivity")) { 17325 res.getSensitivity().add(parseDecimal(xpp)); 17326 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fMeasure")) { 17327 res.getFMeasure().add(parseDecimal(xpp)); 17328 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17329 return false; 17330 return true; 17331 } 17332 17333 protected MolecularSequence.MolecularSequenceRepositoryComponent parseMolecularSequenceMolecularSequenceRepositoryComponent( 17334 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17335 MolecularSequence.MolecularSequenceRepositoryComponent res = new MolecularSequence.MolecularSequenceRepositoryComponent(); 17336 parseBackboneAttributes(xpp, res); 17337 next(xpp); 17338 int eventType = nextNoWhitespace(xpp); 17339 while (eventType != XmlPullParser.END_TAG) { 17340 if (!parseMolecularSequenceMolecularSequenceRepositoryComponentContent(eventType, xpp, owner, res)) 17341 unknownContent(xpp); 17342 eventType = nextNoWhitespace(xpp); 17343 } 17344 next(xpp); 17345 parseElementClose(res); 17346 return res; 17347 } 17348 17349 protected boolean parseMolecularSequenceMolecularSequenceRepositoryComponentContent(int eventType, XmlPullParser xpp, 17350 MolecularSequence owner, MolecularSequence.MolecularSequenceRepositoryComponent res) 17351 throws XmlPullParserException, IOException, FHIRFormatError { 17352 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17353 res.setTypeElement(parseEnumeration(xpp, MolecularSequence.RepositoryType.NULL, 17354 new MolecularSequence.RepositoryTypeEnumFactory())); 17355 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 17356 res.setUrlElement(parseUri(xpp)); 17357 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 17358 res.setNameElement(parseString(xpp)); 17359 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("datasetId")) { 17360 res.setDatasetIdElement(parseString(xpp)); 17361 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantsetId")) { 17362 res.setVariantsetIdElement(parseString(xpp)); 17363 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readsetId")) { 17364 res.setReadsetIdElement(parseString(xpp)); 17365 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17366 return false; 17367 return true; 17368 } 17369 17370 protected MolecularSequence.MolecularSequenceStructureVariantComponent parseMolecularSequenceMolecularSequenceStructureVariantComponent( 17371 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17372 MolecularSequence.MolecularSequenceStructureVariantComponent res = new MolecularSequence.MolecularSequenceStructureVariantComponent(); 17373 parseBackboneAttributes(xpp, res); 17374 next(xpp); 17375 int eventType = nextNoWhitespace(xpp); 17376 while (eventType != XmlPullParser.END_TAG) { 17377 if (!parseMolecularSequenceMolecularSequenceStructureVariantComponentContent(eventType, xpp, owner, res)) 17378 unknownContent(xpp); 17379 eventType = nextNoWhitespace(xpp); 17380 } 17381 next(xpp); 17382 parseElementClose(res); 17383 return res; 17384 } 17385 17386 protected boolean parseMolecularSequenceMolecularSequenceStructureVariantComponentContent(int eventType, 17387 XmlPullParser xpp, MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantComponent res) 17388 throws XmlPullParserException, IOException, FHIRFormatError { 17389 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variantType")) { 17390 res.setVariantType(parseCodeableConcept(xpp)); 17391 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exact")) { 17392 res.setExactElement(parseBoolean(xpp)); 17393 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { 17394 res.setLengthElement(parseInteger(xpp)); 17395 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outer")) { 17396 res.setOuter(parseMolecularSequenceMolecularSequenceStructureVariantOuterComponent(xpp, owner)); 17397 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inner")) { 17398 res.setInner(parseMolecularSequenceMolecularSequenceStructureVariantInnerComponent(xpp, owner)); 17399 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17400 return false; 17401 return true; 17402 } 17403 17404 protected MolecularSequence.MolecularSequenceStructureVariantOuterComponent parseMolecularSequenceMolecularSequenceStructureVariantOuterComponent( 17405 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17406 MolecularSequence.MolecularSequenceStructureVariantOuterComponent res = new MolecularSequence.MolecularSequenceStructureVariantOuterComponent(); 17407 parseBackboneAttributes(xpp, res); 17408 next(xpp); 17409 int eventType = nextNoWhitespace(xpp); 17410 while (eventType != XmlPullParser.END_TAG) { 17411 if (!parseMolecularSequenceMolecularSequenceStructureVariantOuterComponentContent(eventType, xpp, owner, res)) 17412 unknownContent(xpp); 17413 eventType = nextNoWhitespace(xpp); 17414 } 17415 next(xpp); 17416 parseElementClose(res); 17417 return res; 17418 } 17419 17420 protected boolean parseMolecularSequenceMolecularSequenceStructureVariantOuterComponentContent(int eventType, 17421 XmlPullParser xpp, MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantOuterComponent res) 17422 throws XmlPullParserException, IOException, FHIRFormatError { 17423 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 17424 res.setStartElement(parseInteger(xpp)); 17425 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 17426 res.setEndElement(parseInteger(xpp)); 17427 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17428 return false; 17429 return true; 17430 } 17431 17432 protected MolecularSequence.MolecularSequenceStructureVariantInnerComponent parseMolecularSequenceMolecularSequenceStructureVariantInnerComponent( 17433 XmlPullParser xpp, MolecularSequence owner) throws XmlPullParserException, IOException, FHIRFormatError { 17434 MolecularSequence.MolecularSequenceStructureVariantInnerComponent res = new MolecularSequence.MolecularSequenceStructureVariantInnerComponent(); 17435 parseBackboneAttributes(xpp, res); 17436 next(xpp); 17437 int eventType = nextNoWhitespace(xpp); 17438 while (eventType != XmlPullParser.END_TAG) { 17439 if (!parseMolecularSequenceMolecularSequenceStructureVariantInnerComponentContent(eventType, xpp, owner, res)) 17440 unknownContent(xpp); 17441 eventType = nextNoWhitespace(xpp); 17442 } 17443 next(xpp); 17444 parseElementClose(res); 17445 return res; 17446 } 17447 17448 protected boolean parseMolecularSequenceMolecularSequenceStructureVariantInnerComponentContent(int eventType, 17449 XmlPullParser xpp, MolecularSequence owner, MolecularSequence.MolecularSequenceStructureVariantInnerComponent res) 17450 throws XmlPullParserException, IOException, FHIRFormatError { 17451 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 17452 res.setStartElement(parseInteger(xpp)); 17453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 17454 res.setEndElement(parseInteger(xpp)); 17455 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17456 return false; 17457 return true; 17458 } 17459 17460 protected NamingSystem parseNamingSystem(XmlPullParser xpp) 17461 throws XmlPullParserException, IOException, FHIRFormatError { 17462 NamingSystem res = new NamingSystem(); 17463 parseDomainResourceAttributes(xpp, res); 17464 next(xpp); 17465 int eventType = nextNoWhitespace(xpp); 17466 while (eventType != XmlPullParser.END_TAG) { 17467 if (!parseNamingSystemContent(eventType, xpp, res)) 17468 unknownContent(xpp); 17469 eventType = nextNoWhitespace(xpp); 17470 } 17471 next(xpp); 17472 parseElementClose(res); 17473 return res; 17474 } 17475 17476 protected boolean parseNamingSystemContent(int eventType, XmlPullParser xpp, NamingSystem res) 17477 throws XmlPullParserException, IOException, FHIRFormatError { 17478 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 17479 res.setNameElement(parseString(xpp)); 17480 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 17481 res.setStatusElement( 17482 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 17483 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 17484 res.setKindElement( 17485 parseEnumeration(xpp, NamingSystem.NamingSystemType.NULL, new NamingSystem.NamingSystemTypeEnumFactory())); 17486 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 17487 res.setDateElement(parseDateTime(xpp)); 17488 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 17489 res.setPublisherElement(parseString(xpp)); 17490 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 17491 res.getContact().add(parseContactDetail(xpp)); 17492 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 17493 res.setResponsibleElement(parseString(xpp)); 17494 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17495 res.setType(parseCodeableConcept(xpp)); 17496 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 17497 res.setDescriptionElement(parseMarkdown(xpp)); 17498 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 17499 res.getUseContext().add(parseUsageContext(xpp)); 17500 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 17501 res.getJurisdiction().add(parseCodeableConcept(xpp)); 17502 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 17503 res.setUsageElement(parseString(xpp)); 17504 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uniqueId")) { 17505 res.getUniqueId().add(parseNamingSystemNamingSystemUniqueIdComponent(xpp, res)); 17506 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17507 return false; 17508 return true; 17509 } 17510 17511 protected NamingSystem.NamingSystemUniqueIdComponent parseNamingSystemNamingSystemUniqueIdComponent(XmlPullParser xpp, 17512 NamingSystem owner) throws XmlPullParserException, IOException, FHIRFormatError { 17513 NamingSystem.NamingSystemUniqueIdComponent res = new NamingSystem.NamingSystemUniqueIdComponent(); 17514 parseBackboneAttributes(xpp, res); 17515 next(xpp); 17516 int eventType = nextNoWhitespace(xpp); 17517 while (eventType != XmlPullParser.END_TAG) { 17518 if (!parseNamingSystemNamingSystemUniqueIdComponentContent(eventType, xpp, owner, res)) 17519 unknownContent(xpp); 17520 eventType = nextNoWhitespace(xpp); 17521 } 17522 next(xpp); 17523 parseElementClose(res); 17524 return res; 17525 } 17526 17527 protected boolean parseNamingSystemNamingSystemUniqueIdComponentContent(int eventType, XmlPullParser xpp, 17528 NamingSystem owner, NamingSystem.NamingSystemUniqueIdComponent res) 17529 throws XmlPullParserException, IOException, FHIRFormatError { 17530 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17531 res.setTypeElement(parseEnumeration(xpp, NamingSystem.NamingSystemIdentifierType.NULL, 17532 new NamingSystem.NamingSystemIdentifierTypeEnumFactory())); 17533 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 17534 res.setValueElement(parseString(xpp)); 17535 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { 17536 res.setPreferredElement(parseBoolean(xpp)); 17537 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 17538 res.setCommentElement(parseString(xpp)); 17539 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 17540 res.setPeriod(parsePeriod(xpp)); 17541 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17542 return false; 17543 return true; 17544 } 17545 17546 protected NutritionOrder parseNutritionOrder(XmlPullParser xpp) 17547 throws XmlPullParserException, IOException, FHIRFormatError { 17548 NutritionOrder res = new NutritionOrder(); 17549 parseDomainResourceAttributes(xpp, res); 17550 next(xpp); 17551 int eventType = nextNoWhitespace(xpp); 17552 while (eventType != XmlPullParser.END_TAG) { 17553 if (!parseNutritionOrderContent(eventType, xpp, res)) 17554 unknownContent(xpp); 17555 eventType = nextNoWhitespace(xpp); 17556 } 17557 next(xpp); 17558 parseElementClose(res); 17559 return res; 17560 } 17561 17562 protected boolean parseNutritionOrderContent(int eventType, XmlPullParser xpp, NutritionOrder res) 17563 throws XmlPullParserException, IOException, FHIRFormatError { 17564 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 17565 res.getIdentifier().add(parseIdentifier(xpp)); 17566 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 17567 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 17568 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 17569 res.getInstantiatesUri().add(parseUri(xpp)); 17570 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiates")) { 17571 res.getInstantiates().add(parseUri(xpp)); 17572 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 17573 res.setStatusElement(parseEnumeration(xpp, NutritionOrder.NutritionOrderStatus.NULL, 17574 new NutritionOrder.NutritionOrderStatusEnumFactory())); 17575 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 17576 res.setIntentElement(parseEnumeration(xpp, NutritionOrder.NutritiionOrderIntent.NULL, 17577 new NutritionOrder.NutritiionOrderIntentEnumFactory())); 17578 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 17579 res.setPatient(parseReference(xpp)); 17580 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 17581 res.setEncounter(parseReference(xpp)); 17582 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateTime")) { 17583 res.setDateTimeElement(parseDateTime(xpp)); 17584 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderer")) { 17585 res.setOrderer(parseReference(xpp)); 17586 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allergyIntolerance")) { 17587 res.getAllergyIntolerance().add(parseReference(xpp)); 17588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodPreferenceModifier")) { 17589 res.getFoodPreferenceModifier().add(parseCodeableConcept(xpp)); 17590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("excludeFoodModifier")) { 17591 res.getExcludeFoodModifier().add(parseCodeableConcept(xpp)); 17592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("oralDiet")) { 17593 res.setOralDiet(parseNutritionOrderNutritionOrderOralDietComponent(xpp, res)); 17594 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplement")) { 17595 res.getSupplement().add(parseNutritionOrderNutritionOrderSupplementComponent(xpp, res)); 17596 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enteralFormula")) { 17597 res.setEnteralFormula(parseNutritionOrderNutritionOrderEnteralFormulaComponent(xpp, res)); 17598 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 17599 res.getNote().add(parseAnnotation(xpp)); 17600 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17601 return false; 17602 return true; 17603 } 17604 17605 protected NutritionOrder.NutritionOrderOralDietComponent parseNutritionOrderNutritionOrderOralDietComponent( 17606 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17607 NutritionOrder.NutritionOrderOralDietComponent res = new NutritionOrder.NutritionOrderOralDietComponent(); 17608 parseBackboneAttributes(xpp, res); 17609 next(xpp); 17610 int eventType = nextNoWhitespace(xpp); 17611 while (eventType != XmlPullParser.END_TAG) { 17612 if (!parseNutritionOrderNutritionOrderOralDietComponentContent(eventType, xpp, owner, res)) 17613 unknownContent(xpp); 17614 eventType = nextNoWhitespace(xpp); 17615 } 17616 next(xpp); 17617 parseElementClose(res); 17618 return res; 17619 } 17620 17621 protected boolean parseNutritionOrderNutritionOrderOralDietComponentContent(int eventType, XmlPullParser xpp, 17622 NutritionOrder owner, NutritionOrder.NutritionOrderOralDietComponent res) 17623 throws XmlPullParserException, IOException, FHIRFormatError { 17624 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17625 res.getType().add(parseCodeableConcept(xpp)); 17626 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 17627 res.getSchedule().add(parseTiming(xpp)); 17628 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nutrient")) { 17629 res.getNutrient().add(parseNutritionOrderNutritionOrderOralDietNutrientComponent(xpp, owner)); 17630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("texture")) { 17631 res.getTexture().add(parseNutritionOrderNutritionOrderOralDietTextureComponent(xpp, owner)); 17632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fluidConsistencyType")) { 17633 res.getFluidConsistencyType().add(parseCodeableConcept(xpp)); 17634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { 17635 res.setInstructionElement(parseString(xpp)); 17636 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17637 return false; 17638 return true; 17639 } 17640 17641 protected NutritionOrder.NutritionOrderOralDietNutrientComponent parseNutritionOrderNutritionOrderOralDietNutrientComponent( 17642 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17643 NutritionOrder.NutritionOrderOralDietNutrientComponent res = new NutritionOrder.NutritionOrderOralDietNutrientComponent(); 17644 parseBackboneAttributes(xpp, res); 17645 next(xpp); 17646 int eventType = nextNoWhitespace(xpp); 17647 while (eventType != XmlPullParser.END_TAG) { 17648 if (!parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(eventType, xpp, owner, res)) 17649 unknownContent(xpp); 17650 eventType = nextNoWhitespace(xpp); 17651 } 17652 next(xpp); 17653 parseElementClose(res); 17654 return res; 17655 } 17656 17657 protected boolean parseNutritionOrderNutritionOrderOralDietNutrientComponentContent(int eventType, XmlPullParser xpp, 17658 NutritionOrder owner, NutritionOrder.NutritionOrderOralDietNutrientComponent res) 17659 throws XmlPullParserException, IOException, FHIRFormatError { 17660 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 17661 res.setModifier(parseCodeableConcept(xpp)); 17662 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 17663 res.setAmount(parseQuantity(xpp)); 17664 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17665 return false; 17666 return true; 17667 } 17668 17669 protected NutritionOrder.NutritionOrderOralDietTextureComponent parseNutritionOrderNutritionOrderOralDietTextureComponent( 17670 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17671 NutritionOrder.NutritionOrderOralDietTextureComponent res = new NutritionOrder.NutritionOrderOralDietTextureComponent(); 17672 parseBackboneAttributes(xpp, res); 17673 next(xpp); 17674 int eventType = nextNoWhitespace(xpp); 17675 while (eventType != XmlPullParser.END_TAG) { 17676 if (!parseNutritionOrderNutritionOrderOralDietTextureComponentContent(eventType, xpp, owner, res)) 17677 unknownContent(xpp); 17678 eventType = nextNoWhitespace(xpp); 17679 } 17680 next(xpp); 17681 parseElementClose(res); 17682 return res; 17683 } 17684 17685 protected boolean parseNutritionOrderNutritionOrderOralDietTextureComponentContent(int eventType, XmlPullParser xpp, 17686 NutritionOrder owner, NutritionOrder.NutritionOrderOralDietTextureComponent res) 17687 throws XmlPullParserException, IOException, FHIRFormatError { 17688 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 17689 res.setModifier(parseCodeableConcept(xpp)); 17690 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("foodType")) { 17691 res.setFoodType(parseCodeableConcept(xpp)); 17692 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17693 return false; 17694 return true; 17695 } 17696 17697 protected NutritionOrder.NutritionOrderSupplementComponent parseNutritionOrderNutritionOrderSupplementComponent( 17698 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17699 NutritionOrder.NutritionOrderSupplementComponent res = new NutritionOrder.NutritionOrderSupplementComponent(); 17700 parseBackboneAttributes(xpp, res); 17701 next(xpp); 17702 int eventType = nextNoWhitespace(xpp); 17703 while (eventType != XmlPullParser.END_TAG) { 17704 if (!parseNutritionOrderNutritionOrderSupplementComponentContent(eventType, xpp, owner, res)) 17705 unknownContent(xpp); 17706 eventType = nextNoWhitespace(xpp); 17707 } 17708 next(xpp); 17709 parseElementClose(res); 17710 return res; 17711 } 17712 17713 protected boolean parseNutritionOrderNutritionOrderSupplementComponentContent(int eventType, XmlPullParser xpp, 17714 NutritionOrder owner, NutritionOrder.NutritionOrderSupplementComponent res) 17715 throws XmlPullParserException, IOException, FHIRFormatError { 17716 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17717 res.setType(parseCodeableConcept(xpp)); 17718 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("productName")) { 17719 res.setProductNameElement(parseString(xpp)); 17720 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 17721 res.getSchedule().add(parseTiming(xpp)); 17722 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 17723 res.setQuantity(parseQuantity(xpp)); 17724 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { 17725 res.setInstructionElement(parseString(xpp)); 17726 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17727 return false; 17728 return true; 17729 } 17730 17731 protected NutritionOrder.NutritionOrderEnteralFormulaComponent parseNutritionOrderNutritionOrderEnteralFormulaComponent( 17732 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17733 NutritionOrder.NutritionOrderEnteralFormulaComponent res = new NutritionOrder.NutritionOrderEnteralFormulaComponent(); 17734 parseBackboneAttributes(xpp, res); 17735 next(xpp); 17736 int eventType = nextNoWhitespace(xpp); 17737 while (eventType != XmlPullParser.END_TAG) { 17738 if (!parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(eventType, xpp, owner, res)) 17739 unknownContent(xpp); 17740 eventType = nextNoWhitespace(xpp); 17741 } 17742 next(xpp); 17743 parseElementClose(res); 17744 return res; 17745 } 17746 17747 protected boolean parseNutritionOrderNutritionOrderEnteralFormulaComponentContent(int eventType, XmlPullParser xpp, 17748 NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaComponent res) 17749 throws XmlPullParserException, IOException, FHIRFormatError { 17750 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaType")) { 17751 res.setBaseFormulaType(parseCodeableConcept(xpp)); 17752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseFormulaProductName")) { 17753 res.setBaseFormulaProductNameElement(parseString(xpp)); 17754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveType")) { 17755 res.setAdditiveType(parseCodeableConcept(xpp)); 17756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additiveProductName")) { 17757 res.setAdditiveProductNameElement(parseString(xpp)); 17758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("caloricDensity")) { 17759 res.setCaloricDensity(parseQuantity(xpp)); 17760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("routeofAdministration")) { 17761 res.setRouteofAdministration(parseCodeableConcept(xpp)); 17762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administration")) { 17763 res.getAdministration().add(parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(xpp, owner)); 17764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxVolumeToDeliver")) { 17765 res.setMaxVolumeToDeliver(parseQuantity(xpp)); 17766 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("administrationInstruction")) { 17767 res.setAdministrationInstructionElement(parseString(xpp)); 17768 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17769 return false; 17770 return true; 17771 } 17772 17773 protected NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent( 17774 XmlPullParser xpp, NutritionOrder owner) throws XmlPullParserException, IOException, FHIRFormatError { 17775 NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res = new NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent(); 17776 parseBackboneAttributes(xpp, res); 17777 next(xpp); 17778 int eventType = nextNoWhitespace(xpp); 17779 while (eventType != XmlPullParser.END_TAG) { 17780 if (!parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(eventType, xpp, owner, res)) 17781 unknownContent(xpp); 17782 eventType = nextNoWhitespace(xpp); 17783 } 17784 next(xpp); 17785 parseElementClose(res); 17786 return res; 17787 } 17788 17789 protected boolean parseNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentContent(int eventType, 17790 XmlPullParser xpp, NutritionOrder owner, NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent res) 17791 throws XmlPullParserException, IOException, FHIRFormatError { 17792 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 17793 res.setSchedule(parseTiming(xpp)); 17794 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 17795 res.setQuantity(parseQuantity(xpp)); 17796 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "rate")) { 17797 res.setRate(parseType("rate", xpp)); 17798 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17799 return false; 17800 return true; 17801 } 17802 17803 protected Observation parseObservation(XmlPullParser xpp) 17804 throws XmlPullParserException, IOException, FHIRFormatError { 17805 Observation res = new Observation(); 17806 parseDomainResourceAttributes(xpp, res); 17807 next(xpp); 17808 int eventType = nextNoWhitespace(xpp); 17809 while (eventType != XmlPullParser.END_TAG) { 17810 if (!parseObservationContent(eventType, xpp, res)) 17811 unknownContent(xpp); 17812 eventType = nextNoWhitespace(xpp); 17813 } 17814 next(xpp); 17815 parseElementClose(res); 17816 return res; 17817 } 17818 17819 protected boolean parseObservationContent(int eventType, XmlPullParser xpp, Observation res) 17820 throws XmlPullParserException, IOException, FHIRFormatError { 17821 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 17822 res.getIdentifier().add(parseIdentifier(xpp)); 17823 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 17824 res.getBasedOn().add(parseReference(xpp)); 17825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 17826 res.getPartOf().add(parseReference(xpp)); 17827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 17828 res.setStatusElement( 17829 parseEnumeration(xpp, Observation.ObservationStatus.NULL, new Observation.ObservationStatusEnumFactory())); 17830 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 17831 res.getCategory().add(parseCodeableConcept(xpp)); 17832 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 17833 res.setCode(parseCodeableConcept(xpp)); 17834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 17835 res.setSubject(parseReference(xpp)); 17836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 17837 res.getFocus().add(parseReference(xpp)); 17838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 17839 res.setEncounter(parseReference(xpp)); 17840 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "effective")) { 17841 res.setEffective(parseType("effective", xpp)); 17842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 17843 res.setIssuedElement(parseInstant(xpp)); 17844 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 17845 res.getPerformer().add(parseReference(xpp)); 17846 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 17847 res.setValue(parseType("value", xpp)); 17848 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { 17849 res.setDataAbsentReason(parseCodeableConcept(xpp)); 17850 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { 17851 res.getInterpretation().add(parseCodeableConcept(xpp)); 17852 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 17853 res.getNote().add(parseAnnotation(xpp)); 17854 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 17855 res.setBodySite(parseCodeableConcept(xpp)); 17856 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 17857 res.setMethod(parseCodeableConcept(xpp)); 17858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { 17859 res.setSpecimen(parseReference(xpp)); 17860 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("device")) { 17861 res.setDevice(parseReference(xpp)); 17862 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { 17863 res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, res)); 17864 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hasMember")) { 17865 res.getHasMember().add(parseReference(xpp)); 17866 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { 17867 res.getDerivedFrom().add(parseReference(xpp)); 17868 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { 17869 res.getComponent().add(parseObservationObservationComponentComponent(xpp, res)); 17870 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17871 return false; 17872 return true; 17873 } 17874 17875 protected Observation.ObservationReferenceRangeComponent parseObservationObservationReferenceRangeComponent( 17876 XmlPullParser xpp, Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { 17877 Observation.ObservationReferenceRangeComponent res = new Observation.ObservationReferenceRangeComponent(); 17878 parseBackboneAttributes(xpp, res); 17879 next(xpp); 17880 int eventType = nextNoWhitespace(xpp); 17881 while (eventType != XmlPullParser.END_TAG) { 17882 if (!parseObservationObservationReferenceRangeComponentContent(eventType, xpp, owner, res)) 17883 unknownContent(xpp); 17884 eventType = nextNoWhitespace(xpp); 17885 } 17886 next(xpp); 17887 parseElementClose(res); 17888 return res; 17889 } 17890 17891 protected boolean parseObservationObservationReferenceRangeComponentContent(int eventType, XmlPullParser xpp, 17892 Observation owner, Observation.ObservationReferenceRangeComponent res) 17893 throws XmlPullParserException, IOException, FHIRFormatError { 17894 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("low")) { 17895 res.setLow(parseQuantity(xpp)); 17896 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("high")) { 17897 res.setHigh(parseQuantity(xpp)); 17898 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 17899 res.setType(parseCodeableConcept(xpp)); 17900 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appliesTo")) { 17901 res.getAppliesTo().add(parseCodeableConcept(xpp)); 17902 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("age")) { 17903 res.setAge(parseRange(xpp)); 17904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 17905 res.setTextElement(parseString(xpp)); 17906 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17907 return false; 17908 return true; 17909 } 17910 17911 protected Observation.ObservationComponentComponent parseObservationObservationComponentComponent(XmlPullParser xpp, 17912 Observation owner) throws XmlPullParserException, IOException, FHIRFormatError { 17913 Observation.ObservationComponentComponent res = new Observation.ObservationComponentComponent(); 17914 parseBackboneAttributes(xpp, res); 17915 next(xpp); 17916 int eventType = nextNoWhitespace(xpp); 17917 while (eventType != XmlPullParser.END_TAG) { 17918 if (!parseObservationObservationComponentComponentContent(eventType, xpp, owner, res)) 17919 unknownContent(xpp); 17920 eventType = nextNoWhitespace(xpp); 17921 } 17922 next(xpp); 17923 parseElementClose(res); 17924 return res; 17925 } 17926 17927 protected boolean parseObservationObservationComponentComponentContent(int eventType, XmlPullParser xpp, 17928 Observation owner, Observation.ObservationComponentComponent res) 17929 throws XmlPullParserException, IOException, FHIRFormatError { 17930 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 17931 res.setCode(parseCodeableConcept(xpp)); 17932 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 17933 res.setValue(parseType("value", xpp)); 17934 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dataAbsentReason")) { 17935 res.setDataAbsentReason(parseCodeableConcept(xpp)); 17936 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interpretation")) { 17937 res.getInterpretation().add(parseCodeableConcept(xpp)); 17938 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceRange")) { 17939 res.getReferenceRange().add(parseObservationObservationReferenceRangeComponent(xpp, owner)); 17940 } else if (!parseBackboneElementContent(eventType, xpp, res)) 17941 return false; 17942 return true; 17943 } 17944 17945 protected ObservationDefinition parseObservationDefinition(XmlPullParser xpp) 17946 throws XmlPullParserException, IOException, FHIRFormatError { 17947 ObservationDefinition res = new ObservationDefinition(); 17948 parseDomainResourceAttributes(xpp, res); 17949 next(xpp); 17950 int eventType = nextNoWhitespace(xpp); 17951 while (eventType != XmlPullParser.END_TAG) { 17952 if (!parseObservationDefinitionContent(eventType, xpp, res)) 17953 unknownContent(xpp); 17954 eventType = nextNoWhitespace(xpp); 17955 } 17956 next(xpp); 17957 parseElementClose(res); 17958 return res; 17959 } 17960 17961 protected boolean parseObservationDefinitionContent(int eventType, XmlPullParser xpp, ObservationDefinition res) 17962 throws XmlPullParserException, IOException, FHIRFormatError { 17963 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 17964 res.getCategory().add(parseCodeableConcept(xpp)); 17965 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 17966 res.setCode(parseCodeableConcept(xpp)); 17967 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 17968 res.getIdentifier().add(parseIdentifier(xpp)); 17969 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("permittedDataType")) { 17970 res.getPermittedDataType().add(parseEnumeration(xpp, ObservationDefinition.ObservationDataType.NULL, 17971 new ObservationDefinition.ObservationDataTypeEnumFactory())); 17972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("multipleResultsAllowed")) { 17973 res.setMultipleResultsAllowedElement(parseBoolean(xpp)); 17974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 17975 res.setMethod(parseCodeableConcept(xpp)); 17976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferredReportName")) { 17977 res.setPreferredReportNameElement(parseString(xpp)); 17978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantitativeDetails")) { 17979 res.setQuantitativeDetails(parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponent(xpp, res)); 17980 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualifiedInterval")) { 17981 res.getQualifiedInterval() 17982 .add(parseObservationDefinitionObservationDefinitionQualifiedIntervalComponent(xpp, res)); 17983 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validCodedValueSet")) { 17984 res.setValidCodedValueSet(parseReference(xpp)); 17985 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("normalCodedValueSet")) { 17986 res.setNormalCodedValueSet(parseReference(xpp)); 17987 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abnormalCodedValueSet")) { 17988 res.setAbnormalCodedValueSet(parseReference(xpp)); 17989 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criticalCodedValueSet")) { 17990 res.setCriticalCodedValueSet(parseReference(xpp)); 17991 } else if (!parseDomainResourceContent(eventType, xpp, res)) 17992 return false; 17993 return true; 17994 } 17995 17996 protected ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponent( 17997 XmlPullParser xpp, ObservationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 17998 ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent res = new ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent(); 17999 parseBackboneAttributes(xpp, res); 18000 next(xpp); 18001 int eventType = nextNoWhitespace(xpp); 18002 while (eventType != XmlPullParser.END_TAG) { 18003 if (!parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponentContent(eventType, xpp, owner, 18004 res)) 18005 unknownContent(xpp); 18006 eventType = nextNoWhitespace(xpp); 18007 } 18008 next(xpp); 18009 parseElementClose(res); 18010 return res; 18011 } 18012 18013 protected boolean parseObservationDefinitionObservationDefinitionQuantitativeDetailsComponentContent(int eventType, 18014 XmlPullParser xpp, ObservationDefinition owner, 18015 ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent res) 18016 throws XmlPullParserException, IOException, FHIRFormatError { 18017 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("customaryUnit")) { 18018 res.setCustomaryUnit(parseCodeableConcept(xpp)); 18019 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unit")) { 18020 res.setUnit(parseCodeableConcept(xpp)); 18021 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("conversionFactor")) { 18022 res.setConversionFactorElement(parseDecimal(xpp)); 18023 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("decimalPrecision")) { 18024 res.setDecimalPrecisionElement(parseInteger(xpp)); 18025 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18026 return false; 18027 return true; 18028 } 18029 18030 protected ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent parseObservationDefinitionObservationDefinitionQualifiedIntervalComponent( 18031 XmlPullParser xpp, ObservationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18032 ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent res = new ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent(); 18033 parseBackboneAttributes(xpp, res); 18034 next(xpp); 18035 int eventType = nextNoWhitespace(xpp); 18036 while (eventType != XmlPullParser.END_TAG) { 18037 if (!parseObservationDefinitionObservationDefinitionQualifiedIntervalComponentContent(eventType, xpp, owner, res)) 18038 unknownContent(xpp); 18039 eventType = nextNoWhitespace(xpp); 18040 } 18041 next(xpp); 18042 parseElementClose(res); 18043 return res; 18044 } 18045 18046 protected boolean parseObservationDefinitionObservationDefinitionQualifiedIntervalComponentContent(int eventType, 18047 XmlPullParser xpp, ObservationDefinition owner, 18048 ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent res) 18049 throws XmlPullParserException, IOException, FHIRFormatError { 18050 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 18051 res.setCategoryElement(parseEnumeration(xpp, ObservationDefinition.ObservationRangeCategory.NULL, 18052 new ObservationDefinition.ObservationRangeCategoryEnumFactory())); 18053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("range")) { 18054 res.setRange(parseRange(xpp)); 18055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 18056 res.setContext(parseCodeableConcept(xpp)); 18057 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appliesTo")) { 18058 res.getAppliesTo().add(parseCodeableConcept(xpp)); 18059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 18060 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 18061 new Enumerations.AdministrativeGenderEnumFactory())); 18062 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("age")) { 18063 res.setAge(parseRange(xpp)); 18064 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gestationalAge")) { 18065 res.setGestationalAge(parseRange(xpp)); 18066 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 18067 res.setConditionElement(parseString(xpp)); 18068 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18069 return false; 18070 return true; 18071 } 18072 18073 protected OperationDefinition parseOperationDefinition(XmlPullParser xpp) 18074 throws XmlPullParserException, IOException, FHIRFormatError { 18075 OperationDefinition res = new OperationDefinition(); 18076 parseDomainResourceAttributes(xpp, res); 18077 next(xpp); 18078 int eventType = nextNoWhitespace(xpp); 18079 while (eventType != XmlPullParser.END_TAG) { 18080 if (!parseOperationDefinitionContent(eventType, xpp, res)) 18081 unknownContent(xpp); 18082 eventType = nextNoWhitespace(xpp); 18083 } 18084 next(xpp); 18085 parseElementClose(res); 18086 return res; 18087 } 18088 18089 protected boolean parseOperationDefinitionContent(int eventType, XmlPullParser xpp, OperationDefinition res) 18090 throws XmlPullParserException, IOException, FHIRFormatError { 18091 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 18092 res.setUrlElement(parseUri(xpp)); 18093 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 18094 res.setVersionElement(parseString(xpp)); 18095 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18096 res.setNameElement(parseString(xpp)); 18097 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 18098 res.setTitleElement(parseString(xpp)); 18099 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 18100 res.setStatusElement( 18101 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 18102 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 18103 res.setKindElement(parseEnumeration(xpp, OperationDefinition.OperationKind.NULL, 18104 new OperationDefinition.OperationKindEnumFactory())); 18105 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 18106 res.setExperimentalElement(parseBoolean(xpp)); 18107 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 18108 res.setDateElement(parseDateTime(xpp)); 18109 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 18110 res.setPublisherElement(parseString(xpp)); 18111 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 18112 res.getContact().add(parseContactDetail(xpp)); 18113 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 18114 res.setDescriptionElement(parseMarkdown(xpp)); 18115 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 18116 res.getUseContext().add(parseUsageContext(xpp)); 18117 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 18118 res.getJurisdiction().add(parseCodeableConcept(xpp)); 18119 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 18120 res.setPurposeElement(parseMarkdown(xpp)); 18121 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("affectsState")) { 18122 res.setAffectsStateElement(parseBoolean(xpp)); 18123 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 18124 res.setCodeElement(parseCode(xpp)); 18125 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 18126 res.setCommentElement(parseMarkdown(xpp)); 18127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { 18128 res.setBaseElement(parseCanonical(xpp)); 18129 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 18130 res.getResource().add(parseCode(xpp)); 18131 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 18132 res.setSystemElement(parseBoolean(xpp)); 18133 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18134 res.setTypeElement(parseBoolean(xpp)); 18135 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 18136 res.setInstanceElement(parseBoolean(xpp)); 18137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inputProfile")) { 18138 res.setInputProfileElement(parseCanonical(xpp)); 18139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outputProfile")) { 18140 res.setOutputProfileElement(parseCanonical(xpp)); 18141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 18142 res.getParameter().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, res)); 18143 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overload")) { 18144 res.getOverload().add(parseOperationDefinitionOperationDefinitionOverloadComponent(xpp, res)); 18145 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18146 return false; 18147 return true; 18148 } 18149 18150 protected OperationDefinition.OperationDefinitionParameterComponent parseOperationDefinitionOperationDefinitionParameterComponent( 18151 XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18152 OperationDefinition.OperationDefinitionParameterComponent res = new OperationDefinition.OperationDefinitionParameterComponent(); 18153 parseBackboneAttributes(xpp, res); 18154 next(xpp); 18155 int eventType = nextNoWhitespace(xpp); 18156 while (eventType != XmlPullParser.END_TAG) { 18157 if (!parseOperationDefinitionOperationDefinitionParameterComponentContent(eventType, xpp, owner, res)) 18158 unknownContent(xpp); 18159 eventType = nextNoWhitespace(xpp); 18160 } 18161 next(xpp); 18162 parseElementClose(res); 18163 return res; 18164 } 18165 18166 protected boolean parseOperationDefinitionOperationDefinitionParameterComponentContent(int eventType, 18167 XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionParameterComponent res) 18168 throws XmlPullParserException, IOException, FHIRFormatError { 18169 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18170 res.setNameElement(parseCode(xpp)); 18171 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 18172 res.setUseElement(parseEnumeration(xpp, OperationDefinition.OperationParameterUse.NULL, 18173 new OperationDefinition.OperationParameterUseEnumFactory())); 18174 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 18175 res.setMinElement(parseInteger(xpp)); 18176 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 18177 res.setMaxElement(parseString(xpp)); 18178 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 18179 res.setDocumentationElement(parseString(xpp)); 18180 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18181 res.setTypeElement(parseCode(xpp)); 18182 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetProfile")) { 18183 res.getTargetProfile().add(parseCanonical(xpp)); 18184 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("searchType")) { 18185 res.setSearchTypeElement( 18186 parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); 18187 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("binding")) { 18188 res.setBinding(parseOperationDefinitionOperationDefinitionParameterBindingComponent(xpp, owner)); 18189 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referencedFrom")) { 18190 res.getReferencedFrom() 18191 .add(parseOperationDefinitionOperationDefinitionParameterReferencedFromComponent(xpp, owner)); 18192 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { 18193 res.getPart().add(parseOperationDefinitionOperationDefinitionParameterComponent(xpp, owner)); 18194 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18195 return false; 18196 return true; 18197 } 18198 18199 protected OperationDefinition.OperationDefinitionParameterBindingComponent parseOperationDefinitionOperationDefinitionParameterBindingComponent( 18200 XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18201 OperationDefinition.OperationDefinitionParameterBindingComponent res = new OperationDefinition.OperationDefinitionParameterBindingComponent(); 18202 parseBackboneAttributes(xpp, res); 18203 next(xpp); 18204 int eventType = nextNoWhitespace(xpp); 18205 while (eventType != XmlPullParser.END_TAG) { 18206 if (!parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(eventType, xpp, owner, res)) 18207 unknownContent(xpp); 18208 eventType = nextNoWhitespace(xpp); 18209 } 18210 next(xpp); 18211 parseElementClose(res); 18212 return res; 18213 } 18214 18215 protected boolean parseOperationDefinitionOperationDefinitionParameterBindingComponentContent(int eventType, 18216 XmlPullParser xpp, OperationDefinition owner, 18217 OperationDefinition.OperationDefinitionParameterBindingComponent res) 18218 throws XmlPullParserException, IOException, FHIRFormatError { 18219 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("strength")) { 18220 res.setStrengthElement( 18221 parseEnumeration(xpp, Enumerations.BindingStrength.NULL, new Enumerations.BindingStrengthEnumFactory())); 18222 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { 18223 res.setValueSetElement(parseCanonical(xpp)); 18224 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18225 return false; 18226 return true; 18227 } 18228 18229 protected OperationDefinition.OperationDefinitionParameterReferencedFromComponent parseOperationDefinitionOperationDefinitionParameterReferencedFromComponent( 18230 XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18231 OperationDefinition.OperationDefinitionParameterReferencedFromComponent res = new OperationDefinition.OperationDefinitionParameterReferencedFromComponent(); 18232 parseBackboneAttributes(xpp, res); 18233 next(xpp); 18234 int eventType = nextNoWhitespace(xpp); 18235 while (eventType != XmlPullParser.END_TAG) { 18236 if (!parseOperationDefinitionOperationDefinitionParameterReferencedFromComponentContent(eventType, xpp, owner, 18237 res)) 18238 unknownContent(xpp); 18239 eventType = nextNoWhitespace(xpp); 18240 } 18241 next(xpp); 18242 parseElementClose(res); 18243 return res; 18244 } 18245 18246 protected boolean parseOperationDefinitionOperationDefinitionParameterReferencedFromComponentContent(int eventType, 18247 XmlPullParser xpp, OperationDefinition owner, 18248 OperationDefinition.OperationDefinitionParameterReferencedFromComponent res) 18249 throws XmlPullParserException, IOException, FHIRFormatError { 18250 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 18251 res.setSourceElement(parseString(xpp)); 18252 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { 18253 res.setSourceIdElement(parseString(xpp)); 18254 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18255 return false; 18256 return true; 18257 } 18258 18259 protected OperationDefinition.OperationDefinitionOverloadComponent parseOperationDefinitionOperationDefinitionOverloadComponent( 18260 XmlPullParser xpp, OperationDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18261 OperationDefinition.OperationDefinitionOverloadComponent res = new OperationDefinition.OperationDefinitionOverloadComponent(); 18262 parseBackboneAttributes(xpp, res); 18263 next(xpp); 18264 int eventType = nextNoWhitespace(xpp); 18265 while (eventType != XmlPullParser.END_TAG) { 18266 if (!parseOperationDefinitionOperationDefinitionOverloadComponentContent(eventType, xpp, owner, res)) 18267 unknownContent(xpp); 18268 eventType = nextNoWhitespace(xpp); 18269 } 18270 next(xpp); 18271 parseElementClose(res); 18272 return res; 18273 } 18274 18275 protected boolean parseOperationDefinitionOperationDefinitionOverloadComponentContent(int eventType, 18276 XmlPullParser xpp, OperationDefinition owner, OperationDefinition.OperationDefinitionOverloadComponent res) 18277 throws XmlPullParserException, IOException, FHIRFormatError { 18278 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameterName")) { 18279 res.getParameterName().add(parseString(xpp)); 18280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 18281 res.setCommentElement(parseString(xpp)); 18282 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18283 return false; 18284 return true; 18285 } 18286 18287 protected OperationOutcome parseOperationOutcome(XmlPullParser xpp) 18288 throws XmlPullParserException, IOException, FHIRFormatError { 18289 OperationOutcome res = new OperationOutcome(); 18290 parseDomainResourceAttributes(xpp, res); 18291 next(xpp); 18292 int eventType = nextNoWhitespace(xpp); 18293 while (eventType != XmlPullParser.END_TAG) { 18294 if (!parseOperationOutcomeContent(eventType, xpp, res)) 18295 unknownContent(xpp); 18296 eventType = nextNoWhitespace(xpp); 18297 } 18298 next(xpp); 18299 parseElementClose(res); 18300 return res; 18301 } 18302 18303 protected boolean parseOperationOutcomeContent(int eventType, XmlPullParser xpp, OperationOutcome res) 18304 throws XmlPullParserException, IOException, FHIRFormatError { 18305 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issue")) { 18306 res.getIssue().add(parseOperationOutcomeOperationOutcomeIssueComponent(xpp, res)); 18307 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18308 return false; 18309 return true; 18310 } 18311 18312 protected OperationOutcome.OperationOutcomeIssueComponent parseOperationOutcomeOperationOutcomeIssueComponent( 18313 XmlPullParser xpp, OperationOutcome owner) throws XmlPullParserException, IOException, FHIRFormatError { 18314 OperationOutcome.OperationOutcomeIssueComponent res = new OperationOutcome.OperationOutcomeIssueComponent(); 18315 parseBackboneAttributes(xpp, res); 18316 next(xpp); 18317 int eventType = nextNoWhitespace(xpp); 18318 while (eventType != XmlPullParser.END_TAG) { 18319 if (!parseOperationOutcomeOperationOutcomeIssueComponentContent(eventType, xpp, owner, res)) 18320 unknownContent(xpp); 18321 eventType = nextNoWhitespace(xpp); 18322 } 18323 next(xpp); 18324 parseElementClose(res); 18325 return res; 18326 } 18327 18328 protected boolean parseOperationOutcomeOperationOutcomeIssueComponentContent(int eventType, XmlPullParser xpp, 18329 OperationOutcome owner, OperationOutcome.OperationOutcomeIssueComponent res) 18330 throws XmlPullParserException, IOException, FHIRFormatError { 18331 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("severity")) { 18332 res.setSeverityElement( 18333 parseEnumeration(xpp, OperationOutcome.IssueSeverity.NULL, new OperationOutcome.IssueSeverityEnumFactory())); 18334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 18335 res.setCodeElement( 18336 parseEnumeration(xpp, OperationOutcome.IssueType.NULL, new OperationOutcome.IssueTypeEnumFactory())); 18337 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("details")) { 18338 res.setDetails(parseCodeableConcept(xpp)); 18339 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diagnostics")) { 18340 res.setDiagnosticsElement(parseString(xpp)); 18341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 18342 res.getLocation().add(parseString(xpp)); 18343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 18344 res.getExpression().add(parseString(xpp)); 18345 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18346 return false; 18347 return true; 18348 } 18349 18350 protected Organization parseOrganization(XmlPullParser xpp) 18351 throws XmlPullParserException, IOException, FHIRFormatError { 18352 Organization res = new Organization(); 18353 parseDomainResourceAttributes(xpp, res); 18354 next(xpp); 18355 int eventType = nextNoWhitespace(xpp); 18356 while (eventType != XmlPullParser.END_TAG) { 18357 if (!parseOrganizationContent(eventType, xpp, res)) 18358 unknownContent(xpp); 18359 eventType = nextNoWhitespace(xpp); 18360 } 18361 next(xpp); 18362 parseElementClose(res); 18363 return res; 18364 } 18365 18366 protected boolean parseOrganizationContent(int eventType, XmlPullParser xpp, Organization res) 18367 throws XmlPullParserException, IOException, FHIRFormatError { 18368 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18369 res.getIdentifier().add(parseIdentifier(xpp)); 18370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 18371 res.setActiveElement(parseBoolean(xpp)); 18372 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18373 res.getType().add(parseCodeableConcept(xpp)); 18374 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18375 res.setNameElement(parseString(xpp)); 18376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 18377 res.getAlias().add(parseString(xpp)); 18378 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18379 res.getTelecom().add(parseContactPoint(xpp)); 18380 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 18381 res.getAddress().add(parseAddress(xpp)); 18382 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 18383 res.setPartOf(parseReference(xpp)); 18384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 18385 res.getContact().add(parseOrganizationOrganizationContactComponent(xpp, res)); 18386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 18387 res.getEndpoint().add(parseReference(xpp)); 18388 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18389 return false; 18390 return true; 18391 } 18392 18393 protected Organization.OrganizationContactComponent parseOrganizationOrganizationContactComponent(XmlPullParser xpp, 18394 Organization owner) throws XmlPullParserException, IOException, FHIRFormatError { 18395 Organization.OrganizationContactComponent res = new Organization.OrganizationContactComponent(); 18396 parseBackboneAttributes(xpp, res); 18397 next(xpp); 18398 int eventType = nextNoWhitespace(xpp); 18399 while (eventType != XmlPullParser.END_TAG) { 18400 if (!parseOrganizationOrganizationContactComponentContent(eventType, xpp, owner, res)) 18401 unknownContent(xpp); 18402 eventType = nextNoWhitespace(xpp); 18403 } 18404 next(xpp); 18405 parseElementClose(res); 18406 return res; 18407 } 18408 18409 protected boolean parseOrganizationOrganizationContactComponentContent(int eventType, XmlPullParser xpp, 18410 Organization owner, Organization.OrganizationContactComponent res) 18411 throws XmlPullParserException, IOException, FHIRFormatError { 18412 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 18413 res.setPurpose(parseCodeableConcept(xpp)); 18414 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18415 res.setName(parseHumanName(xpp)); 18416 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18417 res.getTelecom().add(parseContactPoint(xpp)); 18418 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 18419 res.setAddress(parseAddress(xpp)); 18420 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18421 return false; 18422 return true; 18423 } 18424 18425 protected OrganizationAffiliation parseOrganizationAffiliation(XmlPullParser xpp) 18426 throws XmlPullParserException, IOException, FHIRFormatError { 18427 OrganizationAffiliation res = new OrganizationAffiliation(); 18428 parseDomainResourceAttributes(xpp, res); 18429 next(xpp); 18430 int eventType = nextNoWhitespace(xpp); 18431 while (eventType != XmlPullParser.END_TAG) { 18432 if (!parseOrganizationAffiliationContent(eventType, xpp, res)) 18433 unknownContent(xpp); 18434 eventType = nextNoWhitespace(xpp); 18435 } 18436 next(xpp); 18437 parseElementClose(res); 18438 return res; 18439 } 18440 18441 protected boolean parseOrganizationAffiliationContent(int eventType, XmlPullParser xpp, OrganizationAffiliation res) 18442 throws XmlPullParserException, IOException, FHIRFormatError { 18443 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18444 res.getIdentifier().add(parseIdentifier(xpp)); 18445 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 18446 res.setActiveElement(parseBoolean(xpp)); 18447 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 18448 res.setPeriod(parsePeriod(xpp)); 18449 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 18450 res.setOrganization(parseReference(xpp)); 18451 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participatingOrganization")) { 18452 res.setParticipatingOrganization(parseReference(xpp)); 18453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("network")) { 18454 res.getNetwork().add(parseReference(xpp)); 18455 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 18456 res.getCode().add(parseCodeableConcept(xpp)); 18457 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 18458 res.getSpecialty().add(parseCodeableConcept(xpp)); 18459 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 18460 res.getLocation().add(parseReference(xpp)); 18461 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("healthcareService")) { 18462 res.getHealthcareService().add(parseReference(xpp)); 18463 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18464 res.getTelecom().add(parseContactPoint(xpp)); 18465 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 18466 res.getEndpoint().add(parseReference(xpp)); 18467 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18468 return false; 18469 return true; 18470 } 18471 18472 protected Patient parsePatient(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 18473 Patient res = new Patient(); 18474 parseDomainResourceAttributes(xpp, res); 18475 next(xpp); 18476 int eventType = nextNoWhitespace(xpp); 18477 while (eventType != XmlPullParser.END_TAG) { 18478 if (!parsePatientContent(eventType, xpp, res)) 18479 unknownContent(xpp); 18480 eventType = nextNoWhitespace(xpp); 18481 } 18482 next(xpp); 18483 parseElementClose(res); 18484 return res; 18485 } 18486 18487 protected boolean parsePatientContent(int eventType, XmlPullParser xpp, Patient res) 18488 throws XmlPullParserException, IOException, FHIRFormatError { 18489 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18490 res.getIdentifier().add(parseIdentifier(xpp)); 18491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 18492 res.setActiveElement(parseBoolean(xpp)); 18493 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18494 res.getName().add(parseHumanName(xpp)); 18495 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18496 res.getTelecom().add(parseContactPoint(xpp)); 18497 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 18498 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 18499 new Enumerations.AdministrativeGenderEnumFactory())); 18500 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { 18501 res.setBirthDateElement(parseDate(xpp)); 18502 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "deceased")) { 18503 res.setDeceased(parseType("deceased", xpp)); 18504 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 18505 res.getAddress().add(parseAddress(xpp)); 18506 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maritalStatus")) { 18507 res.setMaritalStatus(parseCodeableConcept(xpp)); 18508 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "multipleBirth")) { 18509 res.setMultipleBirth(parseType("multipleBirth", xpp)); 18510 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { 18511 res.getPhoto().add(parseAttachment(xpp)); 18512 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 18513 res.getContact().add(parsePatientContactComponent(xpp, res)); 18514 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { 18515 res.getCommunication().add(parsePatientPatientCommunicationComponent(xpp, res)); 18516 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("generalPractitioner")) { 18517 res.getGeneralPractitioner().add(parseReference(xpp)); 18518 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 18519 res.setManagingOrganization(parseReference(xpp)); 18520 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 18521 res.getLink().add(parsePatientPatientLinkComponent(xpp, res)); 18522 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18523 return false; 18524 return true; 18525 } 18526 18527 protected Patient.ContactComponent parsePatientContactComponent(XmlPullParser xpp, Patient owner) 18528 throws XmlPullParserException, IOException, FHIRFormatError { 18529 Patient.ContactComponent res = new Patient.ContactComponent(); 18530 parseBackboneAttributes(xpp, res); 18531 next(xpp); 18532 int eventType = nextNoWhitespace(xpp); 18533 while (eventType != XmlPullParser.END_TAG) { 18534 if (!parsePatientContactComponentContent(eventType, xpp, owner, res)) 18535 unknownContent(xpp); 18536 eventType = nextNoWhitespace(xpp); 18537 } 18538 next(xpp); 18539 parseElementClose(res); 18540 return res; 18541 } 18542 18543 protected boolean parsePatientContactComponentContent(int eventType, XmlPullParser xpp, Patient owner, 18544 Patient.ContactComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 18545 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 18546 res.getRelationship().add(parseCodeableConcept(xpp)); 18547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18548 res.setName(parseHumanName(xpp)); 18549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18550 res.getTelecom().add(parseContactPoint(xpp)); 18551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 18552 res.setAddress(parseAddress(xpp)); 18553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 18554 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 18555 new Enumerations.AdministrativeGenderEnumFactory())); 18556 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 18557 res.setOrganization(parseReference(xpp)); 18558 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 18559 res.setPeriod(parsePeriod(xpp)); 18560 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18561 return false; 18562 return true; 18563 } 18564 18565 protected Patient.PatientCommunicationComponent parsePatientPatientCommunicationComponent(XmlPullParser xpp, 18566 Patient owner) throws XmlPullParserException, IOException, FHIRFormatError { 18567 Patient.PatientCommunicationComponent res = new Patient.PatientCommunicationComponent(); 18568 parseBackboneAttributes(xpp, res); 18569 next(xpp); 18570 int eventType = nextNoWhitespace(xpp); 18571 while (eventType != XmlPullParser.END_TAG) { 18572 if (!parsePatientPatientCommunicationComponentContent(eventType, xpp, owner, res)) 18573 unknownContent(xpp); 18574 eventType = nextNoWhitespace(xpp); 18575 } 18576 next(xpp); 18577 parseElementClose(res); 18578 return res; 18579 } 18580 18581 protected boolean parsePatientPatientCommunicationComponentContent(int eventType, XmlPullParser xpp, Patient owner, 18582 Patient.PatientCommunicationComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 18583 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 18584 res.setLanguage(parseCodeableConcept(xpp)); 18585 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { 18586 res.setPreferredElement(parseBoolean(xpp)); 18587 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18588 return false; 18589 return true; 18590 } 18591 18592 protected Patient.PatientLinkComponent parsePatientPatientLinkComponent(XmlPullParser xpp, Patient owner) 18593 throws XmlPullParserException, IOException, FHIRFormatError { 18594 Patient.PatientLinkComponent res = new Patient.PatientLinkComponent(); 18595 parseBackboneAttributes(xpp, res); 18596 next(xpp); 18597 int eventType = nextNoWhitespace(xpp); 18598 while (eventType != XmlPullParser.END_TAG) { 18599 if (!parsePatientPatientLinkComponentContent(eventType, xpp, owner, res)) 18600 unknownContent(xpp); 18601 eventType = nextNoWhitespace(xpp); 18602 } 18603 next(xpp); 18604 parseElementClose(res); 18605 return res; 18606 } 18607 18608 protected boolean parsePatientPatientLinkComponentContent(int eventType, XmlPullParser xpp, Patient owner, 18609 Patient.PatientLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 18610 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("other")) { 18611 res.setOther(parseReference(xpp)); 18612 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18613 res.setTypeElement(parseEnumeration(xpp, Patient.LinkType.NULL, new Patient.LinkTypeEnumFactory())); 18614 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18615 return false; 18616 return true; 18617 } 18618 18619 protected PaymentNotice parsePaymentNotice(XmlPullParser xpp) 18620 throws XmlPullParserException, IOException, FHIRFormatError { 18621 PaymentNotice res = new PaymentNotice(); 18622 parseDomainResourceAttributes(xpp, res); 18623 next(xpp); 18624 int eventType = nextNoWhitespace(xpp); 18625 while (eventType != XmlPullParser.END_TAG) { 18626 if (!parsePaymentNoticeContent(eventType, xpp, res)) 18627 unknownContent(xpp); 18628 eventType = nextNoWhitespace(xpp); 18629 } 18630 next(xpp); 18631 parseElementClose(res); 18632 return res; 18633 } 18634 18635 protected boolean parsePaymentNoticeContent(int eventType, XmlPullParser xpp, PaymentNotice res) 18636 throws XmlPullParserException, IOException, FHIRFormatError { 18637 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18638 res.getIdentifier().add(parseIdentifier(xpp)); 18639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 18640 res.setStatusElement(parseEnumeration(xpp, PaymentNotice.PaymentNoticeStatus.NULL, 18641 new PaymentNotice.PaymentNoticeStatusEnumFactory())); 18642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 18643 res.setRequest(parseReference(xpp)); 18644 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 18645 res.setResponse(parseReference(xpp)); 18646 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 18647 res.setCreatedElement(parseDateTime(xpp)); 18648 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("provider")) { 18649 res.setProvider(parseReference(xpp)); 18650 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payment")) { 18651 res.setPayment(parseReference(xpp)); 18652 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentDate")) { 18653 res.setPaymentDateElement(parseDate(xpp)); 18654 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { 18655 res.setPayee(parseReference(xpp)); 18656 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 18657 res.setRecipient(parseReference(xpp)); 18658 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 18659 res.setAmount(parseMoney(xpp)); 18660 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentStatus")) { 18661 res.setPaymentStatus(parseCodeableConcept(xpp)); 18662 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18663 return false; 18664 return true; 18665 } 18666 18667 protected PaymentReconciliation parsePaymentReconciliation(XmlPullParser xpp) 18668 throws XmlPullParserException, IOException, FHIRFormatError { 18669 PaymentReconciliation res = new PaymentReconciliation(); 18670 parseDomainResourceAttributes(xpp, res); 18671 next(xpp); 18672 int eventType = nextNoWhitespace(xpp); 18673 while (eventType != XmlPullParser.END_TAG) { 18674 if (!parsePaymentReconciliationContent(eventType, xpp, res)) 18675 unknownContent(xpp); 18676 eventType = nextNoWhitespace(xpp); 18677 } 18678 next(xpp); 18679 parseElementClose(res); 18680 return res; 18681 } 18682 18683 protected boolean parsePaymentReconciliationContent(int eventType, XmlPullParser xpp, PaymentReconciliation res) 18684 throws XmlPullParserException, IOException, FHIRFormatError { 18685 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18686 res.getIdentifier().add(parseIdentifier(xpp)); 18687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 18688 res.setStatusElement(parseEnumeration(xpp, PaymentReconciliation.PaymentReconciliationStatus.NULL, 18689 new PaymentReconciliation.PaymentReconciliationStatusEnumFactory())); 18690 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 18691 res.setPeriod(parsePeriod(xpp)); 18692 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 18693 res.setCreatedElement(parseDateTime(xpp)); 18694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentIssuer")) { 18695 res.setPaymentIssuer(parseReference(xpp)); 18696 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 18697 res.setRequest(parseReference(xpp)); 18698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestor")) { 18699 res.setRequestor(parseReference(xpp)); 18700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 18701 res.setOutcomeElement( 18702 parseEnumeration(xpp, Enumerations.RemittanceOutcome.NULL, new Enumerations.RemittanceOutcomeEnumFactory())); 18703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disposition")) { 18704 res.setDispositionElement(parseString(xpp)); 18705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentDate")) { 18706 res.setPaymentDateElement(parseDate(xpp)); 18707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentAmount")) { 18708 res.setPaymentAmount(parseMoney(xpp)); 18709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paymentIdentifier")) { 18710 res.setPaymentIdentifier(parseIdentifier(xpp)); 18711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 18712 res.getDetail().add(parsePaymentReconciliationDetailsComponent(xpp, res)); 18713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("formCode")) { 18714 res.setFormCode(parseCodeableConcept(xpp)); 18715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processNote")) { 18716 res.getProcessNote().add(parsePaymentReconciliationNotesComponent(xpp, res)); 18717 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18718 return false; 18719 return true; 18720 } 18721 18722 protected PaymentReconciliation.DetailsComponent parsePaymentReconciliationDetailsComponent(XmlPullParser xpp, 18723 PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { 18724 PaymentReconciliation.DetailsComponent res = new PaymentReconciliation.DetailsComponent(); 18725 parseBackboneAttributes(xpp, res); 18726 next(xpp); 18727 int eventType = nextNoWhitespace(xpp); 18728 while (eventType != XmlPullParser.END_TAG) { 18729 if (!parsePaymentReconciliationDetailsComponentContent(eventType, xpp, owner, res)) 18730 unknownContent(xpp); 18731 eventType = nextNoWhitespace(xpp); 18732 } 18733 next(xpp); 18734 parseElementClose(res); 18735 return res; 18736 } 18737 18738 protected boolean parsePaymentReconciliationDetailsComponentContent(int eventType, XmlPullParser xpp, 18739 PaymentReconciliation owner, PaymentReconciliation.DetailsComponent res) 18740 throws XmlPullParserException, IOException, FHIRFormatError { 18741 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18742 res.setIdentifier(parseIdentifier(xpp)); 18743 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("predecessor")) { 18744 res.setPredecessor(parseIdentifier(xpp)); 18745 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18746 res.setType(parseCodeableConcept(xpp)); 18747 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 18748 res.setRequest(parseReference(xpp)); 18749 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("submitter")) { 18750 res.setSubmitter(parseReference(xpp)); 18751 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 18752 res.setResponse(parseReference(xpp)); 18753 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 18754 res.setDateElement(parseDate(xpp)); 18755 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responsible")) { 18756 res.setResponsible(parseReference(xpp)); 18757 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payee")) { 18758 res.setPayee(parseReference(xpp)); 18759 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 18760 res.setAmount(parseMoney(xpp)); 18761 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18762 return false; 18763 return true; 18764 } 18765 18766 protected PaymentReconciliation.NotesComponent parsePaymentReconciliationNotesComponent(XmlPullParser xpp, 18767 PaymentReconciliation owner) throws XmlPullParserException, IOException, FHIRFormatError { 18768 PaymentReconciliation.NotesComponent res = new PaymentReconciliation.NotesComponent(); 18769 parseBackboneAttributes(xpp, res); 18770 next(xpp); 18771 int eventType = nextNoWhitespace(xpp); 18772 while (eventType != XmlPullParser.END_TAG) { 18773 if (!parsePaymentReconciliationNotesComponentContent(eventType, xpp, owner, res)) 18774 unknownContent(xpp); 18775 eventType = nextNoWhitespace(xpp); 18776 } 18777 next(xpp); 18778 parseElementClose(res); 18779 return res; 18780 } 18781 18782 protected boolean parsePaymentReconciliationNotesComponentContent(int eventType, XmlPullParser xpp, 18783 PaymentReconciliation owner, PaymentReconciliation.NotesComponent res) 18784 throws XmlPullParserException, IOException, FHIRFormatError { 18785 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18786 res.setTypeElement(parseEnumeration(xpp, Enumerations.NoteType.NULL, new Enumerations.NoteTypeEnumFactory())); 18787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 18788 res.setTextElement(parseString(xpp)); 18789 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18790 return false; 18791 return true; 18792 } 18793 18794 protected Person parsePerson(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 18795 Person res = new Person(); 18796 parseDomainResourceAttributes(xpp, res); 18797 next(xpp); 18798 int eventType = nextNoWhitespace(xpp); 18799 while (eventType != XmlPullParser.END_TAG) { 18800 if (!parsePersonContent(eventType, xpp, res)) 18801 unknownContent(xpp); 18802 eventType = nextNoWhitespace(xpp); 18803 } 18804 next(xpp); 18805 parseElementClose(res); 18806 return res; 18807 } 18808 18809 protected boolean parsePersonContent(int eventType, XmlPullParser xpp, Person res) 18810 throws XmlPullParserException, IOException, FHIRFormatError { 18811 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18812 res.getIdentifier().add(parseIdentifier(xpp)); 18813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18814 res.getName().add(parseHumanName(xpp)); 18815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 18816 res.getTelecom().add(parseContactPoint(xpp)); 18817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 18818 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 18819 new Enumerations.AdministrativeGenderEnumFactory())); 18820 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { 18821 res.setBirthDateElement(parseDate(xpp)); 18822 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 18823 res.getAddress().add(parseAddress(xpp)); 18824 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { 18825 res.setPhoto(parseAttachment(xpp)); 18826 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("managingOrganization")) { 18827 res.setManagingOrganization(parseReference(xpp)); 18828 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 18829 res.setActiveElement(parseBoolean(xpp)); 18830 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 18831 res.getLink().add(parsePersonPersonLinkComponent(xpp, res)); 18832 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18833 return false; 18834 return true; 18835 } 18836 18837 protected Person.PersonLinkComponent parsePersonPersonLinkComponent(XmlPullParser xpp, Person owner) 18838 throws XmlPullParserException, IOException, FHIRFormatError { 18839 Person.PersonLinkComponent res = new Person.PersonLinkComponent(); 18840 parseBackboneAttributes(xpp, res); 18841 next(xpp); 18842 int eventType = nextNoWhitespace(xpp); 18843 while (eventType != XmlPullParser.END_TAG) { 18844 if (!parsePersonPersonLinkComponentContent(eventType, xpp, owner, res)) 18845 unknownContent(xpp); 18846 eventType = nextNoWhitespace(xpp); 18847 } 18848 next(xpp); 18849 parseElementClose(res); 18850 return res; 18851 } 18852 18853 protected boolean parsePersonPersonLinkComponentContent(int eventType, XmlPullParser xpp, Person owner, 18854 Person.PersonLinkComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 18855 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 18856 res.setTarget(parseReference(xpp)); 18857 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assurance")) { 18858 res.setAssuranceElement( 18859 parseEnumeration(xpp, Person.IdentityAssuranceLevel.NULL, new Person.IdentityAssuranceLevelEnumFactory())); 18860 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18861 return false; 18862 return true; 18863 } 18864 18865 protected PlanDefinition parsePlanDefinition(XmlPullParser xpp) 18866 throws XmlPullParserException, IOException, FHIRFormatError { 18867 PlanDefinition res = new PlanDefinition(); 18868 parseDomainResourceAttributes(xpp, res); 18869 next(xpp); 18870 int eventType = nextNoWhitespace(xpp); 18871 while (eventType != XmlPullParser.END_TAG) { 18872 if (!parsePlanDefinitionContent(eventType, xpp, res)) 18873 unknownContent(xpp); 18874 eventType = nextNoWhitespace(xpp); 18875 } 18876 next(xpp); 18877 parseElementClose(res); 18878 return res; 18879 } 18880 18881 protected boolean parsePlanDefinitionContent(int eventType, XmlPullParser xpp, PlanDefinition res) 18882 throws XmlPullParserException, IOException, FHIRFormatError { 18883 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 18884 res.setUrlElement(parseUri(xpp)); 18885 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 18886 res.getIdentifier().add(parseIdentifier(xpp)); 18887 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 18888 res.setVersionElement(parseString(xpp)); 18889 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 18890 res.setNameElement(parseString(xpp)); 18891 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 18892 res.setTitleElement(parseString(xpp)); 18893 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 18894 res.setSubtitleElement(parseString(xpp)); 18895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 18896 res.setType(parseCodeableConcept(xpp)); 18897 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 18898 res.setStatusElement( 18899 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 18900 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 18901 res.setExperimentalElement(parseBoolean(xpp)); 18902 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 18903 res.setSubject(parseType("subject", xpp)); 18904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 18905 res.setDateElement(parseDateTime(xpp)); 18906 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 18907 res.setPublisherElement(parseString(xpp)); 18908 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 18909 res.getContact().add(parseContactDetail(xpp)); 18910 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 18911 res.setDescriptionElement(parseMarkdown(xpp)); 18912 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 18913 res.getUseContext().add(parseUsageContext(xpp)); 18914 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 18915 res.getJurisdiction().add(parseCodeableConcept(xpp)); 18916 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 18917 res.setPurposeElement(parseMarkdown(xpp)); 18918 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 18919 res.setUsageElement(parseString(xpp)); 18920 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 18921 res.setCopyrightElement(parseMarkdown(xpp)); 18922 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 18923 res.setApprovalDateElement(parseDate(xpp)); 18924 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 18925 res.setLastReviewDateElement(parseDate(xpp)); 18926 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 18927 res.setEffectivePeriod(parsePeriod(xpp)); 18928 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 18929 res.getTopic().add(parseCodeableConcept(xpp)); 18930 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 18931 res.getAuthor().add(parseContactDetail(xpp)); 18932 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 18933 res.getEditor().add(parseContactDetail(xpp)); 18934 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 18935 res.getReviewer().add(parseContactDetail(xpp)); 18936 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 18937 res.getEndorser().add(parseContactDetail(xpp)); 18938 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 18939 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 18940 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { 18941 res.getLibrary().add(parseCanonical(xpp)); 18942 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goal")) { 18943 res.getGoal().add(parsePlanDefinitionPlanDefinitionGoalComponent(xpp, res)); 18944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 18945 res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, res)); 18946 } else if (!parseDomainResourceContent(eventType, xpp, res)) 18947 return false; 18948 return true; 18949 } 18950 18951 protected PlanDefinition.PlanDefinitionGoalComponent parsePlanDefinitionPlanDefinitionGoalComponent(XmlPullParser xpp, 18952 PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18953 PlanDefinition.PlanDefinitionGoalComponent res = new PlanDefinition.PlanDefinitionGoalComponent(); 18954 parseBackboneAttributes(xpp, res); 18955 next(xpp); 18956 int eventType = nextNoWhitespace(xpp); 18957 while (eventType != XmlPullParser.END_TAG) { 18958 if (!parsePlanDefinitionPlanDefinitionGoalComponentContent(eventType, xpp, owner, res)) 18959 unknownContent(xpp); 18960 eventType = nextNoWhitespace(xpp); 18961 } 18962 next(xpp); 18963 parseElementClose(res); 18964 return res; 18965 } 18966 18967 protected boolean parsePlanDefinitionPlanDefinitionGoalComponentContent(int eventType, XmlPullParser xpp, 18968 PlanDefinition owner, PlanDefinition.PlanDefinitionGoalComponent res) 18969 throws XmlPullParserException, IOException, FHIRFormatError { 18970 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 18971 res.setCategory(parseCodeableConcept(xpp)); 18972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 18973 res.setDescription(parseCodeableConcept(xpp)); 18974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 18975 res.setPriority(parseCodeableConcept(xpp)); 18976 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 18977 res.setStart(parseCodeableConcept(xpp)); 18978 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("addresses")) { 18979 res.getAddresses().add(parseCodeableConcept(xpp)); 18980 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 18981 res.getDocumentation().add(parseRelatedArtifact(xpp)); 18982 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 18983 res.getTarget().add(parsePlanDefinitionPlanDefinitionGoalTargetComponent(xpp, owner)); 18984 } else if (!parseBackboneElementContent(eventType, xpp, res)) 18985 return false; 18986 return true; 18987 } 18988 18989 protected PlanDefinition.PlanDefinitionGoalTargetComponent parsePlanDefinitionPlanDefinitionGoalTargetComponent( 18990 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 18991 PlanDefinition.PlanDefinitionGoalTargetComponent res = new PlanDefinition.PlanDefinitionGoalTargetComponent(); 18992 parseBackboneAttributes(xpp, res); 18993 next(xpp); 18994 int eventType = nextNoWhitespace(xpp); 18995 while (eventType != XmlPullParser.END_TAG) { 18996 if (!parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(eventType, xpp, owner, res)) 18997 unknownContent(xpp); 18998 eventType = nextNoWhitespace(xpp); 18999 } 19000 next(xpp); 19001 parseElementClose(res); 19002 return res; 19003 } 19004 19005 protected boolean parsePlanDefinitionPlanDefinitionGoalTargetComponentContent(int eventType, XmlPullParser xpp, 19006 PlanDefinition owner, PlanDefinition.PlanDefinitionGoalTargetComponent res) 19007 throws XmlPullParserException, IOException, FHIRFormatError { 19008 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("measure")) { 19009 res.setMeasure(parseCodeableConcept(xpp)); 19010 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "detail")) { 19011 res.setDetail(parseType("detail", xpp)); 19012 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("due")) { 19013 res.setDue(parseDuration(xpp)); 19014 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19015 return false; 19016 return true; 19017 } 19018 19019 protected PlanDefinition.PlanDefinitionActionComponent parsePlanDefinitionPlanDefinitionActionComponent( 19020 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 19021 PlanDefinition.PlanDefinitionActionComponent res = new PlanDefinition.PlanDefinitionActionComponent(); 19022 parseBackboneAttributes(xpp, res); 19023 next(xpp); 19024 int eventType = nextNoWhitespace(xpp); 19025 while (eventType != XmlPullParser.END_TAG) { 19026 if (!parsePlanDefinitionPlanDefinitionActionComponentContent(eventType, xpp, owner, res)) 19027 unknownContent(xpp); 19028 eventType = nextNoWhitespace(xpp); 19029 } 19030 next(xpp); 19031 parseElementClose(res); 19032 return res; 19033 } 19034 19035 protected boolean parsePlanDefinitionPlanDefinitionActionComponentContent(int eventType, XmlPullParser xpp, 19036 PlanDefinition owner, PlanDefinition.PlanDefinitionActionComponent res) 19037 throws XmlPullParserException, IOException, FHIRFormatError { 19038 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { 19039 res.setPrefixElement(parseString(xpp)); 19040 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 19041 res.setTitleElement(parseString(xpp)); 19042 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 19043 res.setDescriptionElement(parseString(xpp)); 19044 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { 19045 res.setTextEquivalentElement(parseString(xpp)); 19046 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 19047 res.setPriorityElement( 19048 parseEnumeration(xpp, PlanDefinition.RequestPriority.NULL, new PlanDefinition.RequestPriorityEnumFactory())); 19049 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19050 res.getCode().add(parseCodeableConcept(xpp)); 19051 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 19052 res.getReason().add(parseCodeableConcept(xpp)); 19053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 19054 res.getDocumentation().add(parseRelatedArtifact(xpp)); 19055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("goalId")) { 19056 res.getGoalId().add(parseId(xpp)); 19057 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 19058 res.setSubject(parseType("subject", xpp)); 19059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("trigger")) { 19060 res.getTrigger().add(parseTriggerDefinition(xpp)); 19061 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 19062 res.getCondition().add(parsePlanDefinitionPlanDefinitionActionConditionComponent(xpp, owner)); 19063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { 19064 res.getInput().add(parseDataRequirement(xpp)); 19065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { 19066 res.getOutput().add(parseDataRequirement(xpp)); 19067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { 19068 res.getRelatedAction().add(parsePlanDefinitionPlanDefinitionActionRelatedActionComponent(xpp, owner)); 19069 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 19070 res.setTiming(parseType("timing", xpp)); 19071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 19072 res.getParticipant().add(parsePlanDefinitionPlanDefinitionActionParticipantComponent(xpp, owner)); 19073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 19074 res.setType(parseCodeableConcept(xpp)); 19075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { 19076 res.setGroupingBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionGroupingBehavior.NULL, 19077 new PlanDefinition.ActionGroupingBehaviorEnumFactory())); 19078 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { 19079 res.setSelectionBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionSelectionBehavior.NULL, 19080 new PlanDefinition.ActionSelectionBehaviorEnumFactory())); 19081 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { 19082 res.setRequiredBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionRequiredBehavior.NULL, 19083 new PlanDefinition.ActionRequiredBehaviorEnumFactory())); 19084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { 19085 res.setPrecheckBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionPrecheckBehavior.NULL, 19086 new PlanDefinition.ActionPrecheckBehaviorEnumFactory())); 19087 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { 19088 res.setCardinalityBehaviorElement(parseEnumeration(xpp, PlanDefinition.ActionCardinalityBehavior.NULL, 19089 new PlanDefinition.ActionCardinalityBehaviorEnumFactory())); 19090 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definition")) { 19091 res.setDefinition(parseType("definition", xpp)); 19092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { 19093 res.setTransformElement(parseCanonical(xpp)); 19094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dynamicValue")) { 19095 res.getDynamicValue().add(parsePlanDefinitionPlanDefinitionActionDynamicValueComponent(xpp, owner)); 19096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 19097 res.getAction().add(parsePlanDefinitionPlanDefinitionActionComponent(xpp, owner)); 19098 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19099 return false; 19100 return true; 19101 } 19102 19103 protected PlanDefinition.PlanDefinitionActionConditionComponent parsePlanDefinitionPlanDefinitionActionConditionComponent( 19104 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 19105 PlanDefinition.PlanDefinitionActionConditionComponent res = new PlanDefinition.PlanDefinitionActionConditionComponent(); 19106 parseBackboneAttributes(xpp, res); 19107 next(xpp); 19108 int eventType = nextNoWhitespace(xpp); 19109 while (eventType != XmlPullParser.END_TAG) { 19110 if (!parsePlanDefinitionPlanDefinitionActionConditionComponentContent(eventType, xpp, owner, res)) 19111 unknownContent(xpp); 19112 eventType = nextNoWhitespace(xpp); 19113 } 19114 next(xpp); 19115 parseElementClose(res); 19116 return res; 19117 } 19118 19119 protected boolean parsePlanDefinitionPlanDefinitionActionConditionComponentContent(int eventType, XmlPullParser xpp, 19120 PlanDefinition owner, PlanDefinition.PlanDefinitionActionConditionComponent res) 19121 throws XmlPullParserException, IOException, FHIRFormatError { 19122 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 19123 res.setKindElement(parseEnumeration(xpp, PlanDefinition.ActionConditionKind.NULL, 19124 new PlanDefinition.ActionConditionKindEnumFactory())); 19125 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 19126 res.setExpression(parseExpression(xpp)); 19127 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19128 return false; 19129 return true; 19130 } 19131 19132 protected PlanDefinition.PlanDefinitionActionRelatedActionComponent parsePlanDefinitionPlanDefinitionActionRelatedActionComponent( 19133 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 19134 PlanDefinition.PlanDefinitionActionRelatedActionComponent res = new PlanDefinition.PlanDefinitionActionRelatedActionComponent(); 19135 parseBackboneAttributes(xpp, res); 19136 next(xpp); 19137 int eventType = nextNoWhitespace(xpp); 19138 while (eventType != XmlPullParser.END_TAG) { 19139 if (!parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(eventType, xpp, owner, res)) 19140 unknownContent(xpp); 19141 eventType = nextNoWhitespace(xpp); 19142 } 19143 next(xpp); 19144 parseElementClose(res); 19145 return res; 19146 } 19147 19148 protected boolean parsePlanDefinitionPlanDefinitionActionRelatedActionComponentContent(int eventType, 19149 XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionRelatedActionComponent res) 19150 throws XmlPullParserException, IOException, FHIRFormatError { 19151 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { 19152 res.setActionIdElement(parseId(xpp)); 19153 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 19154 res.setRelationshipElement(parseEnumeration(xpp, PlanDefinition.ActionRelationshipType.NULL, 19155 new PlanDefinition.ActionRelationshipTypeEnumFactory())); 19156 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { 19157 res.setOffset(parseType("offset", xpp)); 19158 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19159 return false; 19160 return true; 19161 } 19162 19163 protected PlanDefinition.PlanDefinitionActionParticipantComponent parsePlanDefinitionPlanDefinitionActionParticipantComponent( 19164 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 19165 PlanDefinition.PlanDefinitionActionParticipantComponent res = new PlanDefinition.PlanDefinitionActionParticipantComponent(); 19166 parseBackboneAttributes(xpp, res); 19167 next(xpp); 19168 int eventType = nextNoWhitespace(xpp); 19169 while (eventType != XmlPullParser.END_TAG) { 19170 if (!parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(eventType, xpp, owner, res)) 19171 unknownContent(xpp); 19172 eventType = nextNoWhitespace(xpp); 19173 } 19174 next(xpp); 19175 parseElementClose(res); 19176 return res; 19177 } 19178 19179 protected boolean parsePlanDefinitionPlanDefinitionActionParticipantComponentContent(int eventType, XmlPullParser xpp, 19180 PlanDefinition owner, PlanDefinition.PlanDefinitionActionParticipantComponent res) 19181 throws XmlPullParserException, IOException, FHIRFormatError { 19182 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 19183 res.setTypeElement(parseEnumeration(xpp, PlanDefinition.ActionParticipantType.NULL, 19184 new PlanDefinition.ActionParticipantTypeEnumFactory())); 19185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 19186 res.setRole(parseCodeableConcept(xpp)); 19187 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19188 return false; 19189 return true; 19190 } 19191 19192 protected PlanDefinition.PlanDefinitionActionDynamicValueComponent parsePlanDefinitionPlanDefinitionActionDynamicValueComponent( 19193 XmlPullParser xpp, PlanDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 19194 PlanDefinition.PlanDefinitionActionDynamicValueComponent res = new PlanDefinition.PlanDefinitionActionDynamicValueComponent(); 19195 parseBackboneAttributes(xpp, res); 19196 next(xpp); 19197 int eventType = nextNoWhitespace(xpp); 19198 while (eventType != XmlPullParser.END_TAG) { 19199 if (!parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(eventType, xpp, owner, res)) 19200 unknownContent(xpp); 19201 eventType = nextNoWhitespace(xpp); 19202 } 19203 next(xpp); 19204 parseElementClose(res); 19205 return res; 19206 } 19207 19208 protected boolean parsePlanDefinitionPlanDefinitionActionDynamicValueComponentContent(int eventType, 19209 XmlPullParser xpp, PlanDefinition owner, PlanDefinition.PlanDefinitionActionDynamicValueComponent res) 19210 throws XmlPullParserException, IOException, FHIRFormatError { 19211 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 19212 res.setPathElement(parseString(xpp)); 19213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 19214 res.setExpression(parseExpression(xpp)); 19215 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19216 return false; 19217 return true; 19218 } 19219 19220 protected Practitioner parsePractitioner(XmlPullParser xpp) 19221 throws XmlPullParserException, IOException, FHIRFormatError { 19222 Practitioner res = new Practitioner(); 19223 parseDomainResourceAttributes(xpp, res); 19224 next(xpp); 19225 int eventType = nextNoWhitespace(xpp); 19226 while (eventType != XmlPullParser.END_TAG) { 19227 if (!parsePractitionerContent(eventType, xpp, res)) 19228 unknownContent(xpp); 19229 eventType = nextNoWhitespace(xpp); 19230 } 19231 next(xpp); 19232 parseElementClose(res); 19233 return res; 19234 } 19235 19236 protected boolean parsePractitionerContent(int eventType, XmlPullParser xpp, Practitioner res) 19237 throws XmlPullParserException, IOException, FHIRFormatError { 19238 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19239 res.getIdentifier().add(parseIdentifier(xpp)); 19240 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 19241 res.setActiveElement(parseBoolean(xpp)); 19242 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 19243 res.getName().add(parseHumanName(xpp)); 19244 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 19245 res.getTelecom().add(parseContactPoint(xpp)); 19246 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 19247 res.getAddress().add(parseAddress(xpp)); 19248 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 19249 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 19250 new Enumerations.AdministrativeGenderEnumFactory())); 19251 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { 19252 res.setBirthDateElement(parseDate(xpp)); 19253 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { 19254 res.getPhoto().add(parseAttachment(xpp)); 19255 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualification")) { 19256 res.getQualification().add(parsePractitionerPractitionerQualificationComponent(xpp, res)); 19257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { 19258 res.getCommunication().add(parseCodeableConcept(xpp)); 19259 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19260 return false; 19261 return true; 19262 } 19263 19264 protected Practitioner.PractitionerQualificationComponent parsePractitionerPractitionerQualificationComponent( 19265 XmlPullParser xpp, Practitioner owner) throws XmlPullParserException, IOException, FHIRFormatError { 19266 Practitioner.PractitionerQualificationComponent res = new Practitioner.PractitionerQualificationComponent(); 19267 parseBackboneAttributes(xpp, res); 19268 next(xpp); 19269 int eventType = nextNoWhitespace(xpp); 19270 while (eventType != XmlPullParser.END_TAG) { 19271 if (!parsePractitionerPractitionerQualificationComponentContent(eventType, xpp, owner, res)) 19272 unknownContent(xpp); 19273 eventType = nextNoWhitespace(xpp); 19274 } 19275 next(xpp); 19276 parseElementClose(res); 19277 return res; 19278 } 19279 19280 protected boolean parsePractitionerPractitionerQualificationComponentContent(int eventType, XmlPullParser xpp, 19281 Practitioner owner, Practitioner.PractitionerQualificationComponent res) 19282 throws XmlPullParserException, IOException, FHIRFormatError { 19283 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19284 res.getIdentifier().add(parseIdentifier(xpp)); 19285 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19286 res.setCode(parseCodeableConcept(xpp)); 19287 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 19288 res.setPeriod(parsePeriod(xpp)); 19289 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issuer")) { 19290 res.setIssuer(parseReference(xpp)); 19291 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19292 return false; 19293 return true; 19294 } 19295 19296 protected PractitionerRole parsePractitionerRole(XmlPullParser xpp) 19297 throws XmlPullParserException, IOException, FHIRFormatError { 19298 PractitionerRole res = new PractitionerRole(); 19299 parseDomainResourceAttributes(xpp, res); 19300 next(xpp); 19301 int eventType = nextNoWhitespace(xpp); 19302 while (eventType != XmlPullParser.END_TAG) { 19303 if (!parsePractitionerRoleContent(eventType, xpp, res)) 19304 unknownContent(xpp); 19305 eventType = nextNoWhitespace(xpp); 19306 } 19307 next(xpp); 19308 parseElementClose(res); 19309 return res; 19310 } 19311 19312 protected boolean parsePractitionerRoleContent(int eventType, XmlPullParser xpp, PractitionerRole res) 19313 throws XmlPullParserException, IOException, FHIRFormatError { 19314 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19315 res.getIdentifier().add(parseIdentifier(xpp)); 19316 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 19317 res.setActiveElement(parseBoolean(xpp)); 19318 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 19319 res.setPeriod(parsePeriod(xpp)); 19320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("practitioner")) { 19321 res.setPractitioner(parseReference(xpp)); 19322 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 19323 res.setOrganization(parseReference(xpp)); 19324 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19325 res.getCode().add(parseCodeableConcept(xpp)); 19326 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 19327 res.getSpecialty().add(parseCodeableConcept(xpp)); 19328 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 19329 res.getLocation().add(parseReference(xpp)); 19330 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("healthcareService")) { 19331 res.getHealthcareService().add(parseReference(xpp)); 19332 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 19333 res.getTelecom().add(parseContactPoint(xpp)); 19334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableTime")) { 19335 res.getAvailableTime().add(parsePractitionerRolePractitionerRoleAvailableTimeComponent(xpp, res)); 19336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("notAvailable")) { 19337 res.getNotAvailable().add(parsePractitionerRolePractitionerRoleNotAvailableComponent(xpp, res)); 19338 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availabilityExceptions")) { 19339 res.setAvailabilityExceptionsElement(parseString(xpp)); 19340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 19341 res.getEndpoint().add(parseReference(xpp)); 19342 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19343 return false; 19344 return true; 19345 } 19346 19347 protected PractitionerRole.PractitionerRoleAvailableTimeComponent parsePractitionerRolePractitionerRoleAvailableTimeComponent( 19348 XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { 19349 PractitionerRole.PractitionerRoleAvailableTimeComponent res = new PractitionerRole.PractitionerRoleAvailableTimeComponent(); 19350 parseBackboneAttributes(xpp, res); 19351 next(xpp); 19352 int eventType = nextNoWhitespace(xpp); 19353 while (eventType != XmlPullParser.END_TAG) { 19354 if (!parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(eventType, xpp, owner, res)) 19355 unknownContent(xpp); 19356 eventType = nextNoWhitespace(xpp); 19357 } 19358 next(xpp); 19359 parseElementClose(res); 19360 return res; 19361 } 19362 19363 protected boolean parsePractitionerRolePractitionerRoleAvailableTimeComponentContent(int eventType, XmlPullParser xpp, 19364 PractitionerRole owner, PractitionerRole.PractitionerRoleAvailableTimeComponent res) 19365 throws XmlPullParserException, IOException, FHIRFormatError { 19366 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("daysOfWeek")) { 19367 res.getDaysOfWeek() 19368 .add(parseEnumeration(xpp, PractitionerRole.DaysOfWeek.NULL, new PractitionerRole.DaysOfWeekEnumFactory())); 19369 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("allDay")) { 19370 res.setAllDayElement(parseBoolean(xpp)); 19371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableStartTime")) { 19372 res.setAvailableStartTimeElement(parseTime(xpp)); 19373 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("availableEndTime")) { 19374 res.setAvailableEndTimeElement(parseTime(xpp)); 19375 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19376 return false; 19377 return true; 19378 } 19379 19380 protected PractitionerRole.PractitionerRoleNotAvailableComponent parsePractitionerRolePractitionerRoleNotAvailableComponent( 19381 XmlPullParser xpp, PractitionerRole owner) throws XmlPullParserException, IOException, FHIRFormatError { 19382 PractitionerRole.PractitionerRoleNotAvailableComponent res = new PractitionerRole.PractitionerRoleNotAvailableComponent(); 19383 parseBackboneAttributes(xpp, res); 19384 next(xpp); 19385 int eventType = nextNoWhitespace(xpp); 19386 while (eventType != XmlPullParser.END_TAG) { 19387 if (!parsePractitionerRolePractitionerRoleNotAvailableComponentContent(eventType, xpp, owner, res)) 19388 unknownContent(xpp); 19389 eventType = nextNoWhitespace(xpp); 19390 } 19391 next(xpp); 19392 parseElementClose(res); 19393 return res; 19394 } 19395 19396 protected boolean parsePractitionerRolePractitionerRoleNotAvailableComponentContent(int eventType, XmlPullParser xpp, 19397 PractitionerRole owner, PractitionerRole.PractitionerRoleNotAvailableComponent res) 19398 throws XmlPullParserException, IOException, FHIRFormatError { 19399 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 19400 res.setDescriptionElement(parseString(xpp)); 19401 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("during")) { 19402 res.setDuring(parsePeriod(xpp)); 19403 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19404 return false; 19405 return true; 19406 } 19407 19408 protected Procedure parseProcedure(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 19409 Procedure res = new Procedure(); 19410 parseDomainResourceAttributes(xpp, res); 19411 next(xpp); 19412 int eventType = nextNoWhitespace(xpp); 19413 while (eventType != XmlPullParser.END_TAG) { 19414 if (!parseProcedureContent(eventType, xpp, res)) 19415 unknownContent(xpp); 19416 eventType = nextNoWhitespace(xpp); 19417 } 19418 next(xpp); 19419 parseElementClose(res); 19420 return res; 19421 } 19422 19423 protected boolean parseProcedureContent(int eventType, XmlPullParser xpp, Procedure res) 19424 throws XmlPullParserException, IOException, FHIRFormatError { 19425 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19426 res.getIdentifier().add(parseIdentifier(xpp)); 19427 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 19428 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 19429 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 19430 res.getInstantiatesUri().add(parseUri(xpp)); 19431 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 19432 res.getBasedOn().add(parseReference(xpp)); 19433 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 19434 res.getPartOf().add(parseReference(xpp)); 19435 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 19436 res.setStatusElement( 19437 parseEnumeration(xpp, Procedure.ProcedureStatus.NULL, new Procedure.ProcedureStatusEnumFactory())); 19438 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 19439 res.setStatusReason(parseCodeableConcept(xpp)); 19440 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 19441 res.setCategory(parseCodeableConcept(xpp)); 19442 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19443 res.setCode(parseCodeableConcept(xpp)); 19444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 19445 res.setSubject(parseReference(xpp)); 19446 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 19447 res.setEncounter(parseReference(xpp)); 19448 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "performed")) { 19449 res.setPerformed(parseType("performed", xpp)); 19450 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorder")) { 19451 res.setRecorder(parseReference(xpp)); 19452 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("asserter")) { 19453 res.setAsserter(parseReference(xpp)); 19454 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 19455 res.getPerformer().add(parseProcedureProcedurePerformerComponent(xpp, res)); 19456 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 19457 res.setLocation(parseReference(xpp)); 19458 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 19459 res.getReasonCode().add(parseCodeableConcept(xpp)); 19460 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 19461 res.getReasonReference().add(parseReference(xpp)); 19462 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 19463 res.getBodySite().add(parseCodeableConcept(xpp)); 19464 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 19465 res.setOutcome(parseCodeableConcept(xpp)); 19466 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("report")) { 19467 res.getReport().add(parseReference(xpp)); 19468 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complication")) { 19469 res.getComplication().add(parseCodeableConcept(xpp)); 19470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("complicationDetail")) { 19471 res.getComplicationDetail().add(parseReference(xpp)); 19472 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("followUp")) { 19473 res.getFollowUp().add(parseCodeableConcept(xpp)); 19474 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 19475 res.getNote().add(parseAnnotation(xpp)); 19476 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focalDevice")) { 19477 res.getFocalDevice().add(parseProcedureProcedureFocalDeviceComponent(xpp, res)); 19478 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedReference")) { 19479 res.getUsedReference().add(parseReference(xpp)); 19480 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usedCode")) { 19481 res.getUsedCode().add(parseCodeableConcept(xpp)); 19482 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19483 return false; 19484 return true; 19485 } 19486 19487 protected Procedure.ProcedurePerformerComponent parseProcedureProcedurePerformerComponent(XmlPullParser xpp, 19488 Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { 19489 Procedure.ProcedurePerformerComponent res = new Procedure.ProcedurePerformerComponent(); 19490 parseBackboneAttributes(xpp, res); 19491 next(xpp); 19492 int eventType = nextNoWhitespace(xpp); 19493 while (eventType != XmlPullParser.END_TAG) { 19494 if (!parseProcedureProcedurePerformerComponentContent(eventType, xpp, owner, res)) 19495 unknownContent(xpp); 19496 eventType = nextNoWhitespace(xpp); 19497 } 19498 next(xpp); 19499 parseElementClose(res); 19500 return res; 19501 } 19502 19503 protected boolean parseProcedureProcedurePerformerComponentContent(int eventType, XmlPullParser xpp, Procedure owner, 19504 Procedure.ProcedurePerformerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 19505 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("function")) { 19506 res.setFunction(parseCodeableConcept(xpp)); 19507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 19508 res.setActor(parseReference(xpp)); 19509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { 19510 res.setOnBehalfOf(parseReference(xpp)); 19511 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19512 return false; 19513 return true; 19514 } 19515 19516 protected Procedure.ProcedureFocalDeviceComponent parseProcedureProcedureFocalDeviceComponent(XmlPullParser xpp, 19517 Procedure owner) throws XmlPullParserException, IOException, FHIRFormatError { 19518 Procedure.ProcedureFocalDeviceComponent res = new Procedure.ProcedureFocalDeviceComponent(); 19519 parseBackboneAttributes(xpp, res); 19520 next(xpp); 19521 int eventType = nextNoWhitespace(xpp); 19522 while (eventType != XmlPullParser.END_TAG) { 19523 if (!parseProcedureProcedureFocalDeviceComponentContent(eventType, xpp, owner, res)) 19524 unknownContent(xpp); 19525 eventType = nextNoWhitespace(xpp); 19526 } 19527 next(xpp); 19528 parseElementClose(res); 19529 return res; 19530 } 19531 19532 protected boolean parseProcedureProcedureFocalDeviceComponentContent(int eventType, XmlPullParser xpp, 19533 Procedure owner, Procedure.ProcedureFocalDeviceComponent res) 19534 throws XmlPullParserException, IOException, FHIRFormatError { 19535 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 19536 res.setAction(parseCodeableConcept(xpp)); 19537 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("manipulated")) { 19538 res.setManipulated(parseReference(xpp)); 19539 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19540 return false; 19541 return true; 19542 } 19543 19544 protected Provenance parseProvenance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 19545 Provenance res = new Provenance(); 19546 parseDomainResourceAttributes(xpp, res); 19547 next(xpp); 19548 int eventType = nextNoWhitespace(xpp); 19549 while (eventType != XmlPullParser.END_TAG) { 19550 if (!parseProvenanceContent(eventType, xpp, res)) 19551 unknownContent(xpp); 19552 eventType = nextNoWhitespace(xpp); 19553 } 19554 next(xpp); 19555 parseElementClose(res); 19556 return res; 19557 } 19558 19559 protected boolean parseProvenanceContent(int eventType, XmlPullParser xpp, Provenance res) 19560 throws XmlPullParserException, IOException, FHIRFormatError { 19561 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 19562 res.getTarget().add(parseReference(xpp)); 19563 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurred")) { 19564 res.setOccurred(parseType("occurred", xpp)); 19565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recorded")) { 19566 res.setRecordedElement(parseInstant(xpp)); 19567 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("policy")) { 19568 res.getPolicy().add(parseUri(xpp)); 19569 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 19570 res.setLocation(parseReference(xpp)); 19571 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 19572 res.getReason().add(parseCodeableConcept(xpp)); 19573 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("activity")) { 19574 res.setActivity(parseCodeableConcept(xpp)); 19575 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { 19576 res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, res)); 19577 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("entity")) { 19578 res.getEntity().add(parseProvenanceProvenanceEntityComponent(xpp, res)); 19579 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("signature")) { 19580 res.getSignature().add(parseSignature(xpp)); 19581 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19582 return false; 19583 return true; 19584 } 19585 19586 protected Provenance.ProvenanceAgentComponent parseProvenanceProvenanceAgentComponent(XmlPullParser xpp, 19587 Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { 19588 Provenance.ProvenanceAgentComponent res = new Provenance.ProvenanceAgentComponent(); 19589 parseBackboneAttributes(xpp, res); 19590 next(xpp); 19591 int eventType = nextNoWhitespace(xpp); 19592 while (eventType != XmlPullParser.END_TAG) { 19593 if (!parseProvenanceProvenanceAgentComponentContent(eventType, xpp, owner, res)) 19594 unknownContent(xpp); 19595 eventType = nextNoWhitespace(xpp); 19596 } 19597 next(xpp); 19598 parseElementClose(res); 19599 return res; 19600 } 19601 19602 protected boolean parseProvenanceProvenanceAgentComponentContent(int eventType, XmlPullParser xpp, Provenance owner, 19603 Provenance.ProvenanceAgentComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 19604 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 19605 res.setType(parseCodeableConcept(xpp)); 19606 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 19607 res.getRole().add(parseCodeableConcept(xpp)); 19608 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { 19609 res.setWho(parseReference(xpp)); 19610 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { 19611 res.setOnBehalfOf(parseReference(xpp)); 19612 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19613 return false; 19614 return true; 19615 } 19616 19617 protected Provenance.ProvenanceEntityComponent parseProvenanceProvenanceEntityComponent(XmlPullParser xpp, 19618 Provenance owner) throws XmlPullParserException, IOException, FHIRFormatError { 19619 Provenance.ProvenanceEntityComponent res = new Provenance.ProvenanceEntityComponent(); 19620 parseBackboneAttributes(xpp, res); 19621 next(xpp); 19622 int eventType = nextNoWhitespace(xpp); 19623 while (eventType != XmlPullParser.END_TAG) { 19624 if (!parseProvenanceProvenanceEntityComponentContent(eventType, xpp, owner, res)) 19625 unknownContent(xpp); 19626 eventType = nextNoWhitespace(xpp); 19627 } 19628 next(xpp); 19629 parseElementClose(res); 19630 return res; 19631 } 19632 19633 protected boolean parseProvenanceProvenanceEntityComponentContent(int eventType, XmlPullParser xpp, Provenance owner, 19634 Provenance.ProvenanceEntityComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 19635 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 19636 res.setRoleElement(parseEnumeration(xpp, Provenance.ProvenanceEntityRole.NULL, 19637 new Provenance.ProvenanceEntityRoleEnumFactory())); 19638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("what")) { 19639 res.setWhat(parseReference(xpp)); 19640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("agent")) { 19641 res.getAgent().add(parseProvenanceProvenanceAgentComponent(xpp, owner)); 19642 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19643 return false; 19644 return true; 19645 } 19646 19647 protected Questionnaire parseQuestionnaire(XmlPullParser xpp) 19648 throws XmlPullParserException, IOException, FHIRFormatError { 19649 Questionnaire res = new Questionnaire(); 19650 parseDomainResourceAttributes(xpp, res); 19651 next(xpp); 19652 int eventType = nextNoWhitespace(xpp); 19653 while (eventType != XmlPullParser.END_TAG) { 19654 if (!parseQuestionnaireContent(eventType, xpp, res)) 19655 unknownContent(xpp); 19656 eventType = nextNoWhitespace(xpp); 19657 } 19658 next(xpp); 19659 parseElementClose(res); 19660 return res; 19661 } 19662 19663 protected boolean parseQuestionnaireContent(int eventType, XmlPullParser xpp, Questionnaire res) 19664 throws XmlPullParserException, IOException, FHIRFormatError { 19665 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 19666 res.setUrlElement(parseUri(xpp)); 19667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19668 res.getIdentifier().add(parseIdentifier(xpp)); 19669 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 19670 res.setVersionElement(parseString(xpp)); 19671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 19672 res.setNameElement(parseString(xpp)); 19673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 19674 res.setTitleElement(parseString(xpp)); 19675 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { 19676 res.getDerivedFrom().add(parseCanonical(xpp)); 19677 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 19678 res.setStatusElement( 19679 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 19680 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 19681 res.setExperimentalElement(parseBoolean(xpp)); 19682 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subjectType")) { 19683 res.getSubjectType().add(parseCode(xpp)); 19684 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 19685 res.setDateElement(parseDateTime(xpp)); 19686 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 19687 res.setPublisherElement(parseString(xpp)); 19688 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 19689 res.getContact().add(parseContactDetail(xpp)); 19690 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 19691 res.setDescriptionElement(parseMarkdown(xpp)); 19692 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 19693 res.getUseContext().add(parseUsageContext(xpp)); 19694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 19695 res.getJurisdiction().add(parseCodeableConcept(xpp)); 19696 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 19697 res.setPurposeElement(parseMarkdown(xpp)); 19698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 19699 res.setCopyrightElement(parseMarkdown(xpp)); 19700 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 19701 res.setApprovalDateElement(parseDate(xpp)); 19702 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 19703 res.setLastReviewDateElement(parseDate(xpp)); 19704 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 19705 res.setEffectivePeriod(parsePeriod(xpp)); 19706 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19707 res.getCode().add(parseCoding(xpp)); 19708 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 19709 res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, res)); 19710 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19711 return false; 19712 return true; 19713 } 19714 19715 protected Questionnaire.QuestionnaireItemComponent parseQuestionnaireQuestionnaireItemComponent(XmlPullParser xpp, 19716 Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { 19717 Questionnaire.QuestionnaireItemComponent res = new Questionnaire.QuestionnaireItemComponent(); 19718 parseBackboneAttributes(xpp, res); 19719 next(xpp); 19720 int eventType = nextNoWhitespace(xpp); 19721 while (eventType != XmlPullParser.END_TAG) { 19722 if (!parseQuestionnaireQuestionnaireItemComponentContent(eventType, xpp, owner, res)) 19723 unknownContent(xpp); 19724 eventType = nextNoWhitespace(xpp); 19725 } 19726 next(xpp); 19727 parseElementClose(res); 19728 return res; 19729 } 19730 19731 protected boolean parseQuestionnaireQuestionnaireItemComponentContent(int eventType, XmlPullParser xpp, 19732 Questionnaire owner, Questionnaire.QuestionnaireItemComponent res) 19733 throws XmlPullParserException, IOException, FHIRFormatError { 19734 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 19735 res.setLinkIdElement(parseString(xpp)); 19736 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 19737 res.setDefinitionElement(parseUri(xpp)); 19738 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 19739 res.getCode().add(parseCoding(xpp)); 19740 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { 19741 res.setPrefixElement(parseString(xpp)); 19742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 19743 res.setTextElement(parseString(xpp)); 19744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 19745 res.setTypeElement(parseEnumeration(xpp, Questionnaire.QuestionnaireItemType.NULL, 19746 new Questionnaire.QuestionnaireItemTypeEnumFactory())); 19747 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enableWhen")) { 19748 res.getEnableWhen().add(parseQuestionnaireQuestionnaireItemEnableWhenComponent(xpp, owner)); 19749 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enableBehavior")) { 19750 res.setEnableBehaviorElement(parseEnumeration(xpp, Questionnaire.EnableWhenBehavior.NULL, 19751 new Questionnaire.EnableWhenBehaviorEnumFactory())); 19752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { 19753 res.setRequiredElement(parseBoolean(xpp)); 19754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeats")) { 19755 res.setRepeatsElement(parseBoolean(xpp)); 19756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("readOnly")) { 19757 res.setReadOnlyElement(parseBoolean(xpp)); 19758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxLength")) { 19759 res.setMaxLengthElement(parseInteger(xpp)); 19760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answerValueSet")) { 19761 res.setAnswerValueSetElement(parseCanonical(xpp)); 19762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answerOption")) { 19763 res.getAnswerOption().add(parseQuestionnaireQuestionnaireItemAnswerOptionComponent(xpp, owner)); 19764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initial")) { 19765 res.getInitial().add(parseQuestionnaireQuestionnaireItemInitialComponent(xpp, owner)); 19766 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 19767 res.getItem().add(parseQuestionnaireQuestionnaireItemComponent(xpp, owner)); 19768 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19769 return false; 19770 return true; 19771 } 19772 19773 protected Questionnaire.QuestionnaireItemEnableWhenComponent parseQuestionnaireQuestionnaireItemEnableWhenComponent( 19774 XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { 19775 Questionnaire.QuestionnaireItemEnableWhenComponent res = new Questionnaire.QuestionnaireItemEnableWhenComponent(); 19776 parseBackboneAttributes(xpp, res); 19777 next(xpp); 19778 int eventType = nextNoWhitespace(xpp); 19779 while (eventType != XmlPullParser.END_TAG) { 19780 if (!parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(eventType, xpp, owner, res)) 19781 unknownContent(xpp); 19782 eventType = nextNoWhitespace(xpp); 19783 } 19784 next(xpp); 19785 parseElementClose(res); 19786 return res; 19787 } 19788 19789 protected boolean parseQuestionnaireQuestionnaireItemEnableWhenComponentContent(int eventType, XmlPullParser xpp, 19790 Questionnaire owner, Questionnaire.QuestionnaireItemEnableWhenComponent res) 19791 throws XmlPullParserException, IOException, FHIRFormatError { 19792 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("question")) { 19793 res.setQuestionElement(parseString(xpp)); 19794 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { 19795 res.setOperatorElement(parseEnumeration(xpp, Questionnaire.QuestionnaireItemOperator.NULL, 19796 new Questionnaire.QuestionnaireItemOperatorEnumFactory())); 19797 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "answer")) { 19798 res.setAnswer(parseType("answer", xpp)); 19799 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19800 return false; 19801 return true; 19802 } 19803 19804 protected Questionnaire.QuestionnaireItemAnswerOptionComponent parseQuestionnaireQuestionnaireItemAnswerOptionComponent( 19805 XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { 19806 Questionnaire.QuestionnaireItemAnswerOptionComponent res = new Questionnaire.QuestionnaireItemAnswerOptionComponent(); 19807 parseBackboneAttributes(xpp, res); 19808 next(xpp); 19809 int eventType = nextNoWhitespace(xpp); 19810 while (eventType != XmlPullParser.END_TAG) { 19811 if (!parseQuestionnaireQuestionnaireItemAnswerOptionComponentContent(eventType, xpp, owner, res)) 19812 unknownContent(xpp); 19813 eventType = nextNoWhitespace(xpp); 19814 } 19815 next(xpp); 19816 parseElementClose(res); 19817 return res; 19818 } 19819 19820 protected boolean parseQuestionnaireQuestionnaireItemAnswerOptionComponentContent(int eventType, XmlPullParser xpp, 19821 Questionnaire owner, Questionnaire.QuestionnaireItemAnswerOptionComponent res) 19822 throws XmlPullParserException, IOException, FHIRFormatError { 19823 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 19824 res.setValue(parseType("value", xpp)); 19825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("initialSelected")) { 19826 res.setInitialSelectedElement(parseBoolean(xpp)); 19827 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19828 return false; 19829 return true; 19830 } 19831 19832 protected Questionnaire.QuestionnaireItemInitialComponent parseQuestionnaireQuestionnaireItemInitialComponent( 19833 XmlPullParser xpp, Questionnaire owner) throws XmlPullParserException, IOException, FHIRFormatError { 19834 Questionnaire.QuestionnaireItemInitialComponent res = new Questionnaire.QuestionnaireItemInitialComponent(); 19835 parseBackboneAttributes(xpp, res); 19836 next(xpp); 19837 int eventType = nextNoWhitespace(xpp); 19838 while (eventType != XmlPullParser.END_TAG) { 19839 if (!parseQuestionnaireQuestionnaireItemInitialComponentContent(eventType, xpp, owner, res)) 19840 unknownContent(xpp); 19841 eventType = nextNoWhitespace(xpp); 19842 } 19843 next(xpp); 19844 parseElementClose(res); 19845 return res; 19846 } 19847 19848 protected boolean parseQuestionnaireQuestionnaireItemInitialComponentContent(int eventType, XmlPullParser xpp, 19849 Questionnaire owner, Questionnaire.QuestionnaireItemInitialComponent res) 19850 throws XmlPullParserException, IOException, FHIRFormatError { 19851 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 19852 res.setValue(parseType("value", xpp)); 19853 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19854 return false; 19855 return true; 19856 } 19857 19858 protected QuestionnaireResponse parseQuestionnaireResponse(XmlPullParser xpp) 19859 throws XmlPullParserException, IOException, FHIRFormatError { 19860 QuestionnaireResponse res = new QuestionnaireResponse(); 19861 parseDomainResourceAttributes(xpp, res); 19862 next(xpp); 19863 int eventType = nextNoWhitespace(xpp); 19864 while (eventType != XmlPullParser.END_TAG) { 19865 if (!parseQuestionnaireResponseContent(eventType, xpp, res)) 19866 unknownContent(xpp); 19867 eventType = nextNoWhitespace(xpp); 19868 } 19869 next(xpp); 19870 parseElementClose(res); 19871 return res; 19872 } 19873 19874 protected boolean parseQuestionnaireResponseContent(int eventType, XmlPullParser xpp, QuestionnaireResponse res) 19875 throws XmlPullParserException, IOException, FHIRFormatError { 19876 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19877 res.setIdentifier(parseIdentifier(xpp)); 19878 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 19879 res.getBasedOn().add(parseReference(xpp)); 19880 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 19881 res.getPartOf().add(parseReference(xpp)); 19882 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("questionnaire")) { 19883 res.setQuestionnaireElement(parseCanonical(xpp)); 19884 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 19885 res.setStatusElement(parseEnumeration(xpp, QuestionnaireResponse.QuestionnaireResponseStatus.NULL, 19886 new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory())); 19887 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 19888 res.setSubject(parseReference(xpp)); 19889 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 19890 res.setEncounter(parseReference(xpp)); 19891 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authored")) { 19892 res.setAuthoredElement(parseDateTime(xpp)); 19893 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 19894 res.setAuthor(parseReference(xpp)); 19895 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 19896 res.setSource(parseReference(xpp)); 19897 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 19898 res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, res)); 19899 } else if (!parseDomainResourceContent(eventType, xpp, res)) 19900 return false; 19901 return true; 19902 } 19903 19904 protected QuestionnaireResponse.QuestionnaireResponseItemComponent parseQuestionnaireResponseQuestionnaireResponseItemComponent( 19905 XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 19906 QuestionnaireResponse.QuestionnaireResponseItemComponent res = new QuestionnaireResponse.QuestionnaireResponseItemComponent(); 19907 parseBackboneAttributes(xpp, res); 19908 next(xpp); 19909 int eventType = nextNoWhitespace(xpp); 19910 while (eventType != XmlPullParser.END_TAG) { 19911 if (!parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(eventType, xpp, owner, res)) 19912 unknownContent(xpp); 19913 eventType = nextNoWhitespace(xpp); 19914 } 19915 next(xpp); 19916 parseElementClose(res); 19917 return res; 19918 } 19919 19920 protected boolean parseQuestionnaireResponseQuestionnaireResponseItemComponentContent(int eventType, 19921 XmlPullParser xpp, QuestionnaireResponse owner, QuestionnaireResponse.QuestionnaireResponseItemComponent res) 19922 throws XmlPullParserException, IOException, FHIRFormatError { 19923 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkId")) { 19924 res.setLinkIdElement(parseString(xpp)); 19925 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 19926 res.setDefinitionElement(parseUri(xpp)); 19927 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("text")) { 19928 res.setTextElement(parseString(xpp)); 19929 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("answer")) { 19930 res.getAnswer().add(parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(xpp, owner)); 19931 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 19932 res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); 19933 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19934 return false; 19935 return true; 19936 } 19937 19938 protected QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponent( 19939 XmlPullParser xpp, QuestionnaireResponse owner) throws XmlPullParserException, IOException, FHIRFormatError { 19940 QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res = new QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent(); 19941 parseBackboneAttributes(xpp, res); 19942 next(xpp); 19943 int eventType = nextNoWhitespace(xpp); 19944 while (eventType != XmlPullParser.END_TAG) { 19945 if (!parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(eventType, xpp, owner, res)) 19946 unknownContent(xpp); 19947 eventType = nextNoWhitespace(xpp); 19948 } 19949 next(xpp); 19950 parseElementClose(res); 19951 return res; 19952 } 19953 19954 protected boolean parseQuestionnaireResponseQuestionnaireResponseItemAnswerComponentContent(int eventType, 19955 XmlPullParser xpp, QuestionnaireResponse owner, 19956 QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent res) 19957 throws XmlPullParserException, IOException, FHIRFormatError { 19958 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 19959 res.setValue(parseType("value", xpp)); 19960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("item")) { 19961 res.getItem().add(parseQuestionnaireResponseQuestionnaireResponseItemComponent(xpp, owner)); 19962 } else if (!parseBackboneElementContent(eventType, xpp, res)) 19963 return false; 19964 return true; 19965 } 19966 19967 protected RelatedPerson parseRelatedPerson(XmlPullParser xpp) 19968 throws XmlPullParserException, IOException, FHIRFormatError { 19969 RelatedPerson res = new RelatedPerson(); 19970 parseDomainResourceAttributes(xpp, res); 19971 next(xpp); 19972 int eventType = nextNoWhitespace(xpp); 19973 while (eventType != XmlPullParser.END_TAG) { 19974 if (!parseRelatedPersonContent(eventType, xpp, res)) 19975 unknownContent(xpp); 19976 eventType = nextNoWhitespace(xpp); 19977 } 19978 next(xpp); 19979 parseElementClose(res); 19980 return res; 19981 } 19982 19983 protected boolean parseRelatedPersonContent(int eventType, XmlPullParser xpp, RelatedPerson res) 19984 throws XmlPullParserException, IOException, FHIRFormatError { 19985 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 19986 res.getIdentifier().add(parseIdentifier(xpp)); 19987 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 19988 res.setActiveElement(parseBoolean(xpp)); 19989 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 19990 res.setPatient(parseReference(xpp)); 19991 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 19992 res.getRelationship().add(parseCodeableConcept(xpp)); 19993 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 19994 res.getName().add(parseHumanName(xpp)); 19995 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("telecom")) { 19996 res.getTelecom().add(parseContactPoint(xpp)); 19997 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gender")) { 19998 res.setGenderElement(parseEnumeration(xpp, Enumerations.AdministrativeGender.NULL, 19999 new Enumerations.AdministrativeGenderEnumFactory())); 20000 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("birthDate")) { 20001 res.setBirthDateElement(parseDate(xpp)); 20002 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("address")) { 20003 res.getAddress().add(parseAddress(xpp)); 20004 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("photo")) { 20005 res.getPhoto().add(parseAttachment(xpp)); 20006 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 20007 res.setPeriod(parsePeriod(xpp)); 20008 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communication")) { 20009 res.getCommunication().add(parseRelatedPersonRelatedPersonCommunicationComponent(xpp, res)); 20010 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20011 return false; 20012 return true; 20013 } 20014 20015 protected RelatedPerson.RelatedPersonCommunicationComponent parseRelatedPersonRelatedPersonCommunicationComponent( 20016 XmlPullParser xpp, RelatedPerson owner) throws XmlPullParserException, IOException, FHIRFormatError { 20017 RelatedPerson.RelatedPersonCommunicationComponent res = new RelatedPerson.RelatedPersonCommunicationComponent(); 20018 parseBackboneAttributes(xpp, res); 20019 next(xpp); 20020 int eventType = nextNoWhitespace(xpp); 20021 while (eventType != XmlPullParser.END_TAG) { 20022 if (!parseRelatedPersonRelatedPersonCommunicationComponentContent(eventType, xpp, owner, res)) 20023 unknownContent(xpp); 20024 eventType = nextNoWhitespace(xpp); 20025 } 20026 next(xpp); 20027 parseElementClose(res); 20028 return res; 20029 } 20030 20031 protected boolean parseRelatedPersonRelatedPersonCommunicationComponentContent(int eventType, XmlPullParser xpp, 20032 RelatedPerson owner, RelatedPerson.RelatedPersonCommunicationComponent res) 20033 throws XmlPullParserException, IOException, FHIRFormatError { 20034 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 20035 res.setLanguage(parseCodeableConcept(xpp)); 20036 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { 20037 res.setPreferredElement(parseBoolean(xpp)); 20038 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20039 return false; 20040 return true; 20041 } 20042 20043 protected RequestGroup parseRequestGroup(XmlPullParser xpp) 20044 throws XmlPullParserException, IOException, FHIRFormatError { 20045 RequestGroup res = new RequestGroup(); 20046 parseDomainResourceAttributes(xpp, res); 20047 next(xpp); 20048 int eventType = nextNoWhitespace(xpp); 20049 while (eventType != XmlPullParser.END_TAG) { 20050 if (!parseRequestGroupContent(eventType, xpp, res)) 20051 unknownContent(xpp); 20052 eventType = nextNoWhitespace(xpp); 20053 } 20054 next(xpp); 20055 parseElementClose(res); 20056 return res; 20057 } 20058 20059 protected boolean parseRequestGroupContent(int eventType, XmlPullParser xpp, RequestGroup res) 20060 throws XmlPullParserException, IOException, FHIRFormatError { 20061 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20062 res.getIdentifier().add(parseIdentifier(xpp)); 20063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 20064 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 20065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 20066 res.getInstantiatesUri().add(parseUri(xpp)); 20067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 20068 res.getBasedOn().add(parseReference(xpp)); 20069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 20070 res.getReplaces().add(parseReference(xpp)); 20071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { 20072 res.setGroupIdentifier(parseIdentifier(xpp)); 20073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20074 res.setStatusElement( 20075 parseEnumeration(xpp, RequestGroup.RequestStatus.NULL, new RequestGroup.RequestStatusEnumFactory())); 20076 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 20077 res.setIntentElement( 20078 parseEnumeration(xpp, RequestGroup.RequestIntent.NULL, new RequestGroup.RequestIntentEnumFactory())); 20079 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 20080 res.setPriorityElement( 20081 parseEnumeration(xpp, RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); 20082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 20083 res.setCode(parseCodeableConcept(xpp)); 20084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 20085 res.setSubject(parseReference(xpp)); 20086 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 20087 res.setEncounter(parseReference(xpp)); 20088 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 20089 res.setAuthoredOnElement(parseDateTime(xpp)); 20090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 20091 res.setAuthor(parseReference(xpp)); 20092 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 20093 res.getReasonCode().add(parseCodeableConcept(xpp)); 20094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 20095 res.getReasonReference().add(parseReference(xpp)); 20096 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20097 res.getNote().add(parseAnnotation(xpp)); 20098 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 20099 res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, res)); 20100 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20101 return false; 20102 return true; 20103 } 20104 20105 protected RequestGroup.RequestGroupActionComponent parseRequestGroupRequestGroupActionComponent(XmlPullParser xpp, 20106 RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { 20107 RequestGroup.RequestGroupActionComponent res = new RequestGroup.RequestGroupActionComponent(); 20108 parseBackboneAttributes(xpp, res); 20109 next(xpp); 20110 int eventType = nextNoWhitespace(xpp); 20111 while (eventType != XmlPullParser.END_TAG) { 20112 if (!parseRequestGroupRequestGroupActionComponentContent(eventType, xpp, owner, res)) 20113 unknownContent(xpp); 20114 eventType = nextNoWhitespace(xpp); 20115 } 20116 next(xpp); 20117 parseElementClose(res); 20118 return res; 20119 } 20120 20121 protected boolean parseRequestGroupRequestGroupActionComponentContent(int eventType, XmlPullParser xpp, 20122 RequestGroup owner, RequestGroup.RequestGroupActionComponent res) 20123 throws XmlPullParserException, IOException, FHIRFormatError { 20124 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prefix")) { 20125 res.setPrefixElement(parseString(xpp)); 20126 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 20127 res.setTitleElement(parseString(xpp)); 20128 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20129 res.setDescriptionElement(parseString(xpp)); 20130 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textEquivalent")) { 20131 res.setTextEquivalentElement(parseString(xpp)); 20132 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 20133 res.setPriorityElement( 20134 parseEnumeration(xpp, RequestGroup.RequestPriority.NULL, new RequestGroup.RequestPriorityEnumFactory())); 20135 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 20136 res.getCode().add(parseCodeableConcept(xpp)); 20137 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 20138 res.getDocumentation().add(parseRelatedArtifact(xpp)); 20139 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 20140 res.getCondition().add(parseRequestGroupRequestGroupActionConditionComponent(xpp, owner)); 20141 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedAction")) { 20142 res.getRelatedAction().add(parseRequestGroupRequestGroupActionRelatedActionComponent(xpp, owner)); 20143 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "timing")) { 20144 res.setTiming(parseType("timing", xpp)); 20145 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 20146 res.getParticipant().add(parseReference(xpp)); 20147 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20148 res.setType(parseCodeableConcept(xpp)); 20149 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupingBehavior")) { 20150 res.setGroupingBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionGroupingBehavior.NULL, 20151 new RequestGroup.ActionGroupingBehaviorEnumFactory())); 20152 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("selectionBehavior")) { 20153 res.setSelectionBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionSelectionBehavior.NULL, 20154 new RequestGroup.ActionSelectionBehaviorEnumFactory())); 20155 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requiredBehavior")) { 20156 res.setRequiredBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionRequiredBehavior.NULL, 20157 new RequestGroup.ActionRequiredBehaviorEnumFactory())); 20158 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precheckBehavior")) { 20159 res.setPrecheckBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionPrecheckBehavior.NULL, 20160 new RequestGroup.ActionPrecheckBehaviorEnumFactory())); 20161 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cardinalityBehavior")) { 20162 res.setCardinalityBehaviorElement(parseEnumeration(xpp, RequestGroup.ActionCardinalityBehavior.NULL, 20163 new RequestGroup.ActionCardinalityBehaviorEnumFactory())); 20164 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 20165 res.setResource(parseReference(xpp)); 20166 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 20167 res.getAction().add(parseRequestGroupRequestGroupActionComponent(xpp, owner)); 20168 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20169 return false; 20170 return true; 20171 } 20172 20173 protected RequestGroup.RequestGroupActionConditionComponent parseRequestGroupRequestGroupActionConditionComponent( 20174 XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { 20175 RequestGroup.RequestGroupActionConditionComponent res = new RequestGroup.RequestGroupActionConditionComponent(); 20176 parseBackboneAttributes(xpp, res); 20177 next(xpp); 20178 int eventType = nextNoWhitespace(xpp); 20179 while (eventType != XmlPullParser.END_TAG) { 20180 if (!parseRequestGroupRequestGroupActionConditionComponentContent(eventType, xpp, owner, res)) 20181 unknownContent(xpp); 20182 eventType = nextNoWhitespace(xpp); 20183 } 20184 next(xpp); 20185 parseElementClose(res); 20186 return res; 20187 } 20188 20189 protected boolean parseRequestGroupRequestGroupActionConditionComponentContent(int eventType, XmlPullParser xpp, 20190 RequestGroup owner, RequestGroup.RequestGroupActionConditionComponent res) 20191 throws XmlPullParserException, IOException, FHIRFormatError { 20192 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 20193 res.setKindElement(parseEnumeration(xpp, RequestGroup.ActionConditionKind.NULL, 20194 new RequestGroup.ActionConditionKindEnumFactory())); 20195 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 20196 res.setExpression(parseExpression(xpp)); 20197 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20198 return false; 20199 return true; 20200 } 20201 20202 protected RequestGroup.RequestGroupActionRelatedActionComponent parseRequestGroupRequestGroupActionRelatedActionComponent( 20203 XmlPullParser xpp, RequestGroup owner) throws XmlPullParserException, IOException, FHIRFormatError { 20204 RequestGroup.RequestGroupActionRelatedActionComponent res = new RequestGroup.RequestGroupActionRelatedActionComponent(); 20205 parseBackboneAttributes(xpp, res); 20206 next(xpp); 20207 int eventType = nextNoWhitespace(xpp); 20208 while (eventType != XmlPullParser.END_TAG) { 20209 if (!parseRequestGroupRequestGroupActionRelatedActionComponentContent(eventType, xpp, owner, res)) 20210 unknownContent(xpp); 20211 eventType = nextNoWhitespace(xpp); 20212 } 20213 next(xpp); 20214 parseElementClose(res); 20215 return res; 20216 } 20217 20218 protected boolean parseRequestGroupRequestGroupActionRelatedActionComponentContent(int eventType, XmlPullParser xpp, 20219 RequestGroup owner, RequestGroup.RequestGroupActionRelatedActionComponent res) 20220 throws XmlPullParserException, IOException, FHIRFormatError { 20221 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actionId")) { 20222 res.setActionIdElement(parseId(xpp)); 20223 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 20224 res.setRelationshipElement(parseEnumeration(xpp, RequestGroup.ActionRelationshipType.NULL, 20225 new RequestGroup.ActionRelationshipTypeEnumFactory())); 20226 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "offset")) { 20227 res.setOffset(parseType("offset", xpp)); 20228 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20229 return false; 20230 return true; 20231 } 20232 20233 protected ResearchDefinition parseResearchDefinition(XmlPullParser xpp) 20234 throws XmlPullParserException, IOException, FHIRFormatError { 20235 ResearchDefinition res = new ResearchDefinition(); 20236 parseDomainResourceAttributes(xpp, res); 20237 next(xpp); 20238 int eventType = nextNoWhitespace(xpp); 20239 while (eventType != XmlPullParser.END_TAG) { 20240 if (!parseResearchDefinitionContent(eventType, xpp, res)) 20241 unknownContent(xpp); 20242 eventType = nextNoWhitespace(xpp); 20243 } 20244 next(xpp); 20245 parseElementClose(res); 20246 return res; 20247 } 20248 20249 protected boolean parseResearchDefinitionContent(int eventType, XmlPullParser xpp, ResearchDefinition res) 20250 throws XmlPullParserException, IOException, FHIRFormatError { 20251 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 20252 res.setUrlElement(parseUri(xpp)); 20253 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20254 res.getIdentifier().add(parseIdentifier(xpp)); 20255 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 20256 res.setVersionElement(parseString(xpp)); 20257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 20258 res.setNameElement(parseString(xpp)); 20259 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 20260 res.setTitleElement(parseString(xpp)); 20261 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shortTitle")) { 20262 res.setShortTitleElement(parseString(xpp)); 20263 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 20264 res.setSubtitleElement(parseString(xpp)); 20265 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20266 res.setStatusElement( 20267 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 20268 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 20269 res.setExperimentalElement(parseBoolean(xpp)); 20270 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 20271 res.setSubject(parseType("subject", xpp)); 20272 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 20273 res.setDateElement(parseDateTime(xpp)); 20274 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 20275 res.setPublisherElement(parseString(xpp)); 20276 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 20277 res.getContact().add(parseContactDetail(xpp)); 20278 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20279 res.setDescriptionElement(parseMarkdown(xpp)); 20280 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 20281 res.getComment().add(parseString(xpp)); 20282 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 20283 res.getUseContext().add(parseUsageContext(xpp)); 20284 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 20285 res.getJurisdiction().add(parseCodeableConcept(xpp)); 20286 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 20287 res.setPurposeElement(parseMarkdown(xpp)); 20288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 20289 res.setUsageElement(parseString(xpp)); 20290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 20291 res.setCopyrightElement(parseMarkdown(xpp)); 20292 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 20293 res.setApprovalDateElement(parseDate(xpp)); 20294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 20295 res.setLastReviewDateElement(parseDate(xpp)); 20296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 20297 res.setEffectivePeriod(parsePeriod(xpp)); 20298 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 20299 res.getTopic().add(parseCodeableConcept(xpp)); 20300 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 20301 res.getAuthor().add(parseContactDetail(xpp)); 20302 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 20303 res.getEditor().add(parseContactDetail(xpp)); 20304 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 20305 res.getReviewer().add(parseContactDetail(xpp)); 20306 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 20307 res.getEndorser().add(parseContactDetail(xpp)); 20308 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 20309 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 20310 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { 20311 res.getLibrary().add(parseCanonical(xpp)); 20312 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 20313 res.setPopulation(parseReference(xpp)); 20314 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposure")) { 20315 res.setExposure(parseReference(xpp)); 20316 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposureAlternative")) { 20317 res.setExposureAlternative(parseReference(xpp)); 20318 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 20319 res.setOutcome(parseReference(xpp)); 20320 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20321 return false; 20322 return true; 20323 } 20324 20325 protected ResearchElementDefinition parseResearchElementDefinition(XmlPullParser xpp) 20326 throws XmlPullParserException, IOException, FHIRFormatError { 20327 ResearchElementDefinition res = new ResearchElementDefinition(); 20328 parseDomainResourceAttributes(xpp, res); 20329 next(xpp); 20330 int eventType = nextNoWhitespace(xpp); 20331 while (eventType != XmlPullParser.END_TAG) { 20332 if (!parseResearchElementDefinitionContent(eventType, xpp, res)) 20333 unknownContent(xpp); 20334 eventType = nextNoWhitespace(xpp); 20335 } 20336 next(xpp); 20337 parseElementClose(res); 20338 return res; 20339 } 20340 20341 protected boolean parseResearchElementDefinitionContent(int eventType, XmlPullParser xpp, 20342 ResearchElementDefinition res) throws XmlPullParserException, IOException, FHIRFormatError { 20343 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 20344 res.setUrlElement(parseUri(xpp)); 20345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20346 res.getIdentifier().add(parseIdentifier(xpp)); 20347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 20348 res.setVersionElement(parseString(xpp)); 20349 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 20350 res.setNameElement(parseString(xpp)); 20351 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 20352 res.setTitleElement(parseString(xpp)); 20353 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("shortTitle")) { 20354 res.setShortTitleElement(parseString(xpp)); 20355 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtitle")) { 20356 res.setSubtitleElement(parseString(xpp)); 20357 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20358 res.setStatusElement( 20359 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 20360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 20361 res.setExperimentalElement(parseBoolean(xpp)); 20362 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "subject")) { 20363 res.setSubject(parseType("subject", xpp)); 20364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 20365 res.setDateElement(parseDateTime(xpp)); 20366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 20367 res.setPublisherElement(parseString(xpp)); 20368 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 20369 res.getContact().add(parseContactDetail(xpp)); 20370 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20371 res.setDescriptionElement(parseMarkdown(xpp)); 20372 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 20373 res.getComment().add(parseString(xpp)); 20374 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 20375 res.getUseContext().add(parseUsageContext(xpp)); 20376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 20377 res.getJurisdiction().add(parseCodeableConcept(xpp)); 20378 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 20379 res.setPurposeElement(parseMarkdown(xpp)); 20380 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usage")) { 20381 res.setUsageElement(parseString(xpp)); 20382 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 20383 res.setCopyrightElement(parseMarkdown(xpp)); 20384 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 20385 res.setApprovalDateElement(parseDate(xpp)); 20386 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 20387 res.setLastReviewDateElement(parseDate(xpp)); 20388 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 20389 res.setEffectivePeriod(parsePeriod(xpp)); 20390 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 20391 res.getTopic().add(parseCodeableConcept(xpp)); 20392 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 20393 res.getAuthor().add(parseContactDetail(xpp)); 20394 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 20395 res.getEditor().add(parseContactDetail(xpp)); 20396 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 20397 res.getReviewer().add(parseContactDetail(xpp)); 20398 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 20399 res.getEndorser().add(parseContactDetail(xpp)); 20400 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 20401 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 20402 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("library")) { 20403 res.getLibrary().add(parseCanonical(xpp)); 20404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20405 res.setTypeElement(parseEnumeration(xpp, ResearchElementDefinition.ResearchElementType.NULL, 20406 new ResearchElementDefinition.ResearchElementTypeEnumFactory())); 20407 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variableType")) { 20408 res.setVariableTypeElement(parseEnumeration(xpp, ResearchElementDefinition.VariableType.NULL, 20409 new ResearchElementDefinition.VariableTypeEnumFactory())); 20410 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("characteristic")) { 20411 res.getCharacteristic() 20412 .add(parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(xpp, res)); 20413 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20414 return false; 20415 return true; 20416 } 20417 20418 protected ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponent( 20419 XmlPullParser xpp, ResearchElementDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 20420 ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent res = new ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent(); 20421 parseBackboneAttributes(xpp, res); 20422 next(xpp); 20423 int eventType = nextNoWhitespace(xpp); 20424 while (eventType != XmlPullParser.END_TAG) { 20425 if (!parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponentContent(eventType, xpp, owner, 20426 res)) 20427 unknownContent(xpp); 20428 eventType = nextNoWhitespace(xpp); 20429 } 20430 next(xpp); 20431 parseElementClose(res); 20432 return res; 20433 } 20434 20435 protected boolean parseResearchElementDefinitionResearchElementDefinitionCharacteristicComponentContent(int eventType, 20436 XmlPullParser xpp, ResearchElementDefinition owner, 20437 ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent res) 20438 throws XmlPullParserException, IOException, FHIRFormatError { 20439 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definition")) { 20440 res.setDefinition(parseType("definition", xpp)); 20441 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("usageContext")) { 20442 res.getUsageContext().add(parseUsageContext(xpp)); 20443 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { 20444 res.setExcludeElement(parseBoolean(xpp)); 20445 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitOfMeasure")) { 20446 res.setUnitOfMeasure(parseCodeableConcept(xpp)); 20447 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("studyEffectiveDescription")) { 20448 res.setStudyEffectiveDescriptionElement(parseString(xpp)); 20449 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "studyEffective")) { 20450 res.setStudyEffective(parseType("studyEffective", xpp)); 20451 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("studyEffectiveTimeFromStart")) { 20452 res.setStudyEffectiveTimeFromStart(parseDuration(xpp)); 20453 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("studyEffectiveGroupMeasure")) { 20454 res.setStudyEffectiveGroupMeasureElement(parseEnumeration(xpp, ResearchElementDefinition.GroupMeasure.NULL, 20455 new ResearchElementDefinition.GroupMeasureEnumFactory())); 20456 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantEffectiveDescription")) { 20457 res.setParticipantEffectiveDescriptionElement(parseString(xpp)); 20458 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "participantEffective")) { 20459 res.setParticipantEffective(parseType("participantEffective", xpp)); 20460 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantEffectiveTimeFromStart")) { 20461 res.setParticipantEffectiveTimeFromStart(parseDuration(xpp)); 20462 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participantEffectiveGroupMeasure")) { 20463 res.setParticipantEffectiveGroupMeasureElement(parseEnumeration(xpp, ResearchElementDefinition.GroupMeasure.NULL, 20464 new ResearchElementDefinition.GroupMeasureEnumFactory())); 20465 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20466 return false; 20467 return true; 20468 } 20469 20470 protected ResearchStudy parseResearchStudy(XmlPullParser xpp) 20471 throws XmlPullParserException, IOException, FHIRFormatError { 20472 ResearchStudy res = new ResearchStudy(); 20473 parseDomainResourceAttributes(xpp, res); 20474 next(xpp); 20475 int eventType = nextNoWhitespace(xpp); 20476 while (eventType != XmlPullParser.END_TAG) { 20477 if (!parseResearchStudyContent(eventType, xpp, res)) 20478 unknownContent(xpp); 20479 eventType = nextNoWhitespace(xpp); 20480 } 20481 next(xpp); 20482 parseElementClose(res); 20483 return res; 20484 } 20485 20486 protected boolean parseResearchStudyContent(int eventType, XmlPullParser xpp, ResearchStudy res) 20487 throws XmlPullParserException, IOException, FHIRFormatError { 20488 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20489 res.getIdentifier().add(parseIdentifier(xpp)); 20490 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 20491 res.setTitleElement(parseString(xpp)); 20492 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protocol")) { 20493 res.getProtocol().add(parseReference(xpp)); 20494 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 20495 res.getPartOf().add(parseReference(xpp)); 20496 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20497 res.setStatusElement(parseEnumeration(xpp, ResearchStudy.ResearchStudyStatus.NULL, 20498 new ResearchStudy.ResearchStudyStatusEnumFactory())); 20499 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("primaryPurposeType")) { 20500 res.setPrimaryPurposeType(parseCodeableConcept(xpp)); 20501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("phase")) { 20502 res.setPhase(parseCodeableConcept(xpp)); 20503 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 20504 res.getCategory().add(parseCodeableConcept(xpp)); 20505 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 20506 res.getFocus().add(parseCodeableConcept(xpp)); 20507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 20508 res.getCondition().add(parseCodeableConcept(xpp)); 20509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 20510 res.getContact().add(parseContactDetail(xpp)); 20511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 20512 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 20513 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { 20514 res.getKeyword().add(parseCodeableConcept(xpp)); 20515 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 20516 res.getLocation().add(parseCodeableConcept(xpp)); 20517 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20518 res.setDescriptionElement(parseMarkdown(xpp)); 20519 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("enrollment")) { 20520 res.getEnrollment().add(parseReference(xpp)); 20521 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 20522 res.setPeriod(parsePeriod(xpp)); 20523 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sponsor")) { 20524 res.setSponsor(parseReference(xpp)); 20525 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("principalInvestigator")) { 20526 res.setPrincipalInvestigator(parseReference(xpp)); 20527 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("site")) { 20528 res.getSite().add(parseReference(xpp)); 20529 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonStopped")) { 20530 res.setReasonStopped(parseCodeableConcept(xpp)); 20531 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20532 res.getNote().add(parseAnnotation(xpp)); 20533 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("arm")) { 20534 res.getArm().add(parseResearchStudyResearchStudyArmComponent(xpp, res)); 20535 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("objective")) { 20536 res.getObjective().add(parseResearchStudyResearchStudyObjectiveComponent(xpp, res)); 20537 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20538 return false; 20539 return true; 20540 } 20541 20542 protected ResearchStudy.ResearchStudyArmComponent parseResearchStudyResearchStudyArmComponent(XmlPullParser xpp, 20543 ResearchStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { 20544 ResearchStudy.ResearchStudyArmComponent res = new ResearchStudy.ResearchStudyArmComponent(); 20545 parseBackboneAttributes(xpp, res); 20546 next(xpp); 20547 int eventType = nextNoWhitespace(xpp); 20548 while (eventType != XmlPullParser.END_TAG) { 20549 if (!parseResearchStudyResearchStudyArmComponentContent(eventType, xpp, owner, res)) 20550 unknownContent(xpp); 20551 eventType = nextNoWhitespace(xpp); 20552 } 20553 next(xpp); 20554 parseElementClose(res); 20555 return res; 20556 } 20557 20558 protected boolean parseResearchStudyResearchStudyArmComponentContent(int eventType, XmlPullParser xpp, 20559 ResearchStudy owner, ResearchStudy.ResearchStudyArmComponent res) 20560 throws XmlPullParserException, IOException, FHIRFormatError { 20561 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 20562 res.setNameElement(parseString(xpp)); 20563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20564 res.setType(parseCodeableConcept(xpp)); 20565 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20566 res.setDescriptionElement(parseString(xpp)); 20567 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20568 return false; 20569 return true; 20570 } 20571 20572 protected ResearchStudy.ResearchStudyObjectiveComponent parseResearchStudyResearchStudyObjectiveComponent( 20573 XmlPullParser xpp, ResearchStudy owner) throws XmlPullParserException, IOException, FHIRFormatError { 20574 ResearchStudy.ResearchStudyObjectiveComponent res = new ResearchStudy.ResearchStudyObjectiveComponent(); 20575 parseBackboneAttributes(xpp, res); 20576 next(xpp); 20577 int eventType = nextNoWhitespace(xpp); 20578 while (eventType != XmlPullParser.END_TAG) { 20579 if (!parseResearchStudyResearchStudyObjectiveComponentContent(eventType, xpp, owner, res)) 20580 unknownContent(xpp); 20581 eventType = nextNoWhitespace(xpp); 20582 } 20583 next(xpp); 20584 parseElementClose(res); 20585 return res; 20586 } 20587 20588 protected boolean parseResearchStudyResearchStudyObjectiveComponentContent(int eventType, XmlPullParser xpp, 20589 ResearchStudy owner, ResearchStudy.ResearchStudyObjectiveComponent res) 20590 throws XmlPullParserException, IOException, FHIRFormatError { 20591 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 20592 res.setNameElement(parseString(xpp)); 20593 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20594 res.setType(parseCodeableConcept(xpp)); 20595 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20596 return false; 20597 return true; 20598 } 20599 20600 protected ResearchSubject parseResearchSubject(XmlPullParser xpp) 20601 throws XmlPullParserException, IOException, FHIRFormatError { 20602 ResearchSubject res = new ResearchSubject(); 20603 parseDomainResourceAttributes(xpp, res); 20604 next(xpp); 20605 int eventType = nextNoWhitespace(xpp); 20606 while (eventType != XmlPullParser.END_TAG) { 20607 if (!parseResearchSubjectContent(eventType, xpp, res)) 20608 unknownContent(xpp); 20609 eventType = nextNoWhitespace(xpp); 20610 } 20611 next(xpp); 20612 parseElementClose(res); 20613 return res; 20614 } 20615 20616 protected boolean parseResearchSubjectContent(int eventType, XmlPullParser xpp, ResearchSubject res) 20617 throws XmlPullParserException, IOException, FHIRFormatError { 20618 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20619 res.getIdentifier().add(parseIdentifier(xpp)); 20620 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20621 res.setStatusElement(parseEnumeration(xpp, ResearchSubject.ResearchSubjectStatus.NULL, 20622 new ResearchSubject.ResearchSubjectStatusEnumFactory())); 20623 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 20624 res.setPeriod(parsePeriod(xpp)); 20625 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("study")) { 20626 res.setStudy(parseReference(xpp)); 20627 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("individual")) { 20628 res.setIndividual(parseReference(xpp)); 20629 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assignedArm")) { 20630 res.setAssignedArmElement(parseString(xpp)); 20631 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actualArm")) { 20632 res.setActualArmElement(parseString(xpp)); 20633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("consent")) { 20634 res.setConsent(parseReference(xpp)); 20635 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20636 return false; 20637 return true; 20638 } 20639 20640 protected RiskAssessment parseRiskAssessment(XmlPullParser xpp) 20641 throws XmlPullParserException, IOException, FHIRFormatError { 20642 RiskAssessment res = new RiskAssessment(); 20643 parseDomainResourceAttributes(xpp, res); 20644 next(xpp); 20645 int eventType = nextNoWhitespace(xpp); 20646 while (eventType != XmlPullParser.END_TAG) { 20647 if (!parseRiskAssessmentContent(eventType, xpp, res)) 20648 unknownContent(xpp); 20649 eventType = nextNoWhitespace(xpp); 20650 } 20651 next(xpp); 20652 parseElementClose(res); 20653 return res; 20654 } 20655 20656 protected boolean parseRiskAssessmentContent(int eventType, XmlPullParser xpp, RiskAssessment res) 20657 throws XmlPullParserException, IOException, FHIRFormatError { 20658 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20659 res.getIdentifier().add(parseIdentifier(xpp)); 20660 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 20661 res.setBasedOn(parseReference(xpp)); 20662 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 20663 res.setParent(parseReference(xpp)); 20664 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20665 res.setStatusElement(parseEnumeration(xpp, RiskAssessment.RiskAssessmentStatus.NULL, 20666 new RiskAssessment.RiskAssessmentStatusEnumFactory())); 20667 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 20668 res.setMethod(parseCodeableConcept(xpp)); 20669 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 20670 res.setCode(parseCodeableConcept(xpp)); 20671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 20672 res.setSubject(parseReference(xpp)); 20673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 20674 res.setEncounter(parseReference(xpp)); 20675 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 20676 res.setOccurrence(parseType("occurrence", xpp)); 20677 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 20678 res.setCondition(parseReference(xpp)); 20679 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 20680 res.setPerformer(parseReference(xpp)); 20681 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 20682 res.getReasonCode().add(parseCodeableConcept(xpp)); 20683 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 20684 res.getReasonReference().add(parseReference(xpp)); 20685 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basis")) { 20686 res.getBasis().add(parseReference(xpp)); 20687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prediction")) { 20688 res.getPrediction().add(parseRiskAssessmentRiskAssessmentPredictionComponent(xpp, res)); 20689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mitigation")) { 20690 res.setMitigationElement(parseString(xpp)); 20691 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20692 res.getNote().add(parseAnnotation(xpp)); 20693 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20694 return false; 20695 return true; 20696 } 20697 20698 protected RiskAssessment.RiskAssessmentPredictionComponent parseRiskAssessmentRiskAssessmentPredictionComponent( 20699 XmlPullParser xpp, RiskAssessment owner) throws XmlPullParserException, IOException, FHIRFormatError { 20700 RiskAssessment.RiskAssessmentPredictionComponent res = new RiskAssessment.RiskAssessmentPredictionComponent(); 20701 parseBackboneAttributes(xpp, res); 20702 next(xpp); 20703 int eventType = nextNoWhitespace(xpp); 20704 while (eventType != XmlPullParser.END_TAG) { 20705 if (!parseRiskAssessmentRiskAssessmentPredictionComponentContent(eventType, xpp, owner, res)) 20706 unknownContent(xpp); 20707 eventType = nextNoWhitespace(xpp); 20708 } 20709 next(xpp); 20710 parseElementClose(res); 20711 return res; 20712 } 20713 20714 protected boolean parseRiskAssessmentRiskAssessmentPredictionComponentContent(int eventType, XmlPullParser xpp, 20715 RiskAssessment owner, RiskAssessment.RiskAssessmentPredictionComponent res) 20716 throws XmlPullParserException, IOException, FHIRFormatError { 20717 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 20718 res.setOutcome(parseCodeableConcept(xpp)); 20719 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "probability")) { 20720 res.setProbability(parseType("probability", xpp)); 20721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("qualitativeRisk")) { 20722 res.setQualitativeRisk(parseCodeableConcept(xpp)); 20723 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relativeRisk")) { 20724 res.setRelativeRiskElement(parseDecimal(xpp)); 20725 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "when")) { 20726 res.setWhen(parseType("when", xpp)); 20727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rationale")) { 20728 res.setRationaleElement(parseString(xpp)); 20729 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20730 return false; 20731 return true; 20732 } 20733 20734 protected RiskEvidenceSynthesis parseRiskEvidenceSynthesis(XmlPullParser xpp) 20735 throws XmlPullParserException, IOException, FHIRFormatError { 20736 RiskEvidenceSynthesis res = new RiskEvidenceSynthesis(); 20737 parseDomainResourceAttributes(xpp, res); 20738 next(xpp); 20739 int eventType = nextNoWhitespace(xpp); 20740 while (eventType != XmlPullParser.END_TAG) { 20741 if (!parseRiskEvidenceSynthesisContent(eventType, xpp, res)) 20742 unknownContent(xpp); 20743 eventType = nextNoWhitespace(xpp); 20744 } 20745 next(xpp); 20746 parseElementClose(res); 20747 return res; 20748 } 20749 20750 protected boolean parseRiskEvidenceSynthesisContent(int eventType, XmlPullParser xpp, RiskEvidenceSynthesis res) 20751 throws XmlPullParserException, IOException, FHIRFormatError { 20752 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 20753 res.setUrlElement(parseUri(xpp)); 20754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 20755 res.getIdentifier().add(parseIdentifier(xpp)); 20756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 20757 res.setVersionElement(parseString(xpp)); 20758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 20759 res.setNameElement(parseString(xpp)); 20760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 20761 res.setTitleElement(parseString(xpp)); 20762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 20763 res.setStatusElement( 20764 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 20765 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 20766 res.setDateElement(parseDateTime(xpp)); 20767 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 20768 res.setPublisherElement(parseString(xpp)); 20769 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 20770 res.getContact().add(parseContactDetail(xpp)); 20771 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20772 res.setDescriptionElement(parseMarkdown(xpp)); 20773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20774 res.getNote().add(parseAnnotation(xpp)); 20775 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 20776 res.getUseContext().add(parseUsageContext(xpp)); 20777 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 20778 res.getJurisdiction().add(parseCodeableConcept(xpp)); 20779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 20780 res.setCopyrightElement(parseMarkdown(xpp)); 20781 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("approvalDate")) { 20782 res.setApprovalDateElement(parseDate(xpp)); 20783 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastReviewDate")) { 20784 res.setLastReviewDateElement(parseDate(xpp)); 20785 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("effectivePeriod")) { 20786 res.setEffectivePeriod(parsePeriod(xpp)); 20787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("topic")) { 20788 res.getTopic().add(parseCodeableConcept(xpp)); 20789 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 20790 res.getAuthor().add(parseContactDetail(xpp)); 20791 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("editor")) { 20792 res.getEditor().add(parseContactDetail(xpp)); 20793 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reviewer")) { 20794 res.getReviewer().add(parseContactDetail(xpp)); 20795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endorser")) { 20796 res.getEndorser().add(parseContactDetail(xpp)); 20797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relatedArtifact")) { 20798 res.getRelatedArtifact().add(parseRelatedArtifact(xpp)); 20799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("synthesisType")) { 20800 res.setSynthesisType(parseCodeableConcept(xpp)); 20801 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("studyType")) { 20802 res.setStudyType(parseCodeableConcept(xpp)); 20803 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("population")) { 20804 res.setPopulation(parseReference(xpp)); 20805 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exposure")) { 20806 res.setExposure(parseReference(xpp)); 20807 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("outcome")) { 20808 res.setOutcome(parseReference(xpp)); 20809 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sampleSize")) { 20810 res.setSampleSize(parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent(xpp, res)); 20811 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("riskEstimate")) { 20812 res.setRiskEstimate(parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent(xpp, res)); 20813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certainty")) { 20814 res.getCertainty().add(parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(xpp, res)); 20815 } else if (!parseDomainResourceContent(eventType, xpp, res)) 20816 return false; 20817 return true; 20818 } 20819 20820 protected RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent( 20821 XmlPullParser xpp, RiskEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 20822 RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent(); 20823 parseBackboneAttributes(xpp, res); 20824 next(xpp); 20825 int eventType = nextNoWhitespace(xpp); 20826 while (eventType != XmlPullParser.END_TAG) { 20827 if (!parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentContent(eventType, xpp, owner, res)) 20828 unknownContent(xpp); 20829 eventType = nextNoWhitespace(xpp); 20830 } 20831 next(xpp); 20832 parseElementClose(res); 20833 return res; 20834 } 20835 20836 protected boolean parseRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentContent(int eventType, 20837 XmlPullParser xpp, RiskEvidenceSynthesis owner, 20838 RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent res) 20839 throws XmlPullParserException, IOException, FHIRFormatError { 20840 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20841 res.setDescriptionElement(parseString(xpp)); 20842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfStudies")) { 20843 res.setNumberOfStudiesElement(parseInteger(xpp)); 20844 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfParticipants")) { 20845 res.setNumberOfParticipantsElement(parseInteger(xpp)); 20846 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20847 return false; 20848 return true; 20849 } 20850 20851 protected RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent( 20852 XmlPullParser xpp, RiskEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 20853 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent(); 20854 parseBackboneAttributes(xpp, res); 20855 next(xpp); 20856 int eventType = nextNoWhitespace(xpp); 20857 while (eventType != XmlPullParser.END_TAG) { 20858 if (!parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentContent(eventType, xpp, owner, res)) 20859 unknownContent(xpp); 20860 eventType = nextNoWhitespace(xpp); 20861 } 20862 next(xpp); 20863 parseElementClose(res); 20864 return res; 20865 } 20866 20867 protected boolean parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentContent(int eventType, 20868 XmlPullParser xpp, RiskEvidenceSynthesis owner, 20869 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent res) 20870 throws XmlPullParserException, IOException, FHIRFormatError { 20871 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 20872 res.setDescriptionElement(parseString(xpp)); 20873 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20874 res.setType(parseCodeableConcept(xpp)); 20875 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 20876 res.setValueElement(parseDecimal(xpp)); 20877 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("unitOfMeasure")) { 20878 res.setUnitOfMeasure(parseCodeableConcept(xpp)); 20879 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("denominatorCount")) { 20880 res.setDenominatorCountElement(parseInteger(xpp)); 20881 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numeratorCount")) { 20882 res.setNumeratorCountElement(parseInteger(xpp)); 20883 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("precisionEstimate")) { 20884 res.getPrecisionEstimate() 20885 .add(parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(xpp, owner)); 20886 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20887 return false; 20888 return true; 20889 } 20890 20891 protected RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent( 20892 XmlPullParser xpp, RiskEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 20893 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(); 20894 parseBackboneAttributes(xpp, res); 20895 next(xpp); 20896 int eventType = nextNoWhitespace(xpp); 20897 while (eventType != XmlPullParser.END_TAG) { 20898 if (!parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentContent(eventType, xpp, 20899 owner, res)) 20900 unknownContent(xpp); 20901 eventType = nextNoWhitespace(xpp); 20902 } 20903 next(xpp); 20904 parseElementClose(res); 20905 return res; 20906 } 20907 20908 protected boolean parseRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentContent( 20909 int eventType, XmlPullParser xpp, RiskEvidenceSynthesis owner, 20910 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent res) 20911 throws XmlPullParserException, IOException, FHIRFormatError { 20912 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20913 res.setType(parseCodeableConcept(xpp)); 20914 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("level")) { 20915 res.setLevelElement(parseDecimal(xpp)); 20916 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("from")) { 20917 res.setFromElement(parseDecimal(xpp)); 20918 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("to")) { 20919 res.setToElement(parseDecimal(xpp)); 20920 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20921 return false; 20922 return true; 20923 } 20924 20925 protected RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent( 20926 XmlPullParser xpp, RiskEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 20927 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent(); 20928 parseBackboneAttributes(xpp, res); 20929 next(xpp); 20930 int eventType = nextNoWhitespace(xpp); 20931 while (eventType != XmlPullParser.END_TAG) { 20932 if (!parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentContent(eventType, xpp, owner, res)) 20933 unknownContent(xpp); 20934 eventType = nextNoWhitespace(xpp); 20935 } 20936 next(xpp); 20937 parseElementClose(res); 20938 return res; 20939 } 20940 20941 protected boolean parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentContent(int eventType, 20942 XmlPullParser xpp, RiskEvidenceSynthesis owner, RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent res) 20943 throws XmlPullParserException, IOException, FHIRFormatError { 20944 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rating")) { 20945 res.getRating().add(parseCodeableConcept(xpp)); 20946 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20947 res.getNote().add(parseAnnotation(xpp)); 20948 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("certaintySubcomponent")) { 20949 res.getCertaintySubcomponent() 20950 .add(parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(xpp, owner)); 20951 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20952 return false; 20953 return true; 20954 } 20955 20956 protected RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent( 20957 XmlPullParser xpp, RiskEvidenceSynthesis owner) throws XmlPullParserException, IOException, FHIRFormatError { 20958 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent res = new RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(); 20959 parseBackboneAttributes(xpp, res); 20960 next(xpp); 20961 int eventType = nextNoWhitespace(xpp); 20962 while (eventType != XmlPullParser.END_TAG) { 20963 if (!parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentContent(eventType, xpp, 20964 owner, res)) 20965 unknownContent(xpp); 20966 eventType = nextNoWhitespace(xpp); 20967 } 20968 next(xpp); 20969 parseElementClose(res); 20970 return res; 20971 } 20972 20973 protected boolean parseRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentContent( 20974 int eventType, XmlPullParser xpp, RiskEvidenceSynthesis owner, 20975 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent res) 20976 throws XmlPullParserException, IOException, FHIRFormatError { 20977 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 20978 res.setType(parseCodeableConcept(xpp)); 20979 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rating")) { 20980 res.getRating().add(parseCodeableConcept(xpp)); 20981 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 20982 res.getNote().add(parseAnnotation(xpp)); 20983 } else if (!parseBackboneElementContent(eventType, xpp, res)) 20984 return false; 20985 return true; 20986 } 20987 20988 protected Schedule parseSchedule(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 20989 Schedule res = new Schedule(); 20990 parseDomainResourceAttributes(xpp, res); 20991 next(xpp); 20992 int eventType = nextNoWhitespace(xpp); 20993 while (eventType != XmlPullParser.END_TAG) { 20994 if (!parseScheduleContent(eventType, xpp, res)) 20995 unknownContent(xpp); 20996 eventType = nextNoWhitespace(xpp); 20997 } 20998 next(xpp); 20999 parseElementClose(res); 21000 return res; 21001 } 21002 21003 protected boolean parseScheduleContent(int eventType, XmlPullParser xpp, Schedule res) 21004 throws XmlPullParserException, IOException, FHIRFormatError { 21005 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21006 res.getIdentifier().add(parseIdentifier(xpp)); 21007 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("active")) { 21008 res.setActiveElement(parseBoolean(xpp)); 21009 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { 21010 res.getServiceCategory().add(parseCodeableConcept(xpp)); 21011 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { 21012 res.getServiceType().add(parseCodeableConcept(xpp)); 21013 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 21014 res.getSpecialty().add(parseCodeableConcept(xpp)); 21015 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("actor")) { 21016 res.getActor().add(parseReference(xpp)); 21017 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("planningHorizon")) { 21018 res.setPlanningHorizon(parsePeriod(xpp)); 21019 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 21020 res.setCommentElement(parseString(xpp)); 21021 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21022 return false; 21023 return true; 21024 } 21025 21026 protected SearchParameter parseSearchParameter(XmlPullParser xpp) 21027 throws XmlPullParserException, IOException, FHIRFormatError { 21028 SearchParameter res = new SearchParameter(); 21029 parseDomainResourceAttributes(xpp, res); 21030 next(xpp); 21031 int eventType = nextNoWhitespace(xpp); 21032 while (eventType != XmlPullParser.END_TAG) { 21033 if (!parseSearchParameterContent(eventType, xpp, res)) 21034 unknownContent(xpp); 21035 eventType = nextNoWhitespace(xpp); 21036 } 21037 next(xpp); 21038 parseElementClose(res); 21039 return res; 21040 } 21041 21042 protected boolean parseSearchParameterContent(int eventType, XmlPullParser xpp, SearchParameter res) 21043 throws XmlPullParserException, IOException, FHIRFormatError { 21044 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 21045 res.setUrlElement(parseUri(xpp)); 21046 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 21047 res.setVersionElement(parseString(xpp)); 21048 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21049 res.setNameElement(parseString(xpp)); 21050 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivedFrom")) { 21051 res.setDerivedFromElement(parseCanonical(xpp)); 21052 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21053 res.setStatusElement( 21054 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 21055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 21056 res.setExperimentalElement(parseBoolean(xpp)); 21057 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 21058 res.setDateElement(parseDateTime(xpp)); 21059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 21060 res.setPublisherElement(parseString(xpp)); 21061 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 21062 res.getContact().add(parseContactDetail(xpp)); 21063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21064 res.setDescriptionElement(parseMarkdown(xpp)); 21065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 21066 res.getUseContext().add(parseUsageContext(xpp)); 21067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 21068 res.getJurisdiction().add(parseCodeableConcept(xpp)); 21069 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 21070 res.setPurposeElement(parseMarkdown(xpp)); 21071 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 21072 res.setCodeElement(parseCode(xpp)); 21073 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { 21074 res.getBase().add(parseCode(xpp)); 21075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21076 res.setTypeElement( 21077 parseEnumeration(xpp, Enumerations.SearchParamType.NULL, new Enumerations.SearchParamTypeEnumFactory())); 21078 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 21079 res.setExpressionElement(parseString(xpp)); 21080 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpath")) { 21081 res.setXpathElement(parseString(xpp)); 21082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("xpathUsage")) { 21083 res.setXpathUsageElement( 21084 parseEnumeration(xpp, SearchParameter.XPathUsageType.NULL, new SearchParameter.XPathUsageTypeEnumFactory())); 21085 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 21086 res.getTarget().add(parseCode(xpp)); 21087 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("multipleOr")) { 21088 res.setMultipleOrElement(parseBoolean(xpp)); 21089 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("multipleAnd")) { 21090 res.setMultipleAndElement(parseBoolean(xpp)); 21091 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comparator")) { 21092 res.getComparator().add(parseEnumeration(xpp, SearchParameter.SearchComparator.NULL, 21093 new SearchParameter.SearchComparatorEnumFactory())); 21094 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modifier")) { 21095 res.getModifier().add(parseEnumeration(xpp, SearchParameter.SearchModifierCode.NULL, 21096 new SearchParameter.SearchModifierCodeEnumFactory())); 21097 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("chain")) { 21098 res.getChain().add(parseString(xpp)); 21099 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("component")) { 21100 res.getComponent().add(parseSearchParameterSearchParameterComponentComponent(xpp, res)); 21101 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21102 return false; 21103 return true; 21104 } 21105 21106 protected SearchParameter.SearchParameterComponentComponent parseSearchParameterSearchParameterComponentComponent( 21107 XmlPullParser xpp, SearchParameter owner) throws XmlPullParserException, IOException, FHIRFormatError { 21108 SearchParameter.SearchParameterComponentComponent res = new SearchParameter.SearchParameterComponentComponent(); 21109 parseBackboneAttributes(xpp, res); 21110 next(xpp); 21111 int eventType = nextNoWhitespace(xpp); 21112 while (eventType != XmlPullParser.END_TAG) { 21113 if (!parseSearchParameterSearchParameterComponentComponentContent(eventType, xpp, owner, res)) 21114 unknownContent(xpp); 21115 eventType = nextNoWhitespace(xpp); 21116 } 21117 next(xpp); 21118 parseElementClose(res); 21119 return res; 21120 } 21121 21122 protected boolean parseSearchParameterSearchParameterComponentComponentContent(int eventType, XmlPullParser xpp, 21123 SearchParameter owner, SearchParameter.SearchParameterComponentComponent res) 21124 throws XmlPullParserException, IOException, FHIRFormatError { 21125 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("definition")) { 21126 res.setDefinitionElement(parseCanonical(xpp)); 21127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 21128 res.setExpressionElement(parseString(xpp)); 21129 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21130 return false; 21131 return true; 21132 } 21133 21134 protected ServiceRequest parseServiceRequest(XmlPullParser xpp) 21135 throws XmlPullParserException, IOException, FHIRFormatError { 21136 ServiceRequest res = new ServiceRequest(); 21137 parseDomainResourceAttributes(xpp, res); 21138 next(xpp); 21139 int eventType = nextNoWhitespace(xpp); 21140 while (eventType != XmlPullParser.END_TAG) { 21141 if (!parseServiceRequestContent(eventType, xpp, res)) 21142 unknownContent(xpp); 21143 eventType = nextNoWhitespace(xpp); 21144 } 21145 next(xpp); 21146 parseElementClose(res); 21147 return res; 21148 } 21149 21150 protected boolean parseServiceRequestContent(int eventType, XmlPullParser xpp, ServiceRequest res) 21151 throws XmlPullParserException, IOException, FHIRFormatError { 21152 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21153 res.getIdentifier().add(parseIdentifier(xpp)); 21154 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 21155 res.getInstantiatesCanonical().add(parseCanonical(xpp)); 21156 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 21157 res.getInstantiatesUri().add(parseUri(xpp)); 21158 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 21159 res.getBasedOn().add(parseReference(xpp)); 21160 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("replaces")) { 21161 res.getReplaces().add(parseReference(xpp)); 21162 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requisition")) { 21163 res.setRequisition(parseIdentifier(xpp)); 21164 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21165 res.setStatusElement(parseEnumeration(xpp, ServiceRequest.ServiceRequestStatus.NULL, 21166 new ServiceRequest.ServiceRequestStatusEnumFactory())); 21167 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 21168 res.setIntentElement(parseEnumeration(xpp, ServiceRequest.ServiceRequestIntent.NULL, 21169 new ServiceRequest.ServiceRequestIntentEnumFactory())); 21170 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 21171 res.getCategory().add(parseCodeableConcept(xpp)); 21172 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 21173 res.setPriorityElement(parseEnumeration(xpp, ServiceRequest.ServiceRequestPriority.NULL, 21174 new ServiceRequest.ServiceRequestPriorityEnumFactory())); 21175 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("doNotPerform")) { 21176 res.setDoNotPerformElement(parseBoolean(xpp)); 21177 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 21178 res.setCode(parseCodeableConcept(xpp)); 21179 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orderDetail")) { 21180 res.getOrderDetail().add(parseCodeableConcept(xpp)); 21181 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "quantity")) { 21182 res.setQuantity(parseType("quantity", xpp)); 21183 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 21184 res.setSubject(parseReference(xpp)); 21185 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 21186 res.setEncounter(parseReference(xpp)); 21187 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 21188 res.setOccurrence(parseType("occurrence", xpp)); 21189 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "asNeeded")) { 21190 res.setAsNeeded(parseType("asNeeded", xpp)); 21191 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 21192 res.setAuthoredOnElement(parseDateTime(xpp)); 21193 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 21194 res.setRequester(parseReference(xpp)); 21195 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { 21196 res.setPerformerType(parseCodeableConcept(xpp)); 21197 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performer")) { 21198 res.getPerformer().add(parseReference(xpp)); 21199 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("locationCode")) { 21200 res.getLocationCode().add(parseCodeableConcept(xpp)); 21201 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("locationReference")) { 21202 res.getLocationReference().add(parseReference(xpp)); 21203 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 21204 res.getReasonCode().add(parseCodeableConcept(xpp)); 21205 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 21206 res.getReasonReference().add(parseReference(xpp)); 21207 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 21208 res.getInsurance().add(parseReference(xpp)); 21209 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supportingInfo")) { 21210 res.getSupportingInfo().add(parseReference(xpp)); 21211 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimen")) { 21212 res.getSpecimen().add(parseReference(xpp)); 21213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 21214 res.getBodySite().add(parseCodeableConcept(xpp)); 21215 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 21216 res.getNote().add(parseAnnotation(xpp)); 21217 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientInstruction")) { 21218 res.setPatientInstructionElement(parseString(xpp)); 21219 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { 21220 res.getRelevantHistory().add(parseReference(xpp)); 21221 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21222 return false; 21223 return true; 21224 } 21225 21226 protected Slot parseSlot(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 21227 Slot res = new Slot(); 21228 parseDomainResourceAttributes(xpp, res); 21229 next(xpp); 21230 int eventType = nextNoWhitespace(xpp); 21231 while (eventType != XmlPullParser.END_TAG) { 21232 if (!parseSlotContent(eventType, xpp, res)) 21233 unknownContent(xpp); 21234 eventType = nextNoWhitespace(xpp); 21235 } 21236 next(xpp); 21237 parseElementClose(res); 21238 return res; 21239 } 21240 21241 protected boolean parseSlotContent(int eventType, XmlPullParser xpp, Slot res) 21242 throws XmlPullParserException, IOException, FHIRFormatError { 21243 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21244 res.getIdentifier().add(parseIdentifier(xpp)); 21245 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceCategory")) { 21246 res.getServiceCategory().add(parseCodeableConcept(xpp)); 21247 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("serviceType")) { 21248 res.getServiceType().add(parseCodeableConcept(xpp)); 21249 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specialty")) { 21250 res.getSpecialty().add(parseCodeableConcept(xpp)); 21251 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("appointmentType")) { 21252 res.setAppointmentType(parseCodeableConcept(xpp)); 21253 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("schedule")) { 21254 res.setSchedule(parseReference(xpp)); 21255 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21256 res.setStatusElement(parseEnumeration(xpp, Slot.SlotStatus.NULL, new Slot.SlotStatusEnumFactory())); 21257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("start")) { 21258 res.setStartElement(parseInstant(xpp)); 21259 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 21260 res.setEndElement(parseInstant(xpp)); 21261 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("overbooked")) { 21262 res.setOverbookedElement(parseBoolean(xpp)); 21263 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 21264 res.setCommentElement(parseString(xpp)); 21265 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21266 return false; 21267 return true; 21268 } 21269 21270 protected Specimen parseSpecimen(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 21271 Specimen res = new Specimen(); 21272 parseDomainResourceAttributes(xpp, res); 21273 next(xpp); 21274 int eventType = nextNoWhitespace(xpp); 21275 while (eventType != XmlPullParser.END_TAG) { 21276 if (!parseSpecimenContent(eventType, xpp, res)) 21277 unknownContent(xpp); 21278 eventType = nextNoWhitespace(xpp); 21279 } 21280 next(xpp); 21281 parseElementClose(res); 21282 return res; 21283 } 21284 21285 protected boolean parseSpecimenContent(int eventType, XmlPullParser xpp, Specimen res) 21286 throws XmlPullParserException, IOException, FHIRFormatError { 21287 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21288 res.getIdentifier().add(parseIdentifier(xpp)); 21289 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accessionIdentifier")) { 21290 res.setAccessionIdentifier(parseIdentifier(xpp)); 21291 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21292 res.setStatusElement( 21293 parseEnumeration(xpp, Specimen.SpecimenStatus.NULL, new Specimen.SpecimenStatusEnumFactory())); 21294 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21295 res.setType(parseCodeableConcept(xpp)); 21296 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subject")) { 21297 res.setSubject(parseReference(xpp)); 21298 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receivedTime")) { 21299 res.setReceivedTimeElement(parseDateTime(xpp)); 21300 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parent")) { 21301 res.getParent().add(parseReference(xpp)); 21302 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("request")) { 21303 res.getRequest().add(parseReference(xpp)); 21304 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { 21305 res.setCollection(parseSpecimenSpecimenCollectionComponent(xpp, res)); 21306 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("processing")) { 21307 res.getProcessing().add(parseSpecimenSpecimenProcessingComponent(xpp, res)); 21308 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { 21309 res.getContainer().add(parseSpecimenSpecimenContainerComponent(xpp, res)); 21310 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 21311 res.getCondition().add(parseCodeableConcept(xpp)); 21312 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 21313 res.getNote().add(parseAnnotation(xpp)); 21314 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21315 return false; 21316 return true; 21317 } 21318 21319 protected Specimen.SpecimenCollectionComponent parseSpecimenSpecimenCollectionComponent(XmlPullParser xpp, 21320 Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { 21321 Specimen.SpecimenCollectionComponent res = new Specimen.SpecimenCollectionComponent(); 21322 parseBackboneAttributes(xpp, res); 21323 next(xpp); 21324 int eventType = nextNoWhitespace(xpp); 21325 while (eventType != XmlPullParser.END_TAG) { 21326 if (!parseSpecimenSpecimenCollectionComponentContent(eventType, xpp, owner, res)) 21327 unknownContent(xpp); 21328 eventType = nextNoWhitespace(xpp); 21329 } 21330 next(xpp); 21331 parseElementClose(res); 21332 return res; 21333 } 21334 21335 protected boolean parseSpecimenSpecimenCollectionComponentContent(int eventType, XmlPullParser xpp, Specimen owner, 21336 Specimen.SpecimenCollectionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 21337 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collector")) { 21338 res.setCollector(parseReference(xpp)); 21339 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "collected")) { 21340 res.setCollected(parseType("collected", xpp)); 21341 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 21342 res.setDuration(parseDuration(xpp)); 21343 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 21344 res.setQuantity(parseQuantity(xpp)); 21345 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 21346 res.setMethod(parseCodeableConcept(xpp)); 21347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("bodySite")) { 21348 res.setBodySite(parseCodeableConcept(xpp)); 21349 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "fastingStatus")) { 21350 res.setFastingStatus(parseType("fastingStatus", xpp)); 21351 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21352 return false; 21353 return true; 21354 } 21355 21356 protected Specimen.SpecimenProcessingComponent parseSpecimenSpecimenProcessingComponent(XmlPullParser xpp, 21357 Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { 21358 Specimen.SpecimenProcessingComponent res = new Specimen.SpecimenProcessingComponent(); 21359 parseBackboneAttributes(xpp, res); 21360 next(xpp); 21361 int eventType = nextNoWhitespace(xpp); 21362 while (eventType != XmlPullParser.END_TAG) { 21363 if (!parseSpecimenSpecimenProcessingComponentContent(eventType, xpp, owner, res)) 21364 unknownContent(xpp); 21365 eventType = nextNoWhitespace(xpp); 21366 } 21367 next(xpp); 21368 parseElementClose(res); 21369 return res; 21370 } 21371 21372 protected boolean parseSpecimenSpecimenProcessingComponentContent(int eventType, XmlPullParser xpp, Specimen owner, 21373 Specimen.SpecimenProcessingComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 21374 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21375 res.setDescriptionElement(parseString(xpp)); 21376 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("procedure")) { 21377 res.setProcedure(parseCodeableConcept(xpp)); 21378 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additive")) { 21379 res.getAdditive().add(parseReference(xpp)); 21380 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "time")) { 21381 res.setTime(parseType("time", xpp)); 21382 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21383 return false; 21384 return true; 21385 } 21386 21387 protected Specimen.SpecimenContainerComponent parseSpecimenSpecimenContainerComponent(XmlPullParser xpp, 21388 Specimen owner) throws XmlPullParserException, IOException, FHIRFormatError { 21389 Specimen.SpecimenContainerComponent res = new Specimen.SpecimenContainerComponent(); 21390 parseBackboneAttributes(xpp, res); 21391 next(xpp); 21392 int eventType = nextNoWhitespace(xpp); 21393 while (eventType != XmlPullParser.END_TAG) { 21394 if (!parseSpecimenSpecimenContainerComponentContent(eventType, xpp, owner, res)) 21395 unknownContent(xpp); 21396 eventType = nextNoWhitespace(xpp); 21397 } 21398 next(xpp); 21399 parseElementClose(res); 21400 return res; 21401 } 21402 21403 protected boolean parseSpecimenSpecimenContainerComponentContent(int eventType, XmlPullParser xpp, Specimen owner, 21404 Specimen.SpecimenContainerComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 21405 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21406 res.getIdentifier().add(parseIdentifier(xpp)); 21407 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21408 res.setDescriptionElement(parseString(xpp)); 21409 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21410 res.setType(parseCodeableConcept(xpp)); 21411 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capacity")) { 21412 res.setCapacity(parseQuantity(xpp)); 21413 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("specimenQuantity")) { 21414 res.setSpecimenQuantity(parseQuantity(xpp)); 21415 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "additive")) { 21416 res.setAdditive(parseType("additive", xpp)); 21417 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21418 return false; 21419 return true; 21420 } 21421 21422 protected SpecimenDefinition parseSpecimenDefinition(XmlPullParser xpp) 21423 throws XmlPullParserException, IOException, FHIRFormatError { 21424 SpecimenDefinition res = new SpecimenDefinition(); 21425 parseDomainResourceAttributes(xpp, res); 21426 next(xpp); 21427 int eventType = nextNoWhitespace(xpp); 21428 while (eventType != XmlPullParser.END_TAG) { 21429 if (!parseSpecimenDefinitionContent(eventType, xpp, res)) 21430 unknownContent(xpp); 21431 eventType = nextNoWhitespace(xpp); 21432 } 21433 next(xpp); 21434 parseElementClose(res); 21435 return res; 21436 } 21437 21438 protected boolean parseSpecimenDefinitionContent(int eventType, XmlPullParser xpp, SpecimenDefinition res) 21439 throws XmlPullParserException, IOException, FHIRFormatError { 21440 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21441 res.setIdentifier(parseIdentifier(xpp)); 21442 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeCollected")) { 21443 res.setTypeCollected(parseCodeableConcept(xpp)); 21444 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patientPreparation")) { 21445 res.getPatientPreparation().add(parseCodeableConcept(xpp)); 21446 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timeAspect")) { 21447 res.setTimeAspectElement(parseString(xpp)); 21448 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("collection")) { 21449 res.getCollection().add(parseCodeableConcept(xpp)); 21450 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeTested")) { 21451 res.getTypeTested().add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(xpp, res)); 21452 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21453 return false; 21454 return true; 21455 } 21456 21457 protected SpecimenDefinition.SpecimenDefinitionTypeTestedComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponent( 21458 XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21459 SpecimenDefinition.SpecimenDefinitionTypeTestedComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedComponent(); 21460 parseBackboneAttributes(xpp, res); 21461 next(xpp); 21462 int eventType = nextNoWhitespace(xpp); 21463 while (eventType != XmlPullParser.END_TAG) { 21464 if (!parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponentContent(eventType, xpp, owner, res)) 21465 unknownContent(xpp); 21466 eventType = nextNoWhitespace(xpp); 21467 } 21468 next(xpp); 21469 parseElementClose(res); 21470 return res; 21471 } 21472 21473 protected boolean parseSpecimenDefinitionSpecimenDefinitionTypeTestedComponentContent(int eventType, 21474 XmlPullParser xpp, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionTypeTestedComponent res) 21475 throws XmlPullParserException, IOException, FHIRFormatError { 21476 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isDerived")) { 21477 res.setIsDerivedElement(parseBoolean(xpp)); 21478 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21479 res.setType(parseCodeableConcept(xpp)); 21480 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preference")) { 21481 res.setPreferenceElement(parseEnumeration(xpp, SpecimenDefinition.SpecimenContainedPreference.NULL, 21482 new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory())); 21483 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("container")) { 21484 res.setContainer(parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent(xpp, owner)); 21485 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requirement")) { 21486 res.setRequirementElement(parseString(xpp)); 21487 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("retentionTime")) { 21488 res.setRetentionTime(parseDuration(xpp)); 21489 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rejectionCriterion")) { 21490 res.getRejectionCriterion().add(parseCodeableConcept(xpp)); 21491 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("handling")) { 21492 res.getHandling().add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(xpp, owner)); 21493 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21494 return false; 21495 return true; 21496 } 21497 21498 protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent( 21499 XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21500 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent(); 21501 parseBackboneAttributes(xpp, res); 21502 next(xpp); 21503 int eventType = nextNoWhitespace(xpp); 21504 while (eventType != XmlPullParser.END_TAG) { 21505 if (!parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentContent(eventType, xpp, owner, res)) 21506 unknownContent(xpp); 21507 eventType = nextNoWhitespace(xpp); 21508 } 21509 next(xpp); 21510 parseElementClose(res); 21511 return res; 21512 } 21513 21514 protected boolean parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentContent(int eventType, 21515 XmlPullParser xpp, SpecimenDefinition owner, 21516 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent res) 21517 throws XmlPullParserException, IOException, FHIRFormatError { 21518 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("material")) { 21519 res.setMaterial(parseCodeableConcept(xpp)); 21520 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21521 res.setType(parseCodeableConcept(xpp)); 21522 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cap")) { 21523 res.setCap(parseCodeableConcept(xpp)); 21524 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21525 res.setDescriptionElement(parseString(xpp)); 21526 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capacity")) { 21527 res.setCapacity(parseQuantity(xpp)); 21528 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "minimumVolume")) { 21529 res.setMinimumVolume(parseType("minimumVolume", xpp)); 21530 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("additive")) { 21531 res.getAdditive().add(parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(xpp, owner)); 21532 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preparation")) { 21533 res.setPreparationElement(parseString(xpp)); 21534 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21535 return false; 21536 return true; 21537 } 21538 21539 protected SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent( 21540 XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21541 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent(); 21542 parseBackboneAttributes(xpp, res); 21543 next(xpp); 21544 int eventType = nextNoWhitespace(xpp); 21545 while (eventType != XmlPullParser.END_TAG) { 21546 if (!parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentContent(eventType, xpp, owner, 21547 res)) 21548 unknownContent(xpp); 21549 eventType = nextNoWhitespace(xpp); 21550 } 21551 next(xpp); 21552 parseElementClose(res); 21553 return res; 21554 } 21555 21556 protected boolean parseSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentContent(int eventType, 21557 XmlPullParser xpp, SpecimenDefinition owner, 21558 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent res) 21559 throws XmlPullParserException, IOException, FHIRFormatError { 21560 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "additive")) { 21561 res.setAdditive(parseType("additive", xpp)); 21562 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21563 return false; 21564 return true; 21565 } 21566 21567 protected SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent( 21568 XmlPullParser xpp, SpecimenDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21569 SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent res = new SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent(); 21570 parseBackboneAttributes(xpp, res); 21571 next(xpp); 21572 int eventType = nextNoWhitespace(xpp); 21573 while (eventType != XmlPullParser.END_TAG) { 21574 if (!parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentContent(eventType, xpp, owner, res)) 21575 unknownContent(xpp); 21576 eventType = nextNoWhitespace(xpp); 21577 } 21578 next(xpp); 21579 parseElementClose(res); 21580 return res; 21581 } 21582 21583 protected boolean parseSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentContent(int eventType, 21584 XmlPullParser xpp, SpecimenDefinition owner, SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent res) 21585 throws XmlPullParserException, IOException, FHIRFormatError { 21586 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("temperatureQualifier")) { 21587 res.setTemperatureQualifier(parseCodeableConcept(xpp)); 21588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("temperatureRange")) { 21589 res.setTemperatureRange(parseRange(xpp)); 21590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maxDuration")) { 21591 res.setMaxDuration(parseDuration(xpp)); 21592 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instruction")) { 21593 res.setInstructionElement(parseString(xpp)); 21594 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21595 return false; 21596 return true; 21597 } 21598 21599 protected StructureDefinition parseStructureDefinition(XmlPullParser xpp) 21600 throws XmlPullParserException, IOException, FHIRFormatError { 21601 StructureDefinition res = new StructureDefinition(); 21602 parseDomainResourceAttributes(xpp, res); 21603 next(xpp); 21604 int eventType = nextNoWhitespace(xpp); 21605 while (eventType != XmlPullParser.END_TAG) { 21606 if (!parseStructureDefinitionContent(eventType, xpp, res)) 21607 unknownContent(xpp); 21608 eventType = nextNoWhitespace(xpp); 21609 } 21610 next(xpp); 21611 parseElementClose(res); 21612 return res; 21613 } 21614 21615 protected boolean parseStructureDefinitionContent(int eventType, XmlPullParser xpp, StructureDefinition res) 21616 throws XmlPullParserException, IOException, FHIRFormatError { 21617 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 21618 res.setUrlElement(parseUri(xpp)); 21619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21620 res.getIdentifier().add(parseIdentifier(xpp)); 21621 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 21622 res.setVersionElement(parseString(xpp)); 21623 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21624 res.setNameElement(parseString(xpp)); 21625 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 21626 res.setTitleElement(parseString(xpp)); 21627 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21628 res.setStatusElement( 21629 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 21630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 21631 res.setExperimentalElement(parseBoolean(xpp)); 21632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 21633 res.setDateElement(parseDateTime(xpp)); 21634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 21635 res.setPublisherElement(parseString(xpp)); 21636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 21637 res.getContact().add(parseContactDetail(xpp)); 21638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21639 res.setDescriptionElement(parseMarkdown(xpp)); 21640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 21641 res.getUseContext().add(parseUsageContext(xpp)); 21642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 21643 res.getJurisdiction().add(parseCodeableConcept(xpp)); 21644 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 21645 res.setPurposeElement(parseMarkdown(xpp)); 21646 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 21647 res.setCopyrightElement(parseMarkdown(xpp)); 21648 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("keyword")) { 21649 res.getKeyword().add(parseCoding(xpp)); 21650 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fhirVersion")) { 21651 res.setFhirVersionElement( 21652 parseEnumeration(xpp, Enumerations.FHIRVersion.NULL, new Enumerations.FHIRVersionEnumFactory())); 21653 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mapping")) { 21654 res.getMapping().add(parseStructureDefinitionStructureDefinitionMappingComponent(xpp, res)); 21655 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 21656 res.setKindElement(parseEnumeration(xpp, StructureDefinition.StructureDefinitionKind.NULL, 21657 new StructureDefinition.StructureDefinitionKindEnumFactory())); 21658 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { 21659 res.setAbstractElement(parseBoolean(xpp)); 21660 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 21661 res.getContext().add(parseStructureDefinitionStructureDefinitionContextComponent(xpp, res)); 21662 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextInvariant")) { 21663 res.getContextInvariant().add(parseString(xpp)); 21664 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21665 res.setTypeElement(parseUri(xpp)); 21666 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("baseDefinition")) { 21667 res.setBaseDefinitionElement(parseCanonical(xpp)); 21668 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("derivation")) { 21669 res.setDerivationElement(parseEnumeration(xpp, StructureDefinition.TypeDerivationRule.NULL, 21670 new StructureDefinition.TypeDerivationRuleEnumFactory())); 21671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("snapshot")) { 21672 res.setSnapshot(parseStructureDefinitionStructureDefinitionSnapshotComponent(xpp, res)); 21673 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("differential")) { 21674 res.setDifferential(parseStructureDefinitionStructureDefinitionDifferentialComponent(xpp, res)); 21675 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21676 return false; 21677 return true; 21678 } 21679 21680 protected StructureDefinition.StructureDefinitionMappingComponent parseStructureDefinitionStructureDefinitionMappingComponent( 21681 XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21682 StructureDefinition.StructureDefinitionMappingComponent res = new StructureDefinition.StructureDefinitionMappingComponent(); 21683 parseBackboneAttributes(xpp, res); 21684 next(xpp); 21685 int eventType = nextNoWhitespace(xpp); 21686 while (eventType != XmlPullParser.END_TAG) { 21687 if (!parseStructureDefinitionStructureDefinitionMappingComponentContent(eventType, xpp, owner, res)) 21688 unknownContent(xpp); 21689 eventType = nextNoWhitespace(xpp); 21690 } 21691 next(xpp); 21692 parseElementClose(res); 21693 return res; 21694 } 21695 21696 protected boolean parseStructureDefinitionStructureDefinitionMappingComponentContent(int eventType, XmlPullParser xpp, 21697 StructureDefinition owner, StructureDefinition.StructureDefinitionMappingComponent res) 21698 throws XmlPullParserException, IOException, FHIRFormatError { 21699 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identity")) { 21700 res.setIdentityElement(parseId(xpp)); 21701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 21702 res.setUriElement(parseUri(xpp)); 21703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21704 res.setNameElement(parseString(xpp)); 21705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 21706 res.setCommentElement(parseString(xpp)); 21707 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21708 return false; 21709 return true; 21710 } 21711 21712 protected StructureDefinition.StructureDefinitionContextComponent parseStructureDefinitionStructureDefinitionContextComponent( 21713 XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21714 StructureDefinition.StructureDefinitionContextComponent res = new StructureDefinition.StructureDefinitionContextComponent(); 21715 parseBackboneAttributes(xpp, res); 21716 next(xpp); 21717 int eventType = nextNoWhitespace(xpp); 21718 while (eventType != XmlPullParser.END_TAG) { 21719 if (!parseStructureDefinitionStructureDefinitionContextComponentContent(eventType, xpp, owner, res)) 21720 unknownContent(xpp); 21721 eventType = nextNoWhitespace(xpp); 21722 } 21723 next(xpp); 21724 parseElementClose(res); 21725 return res; 21726 } 21727 21728 protected boolean parseStructureDefinitionStructureDefinitionContextComponentContent(int eventType, XmlPullParser xpp, 21729 StructureDefinition owner, StructureDefinition.StructureDefinitionContextComponent res) 21730 throws XmlPullParserException, IOException, FHIRFormatError { 21731 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21732 res.setTypeElement(parseEnumeration(xpp, StructureDefinition.ExtensionContextType.NULL, 21733 new StructureDefinition.ExtensionContextTypeEnumFactory())); 21734 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 21735 res.setExpressionElement(parseString(xpp)); 21736 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21737 return false; 21738 return true; 21739 } 21740 21741 protected StructureDefinition.StructureDefinitionSnapshotComponent parseStructureDefinitionStructureDefinitionSnapshotComponent( 21742 XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21743 StructureDefinition.StructureDefinitionSnapshotComponent res = new StructureDefinition.StructureDefinitionSnapshotComponent(); 21744 parseBackboneAttributes(xpp, res); 21745 next(xpp); 21746 int eventType = nextNoWhitespace(xpp); 21747 while (eventType != XmlPullParser.END_TAG) { 21748 if (!parseStructureDefinitionStructureDefinitionSnapshotComponentContent(eventType, xpp, owner, res)) 21749 unknownContent(xpp); 21750 eventType = nextNoWhitespace(xpp); 21751 } 21752 next(xpp); 21753 parseElementClose(res); 21754 return res; 21755 } 21756 21757 protected boolean parseStructureDefinitionStructureDefinitionSnapshotComponentContent(int eventType, 21758 XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionSnapshotComponent res) 21759 throws XmlPullParserException, IOException, FHIRFormatError { 21760 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 21761 res.getElement().add(parseElementDefinition(xpp)); 21762 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21763 return false; 21764 return true; 21765 } 21766 21767 protected StructureDefinition.StructureDefinitionDifferentialComponent parseStructureDefinitionStructureDefinitionDifferentialComponent( 21768 XmlPullParser xpp, StructureDefinition owner) throws XmlPullParserException, IOException, FHIRFormatError { 21769 StructureDefinition.StructureDefinitionDifferentialComponent res = new StructureDefinition.StructureDefinitionDifferentialComponent(); 21770 parseBackboneAttributes(xpp, res); 21771 next(xpp); 21772 int eventType = nextNoWhitespace(xpp); 21773 while (eventType != XmlPullParser.END_TAG) { 21774 if (!parseStructureDefinitionStructureDefinitionDifferentialComponentContent(eventType, xpp, owner, res)) 21775 unknownContent(xpp); 21776 eventType = nextNoWhitespace(xpp); 21777 } 21778 next(xpp); 21779 parseElementClose(res); 21780 return res; 21781 } 21782 21783 protected boolean parseStructureDefinitionStructureDefinitionDifferentialComponentContent(int eventType, 21784 XmlPullParser xpp, StructureDefinition owner, StructureDefinition.StructureDefinitionDifferentialComponent res) 21785 throws XmlPullParserException, IOException, FHIRFormatError { 21786 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 21787 res.getElement().add(parseElementDefinition(xpp)); 21788 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21789 return false; 21790 return true; 21791 } 21792 21793 protected StructureMap parseStructureMap(XmlPullParser xpp) 21794 throws XmlPullParserException, IOException, FHIRFormatError { 21795 StructureMap res = new StructureMap(); 21796 parseDomainResourceAttributes(xpp, res); 21797 next(xpp); 21798 int eventType = nextNoWhitespace(xpp); 21799 while (eventType != XmlPullParser.END_TAG) { 21800 if (!parseStructureMapContent(eventType, xpp, res)) 21801 unknownContent(xpp); 21802 eventType = nextNoWhitespace(xpp); 21803 } 21804 next(xpp); 21805 parseElementClose(res); 21806 return res; 21807 } 21808 21809 protected boolean parseStructureMapContent(int eventType, XmlPullParser xpp, StructureMap res) 21810 throws XmlPullParserException, IOException, FHIRFormatError { 21811 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 21812 res.setUrlElement(parseUri(xpp)); 21813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 21814 res.getIdentifier().add(parseIdentifier(xpp)); 21815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 21816 res.setVersionElement(parseString(xpp)); 21817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21818 res.setNameElement(parseString(xpp)); 21819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 21820 res.setTitleElement(parseString(xpp)); 21821 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 21822 res.setStatusElement( 21823 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 21824 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 21825 res.setExperimentalElement(parseBoolean(xpp)); 21826 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 21827 res.setDateElement(parseDateTime(xpp)); 21828 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 21829 res.setPublisherElement(parseString(xpp)); 21830 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 21831 res.getContact().add(parseContactDetail(xpp)); 21832 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 21833 res.setDescriptionElement(parseMarkdown(xpp)); 21834 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 21835 res.getUseContext().add(parseUsageContext(xpp)); 21836 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 21837 res.getJurisdiction().add(parseCodeableConcept(xpp)); 21838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 21839 res.setPurposeElement(parseMarkdown(xpp)); 21840 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 21841 res.setCopyrightElement(parseMarkdown(xpp)); 21842 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structure")) { 21843 res.getStructure().add(parseStructureMapStructureMapStructureComponent(xpp, res)); 21844 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("import")) { 21845 res.getImport().add(parseCanonical(xpp)); 21846 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("group")) { 21847 res.getGroup().add(parseStructureMapStructureMapGroupComponent(xpp, res)); 21848 } else if (!parseDomainResourceContent(eventType, xpp, res)) 21849 return false; 21850 return true; 21851 } 21852 21853 protected StructureMap.StructureMapStructureComponent parseStructureMapStructureMapStructureComponent( 21854 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 21855 StructureMap.StructureMapStructureComponent res = new StructureMap.StructureMapStructureComponent(); 21856 parseBackboneAttributes(xpp, res); 21857 next(xpp); 21858 int eventType = nextNoWhitespace(xpp); 21859 while (eventType != XmlPullParser.END_TAG) { 21860 if (!parseStructureMapStructureMapStructureComponentContent(eventType, xpp, owner, res)) 21861 unknownContent(xpp); 21862 eventType = nextNoWhitespace(xpp); 21863 } 21864 next(xpp); 21865 parseElementClose(res); 21866 return res; 21867 } 21868 21869 protected boolean parseStructureMapStructureMapStructureComponentContent(int eventType, XmlPullParser xpp, 21870 StructureMap owner, StructureMap.StructureMapStructureComponent res) 21871 throws XmlPullParserException, IOException, FHIRFormatError { 21872 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 21873 res.setUrlElement(parseCanonical(xpp)); 21874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 21875 res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapModelMode.NULL, 21876 new StructureMap.StructureMapModelModeEnumFactory())); 21877 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("alias")) { 21878 res.setAliasElement(parseString(xpp)); 21879 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 21880 res.setDocumentationElement(parseString(xpp)); 21881 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21882 return false; 21883 return true; 21884 } 21885 21886 protected StructureMap.StructureMapGroupComponent parseStructureMapStructureMapGroupComponent(XmlPullParser xpp, 21887 StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 21888 StructureMap.StructureMapGroupComponent res = new StructureMap.StructureMapGroupComponent(); 21889 parseBackboneAttributes(xpp, res); 21890 next(xpp); 21891 int eventType = nextNoWhitespace(xpp); 21892 while (eventType != XmlPullParser.END_TAG) { 21893 if (!parseStructureMapStructureMapGroupComponentContent(eventType, xpp, owner, res)) 21894 unknownContent(xpp); 21895 eventType = nextNoWhitespace(xpp); 21896 } 21897 next(xpp); 21898 parseElementClose(res); 21899 return res; 21900 } 21901 21902 protected boolean parseStructureMapStructureMapGroupComponentContent(int eventType, XmlPullParser xpp, 21903 StructureMap owner, StructureMap.StructureMapGroupComponent res) 21904 throws XmlPullParserException, IOException, FHIRFormatError { 21905 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21906 res.setNameElement(parseId(xpp)); 21907 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("extends")) { 21908 res.setExtendsElement(parseId(xpp)); 21909 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("typeMode")) { 21910 res.setTypeModeElement(parseEnumeration(xpp, StructureMap.StructureMapGroupTypeMode.NULL, 21911 new StructureMap.StructureMapGroupTypeModeEnumFactory())); 21912 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 21913 res.setDocumentationElement(parseString(xpp)); 21914 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { 21915 res.getInput().add(parseStructureMapStructureMapGroupInputComponent(xpp, owner)); 21916 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { 21917 res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); 21918 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21919 return false; 21920 return true; 21921 } 21922 21923 protected StructureMap.StructureMapGroupInputComponent parseStructureMapStructureMapGroupInputComponent( 21924 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 21925 StructureMap.StructureMapGroupInputComponent res = new StructureMap.StructureMapGroupInputComponent(); 21926 parseBackboneAttributes(xpp, res); 21927 next(xpp); 21928 int eventType = nextNoWhitespace(xpp); 21929 while (eventType != XmlPullParser.END_TAG) { 21930 if (!parseStructureMapStructureMapGroupInputComponentContent(eventType, xpp, owner, res)) 21931 unknownContent(xpp); 21932 eventType = nextNoWhitespace(xpp); 21933 } 21934 next(xpp); 21935 parseElementClose(res); 21936 return res; 21937 } 21938 21939 protected boolean parseStructureMapStructureMapGroupInputComponentContent(int eventType, XmlPullParser xpp, 21940 StructureMap owner, StructureMap.StructureMapGroupInputComponent res) 21941 throws XmlPullParserException, IOException, FHIRFormatError { 21942 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21943 res.setNameElement(parseId(xpp)); 21944 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 21945 res.setTypeElement(parseString(xpp)); 21946 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("mode")) { 21947 res.setModeElement(parseEnumeration(xpp, StructureMap.StructureMapInputMode.NULL, 21948 new StructureMap.StructureMapInputModeEnumFactory())); 21949 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 21950 res.setDocumentationElement(parseString(xpp)); 21951 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21952 return false; 21953 return true; 21954 } 21955 21956 protected StructureMap.StructureMapGroupRuleComponent parseStructureMapStructureMapGroupRuleComponent( 21957 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 21958 StructureMap.StructureMapGroupRuleComponent res = new StructureMap.StructureMapGroupRuleComponent(); 21959 parseBackboneAttributes(xpp, res); 21960 next(xpp); 21961 int eventType = nextNoWhitespace(xpp); 21962 while (eventType != XmlPullParser.END_TAG) { 21963 if (!parseStructureMapStructureMapGroupRuleComponentContent(eventType, xpp, owner, res)) 21964 unknownContent(xpp); 21965 eventType = nextNoWhitespace(xpp); 21966 } 21967 next(xpp); 21968 parseElementClose(res); 21969 return res; 21970 } 21971 21972 protected boolean parseStructureMapStructureMapGroupRuleComponentContent(int eventType, XmlPullParser xpp, 21973 StructureMap owner, StructureMap.StructureMapGroupRuleComponent res) 21974 throws XmlPullParserException, IOException, FHIRFormatError { 21975 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 21976 res.setNameElement(parseId(xpp)); 21977 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 21978 res.getSource().add(parseStructureMapStructureMapGroupRuleSourceComponent(xpp, owner)); 21979 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 21980 res.getTarget().add(parseStructureMapStructureMapGroupRuleTargetComponent(xpp, owner)); 21981 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("rule")) { 21982 res.getRule().add(parseStructureMapStructureMapGroupRuleComponent(xpp, owner)); 21983 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependent")) { 21984 res.getDependent().add(parseStructureMapStructureMapGroupRuleDependentComponent(xpp, owner)); 21985 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 21986 res.setDocumentationElement(parseString(xpp)); 21987 } else if (!parseBackboneElementContent(eventType, xpp, res)) 21988 return false; 21989 return true; 21990 } 21991 21992 protected StructureMap.StructureMapGroupRuleSourceComponent parseStructureMapStructureMapGroupRuleSourceComponent( 21993 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 21994 StructureMap.StructureMapGroupRuleSourceComponent res = new StructureMap.StructureMapGroupRuleSourceComponent(); 21995 parseBackboneAttributes(xpp, res); 21996 next(xpp); 21997 int eventType = nextNoWhitespace(xpp); 21998 while (eventType != XmlPullParser.END_TAG) { 21999 if (!parseStructureMapStructureMapGroupRuleSourceComponentContent(eventType, xpp, owner, res)) 22000 unknownContent(xpp); 22001 eventType = nextNoWhitespace(xpp); 22002 } 22003 next(xpp); 22004 parseElementClose(res); 22005 return res; 22006 } 22007 22008 protected boolean parseStructureMapStructureMapGroupRuleSourceComponentContent(int eventType, XmlPullParser xpp, 22009 StructureMap owner, StructureMap.StructureMapGroupRuleSourceComponent res) 22010 throws XmlPullParserException, IOException, FHIRFormatError { 22011 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 22012 res.setContextElement(parseId(xpp)); 22013 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("min")) { 22014 res.setMinElement(parseInteger(xpp)); 22015 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("max")) { 22016 res.setMaxElement(parseString(xpp)); 22017 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22018 res.setTypeElement(parseString(xpp)); 22019 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "defaultValue")) { 22020 res.setDefaultValue(parseType("defaultValue", xpp)); 22021 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 22022 res.setElementElement(parseString(xpp)); 22023 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { 22024 res.setListModeElement(parseEnumeration(xpp, StructureMap.StructureMapSourceListMode.NULL, 22025 new StructureMap.StructureMapSourceListModeEnumFactory())); 22026 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { 22027 res.setVariableElement(parseId(xpp)); 22028 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("condition")) { 22029 res.setConditionElement(parseString(xpp)); 22030 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("check")) { 22031 res.setCheckElement(parseString(xpp)); 22032 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("logMessage")) { 22033 res.setLogMessageElement(parseString(xpp)); 22034 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22035 return false; 22036 return true; 22037 } 22038 22039 protected StructureMap.StructureMapGroupRuleTargetComponent parseStructureMapStructureMapGroupRuleTargetComponent( 22040 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 22041 StructureMap.StructureMapGroupRuleTargetComponent res = new StructureMap.StructureMapGroupRuleTargetComponent(); 22042 parseBackboneAttributes(xpp, res); 22043 next(xpp); 22044 int eventType = nextNoWhitespace(xpp); 22045 while (eventType != XmlPullParser.END_TAG) { 22046 if (!parseStructureMapStructureMapGroupRuleTargetComponentContent(eventType, xpp, owner, res)) 22047 unknownContent(xpp); 22048 eventType = nextNoWhitespace(xpp); 22049 } 22050 next(xpp); 22051 parseElementClose(res); 22052 return res; 22053 } 22054 22055 protected boolean parseStructureMapStructureMapGroupRuleTargetComponentContent(int eventType, XmlPullParser xpp, 22056 StructureMap owner, StructureMap.StructureMapGroupRuleTargetComponent res) 22057 throws XmlPullParserException, IOException, FHIRFormatError { 22058 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("context")) { 22059 res.setContextElement(parseId(xpp)); 22060 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contextType")) { 22061 res.setContextTypeElement(parseEnumeration(xpp, StructureMap.StructureMapContextType.NULL, 22062 new StructureMap.StructureMapContextTypeEnumFactory())); 22063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 22064 res.setElementElement(parseString(xpp)); 22065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { 22066 res.setVariableElement(parseId(xpp)); 22067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listMode")) { 22068 res.getListMode().add(parseEnumeration(xpp, StructureMap.StructureMapTargetListMode.NULL, 22069 new StructureMap.StructureMapTargetListModeEnumFactory())); 22070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("listRuleId")) { 22071 res.setListRuleIdElement(parseId(xpp)); 22072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("transform")) { 22073 res.setTransformElement(parseEnumeration(xpp, StructureMap.StructureMapTransform.NULL, 22074 new StructureMap.StructureMapTransformEnumFactory())); 22075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 22076 res.getParameter().add(parseStructureMapStructureMapGroupRuleTargetParameterComponent(xpp, owner)); 22077 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22078 return false; 22079 return true; 22080 } 22081 22082 protected StructureMap.StructureMapGroupRuleTargetParameterComponent parseStructureMapStructureMapGroupRuleTargetParameterComponent( 22083 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 22084 StructureMap.StructureMapGroupRuleTargetParameterComponent res = new StructureMap.StructureMapGroupRuleTargetParameterComponent(); 22085 parseBackboneAttributes(xpp, res); 22086 next(xpp); 22087 int eventType = nextNoWhitespace(xpp); 22088 while (eventType != XmlPullParser.END_TAG) { 22089 if (!parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(eventType, xpp, owner, res)) 22090 unknownContent(xpp); 22091 eventType = nextNoWhitespace(xpp); 22092 } 22093 next(xpp); 22094 parseElementClose(res); 22095 return res; 22096 } 22097 22098 protected boolean parseStructureMapStructureMapGroupRuleTargetParameterComponentContent(int eventType, 22099 XmlPullParser xpp, StructureMap owner, StructureMap.StructureMapGroupRuleTargetParameterComponent res) 22100 throws XmlPullParserException, IOException, FHIRFormatError { 22101 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 22102 res.setValue(parseType("value", xpp)); 22103 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22104 return false; 22105 return true; 22106 } 22107 22108 protected StructureMap.StructureMapGroupRuleDependentComponent parseStructureMapStructureMapGroupRuleDependentComponent( 22109 XmlPullParser xpp, StructureMap owner) throws XmlPullParserException, IOException, FHIRFormatError { 22110 StructureMap.StructureMapGroupRuleDependentComponent res = new StructureMap.StructureMapGroupRuleDependentComponent(); 22111 parseBackboneAttributes(xpp, res); 22112 next(xpp); 22113 int eventType = nextNoWhitespace(xpp); 22114 while (eventType != XmlPullParser.END_TAG) { 22115 if (!parseStructureMapStructureMapGroupRuleDependentComponentContent(eventType, xpp, owner, res)) 22116 unknownContent(xpp); 22117 eventType = nextNoWhitespace(xpp); 22118 } 22119 next(xpp); 22120 parseElementClose(res); 22121 return res; 22122 } 22123 22124 protected boolean parseStructureMapStructureMapGroupRuleDependentComponentContent(int eventType, XmlPullParser xpp, 22125 StructureMap owner, StructureMap.StructureMapGroupRuleDependentComponent res) 22126 throws XmlPullParserException, IOException, FHIRFormatError { 22127 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 22128 res.setNameElement(parseId(xpp)); 22129 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { 22130 res.getVariable().add(parseString(xpp)); 22131 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22132 return false; 22133 return true; 22134 } 22135 22136 protected Subscription parseSubscription(XmlPullParser xpp) 22137 throws XmlPullParserException, IOException, FHIRFormatError { 22138 Subscription res = new Subscription(); 22139 parseDomainResourceAttributes(xpp, res); 22140 next(xpp); 22141 int eventType = nextNoWhitespace(xpp); 22142 while (eventType != XmlPullParser.END_TAG) { 22143 if (!parseSubscriptionContent(eventType, xpp, res)) 22144 unknownContent(xpp); 22145 eventType = nextNoWhitespace(xpp); 22146 } 22147 next(xpp); 22148 parseElementClose(res); 22149 return res; 22150 } 22151 22152 protected boolean parseSubscriptionContent(int eventType, XmlPullParser xpp, Subscription res) 22153 throws XmlPullParserException, IOException, FHIRFormatError { 22154 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 22155 res.setStatusElement(parseEnumeration(xpp, Subscription.SubscriptionStatus.NULL, 22156 new Subscription.SubscriptionStatusEnumFactory())); 22157 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 22158 res.getContact().add(parseContactPoint(xpp)); 22159 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("end")) { 22160 res.setEndElement(parseInstant(xpp)); 22161 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reason")) { 22162 res.setReasonElement(parseString(xpp)); 22163 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("criteria")) { 22164 res.setCriteriaElement(parseString(xpp)); 22165 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("error")) { 22166 res.setErrorElement(parseString(xpp)); 22167 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("channel")) { 22168 res.setChannel(parseSubscriptionSubscriptionChannelComponent(xpp, res)); 22169 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22170 return false; 22171 return true; 22172 } 22173 22174 protected Subscription.SubscriptionChannelComponent parseSubscriptionSubscriptionChannelComponent(XmlPullParser xpp, 22175 Subscription owner) throws XmlPullParserException, IOException, FHIRFormatError { 22176 Subscription.SubscriptionChannelComponent res = new Subscription.SubscriptionChannelComponent(); 22177 parseBackboneAttributes(xpp, res); 22178 next(xpp); 22179 int eventType = nextNoWhitespace(xpp); 22180 while (eventType != XmlPullParser.END_TAG) { 22181 if (!parseSubscriptionSubscriptionChannelComponentContent(eventType, xpp, owner, res)) 22182 unknownContent(xpp); 22183 eventType = nextNoWhitespace(xpp); 22184 } 22185 next(xpp); 22186 parseElementClose(res); 22187 return res; 22188 } 22189 22190 protected boolean parseSubscriptionSubscriptionChannelComponentContent(int eventType, XmlPullParser xpp, 22191 Subscription owner, Subscription.SubscriptionChannelComponent res) 22192 throws XmlPullParserException, IOException, FHIRFormatError { 22193 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22194 res.setTypeElement(parseEnumeration(xpp, Subscription.SubscriptionChannelType.NULL, 22195 new Subscription.SubscriptionChannelTypeEnumFactory())); 22196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("endpoint")) { 22197 res.setEndpointElement(parseUrl(xpp)); 22198 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("payload")) { 22199 res.setPayloadElement(parseCode(xpp)); 22200 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("header")) { 22201 res.getHeader().add(parseString(xpp)); 22202 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22203 return false; 22204 return true; 22205 } 22206 22207 protected Substance parseSubstance(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 22208 Substance res = new Substance(); 22209 parseDomainResourceAttributes(xpp, res); 22210 next(xpp); 22211 int eventType = nextNoWhitespace(xpp); 22212 while (eventType != XmlPullParser.END_TAG) { 22213 if (!parseSubstanceContent(eventType, xpp, res)) 22214 unknownContent(xpp); 22215 eventType = nextNoWhitespace(xpp); 22216 } 22217 next(xpp); 22218 parseElementClose(res); 22219 return res; 22220 } 22221 22222 protected boolean parseSubstanceContent(int eventType, XmlPullParser xpp, Substance res) 22223 throws XmlPullParserException, IOException, FHIRFormatError { 22224 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 22225 res.getIdentifier().add(parseIdentifier(xpp)); 22226 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 22227 res.setStatusElement( 22228 parseEnumeration(xpp, Substance.FHIRSubstanceStatus.NULL, new Substance.FHIRSubstanceStatusEnumFactory())); 22229 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 22230 res.getCategory().add(parseCodeableConcept(xpp)); 22231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 22232 res.setCode(parseCodeableConcept(xpp)); 22233 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 22234 res.setDescriptionElement(parseString(xpp)); 22235 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instance")) { 22236 res.getInstance().add(parseSubstanceSubstanceInstanceComponent(xpp, res)); 22237 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ingredient")) { 22238 res.getIngredient().add(parseSubstanceSubstanceIngredientComponent(xpp, res)); 22239 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22240 return false; 22241 return true; 22242 } 22243 22244 protected Substance.SubstanceInstanceComponent parseSubstanceSubstanceInstanceComponent(XmlPullParser xpp, 22245 Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { 22246 Substance.SubstanceInstanceComponent res = new Substance.SubstanceInstanceComponent(); 22247 parseBackboneAttributes(xpp, res); 22248 next(xpp); 22249 int eventType = nextNoWhitespace(xpp); 22250 while (eventType != XmlPullParser.END_TAG) { 22251 if (!parseSubstanceSubstanceInstanceComponentContent(eventType, xpp, owner, res)) 22252 unknownContent(xpp); 22253 eventType = nextNoWhitespace(xpp); 22254 } 22255 next(xpp); 22256 parseElementClose(res); 22257 return res; 22258 } 22259 22260 protected boolean parseSubstanceSubstanceInstanceComponentContent(int eventType, XmlPullParser xpp, Substance owner, 22261 Substance.SubstanceInstanceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 22262 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 22263 res.setIdentifier(parseIdentifier(xpp)); 22264 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expiry")) { 22265 res.setExpiryElement(parseDateTime(xpp)); 22266 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 22267 res.setQuantity(parseQuantity(xpp)); 22268 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22269 return false; 22270 return true; 22271 } 22272 22273 protected Substance.SubstanceIngredientComponent parseSubstanceSubstanceIngredientComponent(XmlPullParser xpp, 22274 Substance owner) throws XmlPullParserException, IOException, FHIRFormatError { 22275 Substance.SubstanceIngredientComponent res = new Substance.SubstanceIngredientComponent(); 22276 parseBackboneAttributes(xpp, res); 22277 next(xpp); 22278 int eventType = nextNoWhitespace(xpp); 22279 while (eventType != XmlPullParser.END_TAG) { 22280 if (!parseSubstanceSubstanceIngredientComponentContent(eventType, xpp, owner, res)) 22281 unknownContent(xpp); 22282 eventType = nextNoWhitespace(xpp); 22283 } 22284 next(xpp); 22285 parseElementClose(res); 22286 return res; 22287 } 22288 22289 protected boolean parseSubstanceSubstanceIngredientComponentContent(int eventType, XmlPullParser xpp, Substance owner, 22290 Substance.SubstanceIngredientComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 22291 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 22292 res.setQuantity(parseRatio(xpp)); 22293 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "substance")) { 22294 res.setSubstance(parseType("substance", xpp)); 22295 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22296 return false; 22297 return true; 22298 } 22299 22300 protected SubstanceNucleicAcid parseSubstanceNucleicAcid(XmlPullParser xpp) 22301 throws XmlPullParserException, IOException, FHIRFormatError { 22302 SubstanceNucleicAcid res = new SubstanceNucleicAcid(); 22303 parseDomainResourceAttributes(xpp, res); 22304 next(xpp); 22305 int eventType = nextNoWhitespace(xpp); 22306 while (eventType != XmlPullParser.END_TAG) { 22307 if (!parseSubstanceNucleicAcidContent(eventType, xpp, res)) 22308 unknownContent(xpp); 22309 eventType = nextNoWhitespace(xpp); 22310 } 22311 next(xpp); 22312 parseElementClose(res); 22313 return res; 22314 } 22315 22316 protected boolean parseSubstanceNucleicAcidContent(int eventType, XmlPullParser xpp, SubstanceNucleicAcid res) 22317 throws XmlPullParserException, IOException, FHIRFormatError { 22318 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceType")) { 22319 res.setSequenceType(parseCodeableConcept(xpp)); 22320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfSubunits")) { 22321 res.setNumberOfSubunitsElement(parseInteger(xpp)); 22322 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("areaOfHybridisation")) { 22323 res.setAreaOfHybridisationElement(parseString(xpp)); 22324 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("oligoNucleotideType")) { 22325 res.setOligoNucleotideType(parseCodeableConcept(xpp)); 22326 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subunit")) { 22327 res.getSubunit().add(parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(xpp, res)); 22328 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22329 return false; 22330 return true; 22331 } 22332 22333 protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent( 22334 XmlPullParser xpp, SubstanceNucleicAcid owner) throws XmlPullParserException, IOException, FHIRFormatError { 22335 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent(); 22336 parseBackboneAttributes(xpp, res); 22337 next(xpp); 22338 int eventType = nextNoWhitespace(xpp); 22339 while (eventType != XmlPullParser.END_TAG) { 22340 if (!parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentContent(eventType, xpp, owner, res)) 22341 unknownContent(xpp); 22342 eventType = nextNoWhitespace(xpp); 22343 } 22344 next(xpp); 22345 parseElementClose(res); 22346 return res; 22347 } 22348 22349 protected boolean parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentContent(int eventType, 22350 XmlPullParser xpp, SubstanceNucleicAcid owner, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent res) 22351 throws XmlPullParserException, IOException, FHIRFormatError { 22352 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subunit")) { 22353 res.setSubunitElement(parseInteger(xpp)); 22354 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 22355 res.setSequenceElement(parseString(xpp)); 22356 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { 22357 res.setLengthElement(parseInteger(xpp)); 22358 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceAttachment")) { 22359 res.setSequenceAttachment(parseAttachment(xpp)); 22360 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fivePrime")) { 22361 res.setFivePrime(parseCodeableConcept(xpp)); 22362 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("threePrime")) { 22363 res.setThreePrime(parseCodeableConcept(xpp)); 22364 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("linkage")) { 22365 res.getLinkage().add(parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(xpp, owner)); 22366 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sugar")) { 22367 res.getSugar().add(parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(xpp, owner)); 22368 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22369 return false; 22370 return true; 22371 } 22372 22373 protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent( 22374 XmlPullParser xpp, SubstanceNucleicAcid owner) throws XmlPullParserException, IOException, FHIRFormatError { 22375 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent(); 22376 parseBackboneAttributes(xpp, res); 22377 next(xpp); 22378 int eventType = nextNoWhitespace(xpp); 22379 while (eventType != XmlPullParser.END_TAG) { 22380 if (!parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentContent(eventType, xpp, owner, res)) 22381 unknownContent(xpp); 22382 eventType = nextNoWhitespace(xpp); 22383 } 22384 next(xpp); 22385 parseElementClose(res); 22386 return res; 22387 } 22388 22389 protected boolean parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentContent(int eventType, 22390 XmlPullParser xpp, SubstanceNucleicAcid owner, 22391 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent res) 22392 throws XmlPullParserException, IOException, FHIRFormatError { 22393 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("connectivity")) { 22394 res.setConnectivityElement(parseString(xpp)); 22395 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 22396 res.setIdentifier(parseIdentifier(xpp)); 22397 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 22398 res.setNameElement(parseString(xpp)); 22399 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("residueSite")) { 22400 res.setResidueSiteElement(parseString(xpp)); 22401 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22402 return false; 22403 return true; 22404 } 22405 22406 protected SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent( 22407 XmlPullParser xpp, SubstanceNucleicAcid owner) throws XmlPullParserException, IOException, FHIRFormatError { 22408 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent res = new SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent(); 22409 parseBackboneAttributes(xpp, res); 22410 next(xpp); 22411 int eventType = nextNoWhitespace(xpp); 22412 while (eventType != XmlPullParser.END_TAG) { 22413 if (!parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentContent(eventType, xpp, owner, res)) 22414 unknownContent(xpp); 22415 eventType = nextNoWhitespace(xpp); 22416 } 22417 next(xpp); 22418 parseElementClose(res); 22419 return res; 22420 } 22421 22422 protected boolean parseSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentContent(int eventType, 22423 XmlPullParser xpp, SubstanceNucleicAcid owner, SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent res) 22424 throws XmlPullParserException, IOException, FHIRFormatError { 22425 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 22426 res.setIdentifier(parseIdentifier(xpp)); 22427 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 22428 res.setNameElement(parseString(xpp)); 22429 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("residueSite")) { 22430 res.setResidueSiteElement(parseString(xpp)); 22431 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22432 return false; 22433 return true; 22434 } 22435 22436 protected SubstancePolymer parseSubstancePolymer(XmlPullParser xpp) 22437 throws XmlPullParserException, IOException, FHIRFormatError { 22438 SubstancePolymer res = new SubstancePolymer(); 22439 parseDomainResourceAttributes(xpp, res); 22440 next(xpp); 22441 int eventType = nextNoWhitespace(xpp); 22442 while (eventType != XmlPullParser.END_TAG) { 22443 if (!parseSubstancePolymerContent(eventType, xpp, res)) 22444 unknownContent(xpp); 22445 eventType = nextNoWhitespace(xpp); 22446 } 22447 next(xpp); 22448 parseElementClose(res); 22449 return res; 22450 } 22451 22452 protected boolean parseSubstancePolymerContent(int eventType, XmlPullParser xpp, SubstancePolymer res) 22453 throws XmlPullParserException, IOException, FHIRFormatError { 22454 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 22455 res.setClass_(parseCodeableConcept(xpp)); 22456 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("geometry")) { 22457 res.setGeometry(parseCodeableConcept(xpp)); 22458 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copolymerConnectivity")) { 22459 res.getCopolymerConnectivity().add(parseCodeableConcept(xpp)); 22460 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("modification")) { 22461 res.getModification().add(parseString(xpp)); 22462 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("monomerSet")) { 22463 res.getMonomerSet().add(parseSubstancePolymerSubstancePolymerMonomerSetComponent(xpp, res)); 22464 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeat")) { 22465 res.getRepeat().add(parseSubstancePolymerSubstancePolymerRepeatComponent(xpp, res)); 22466 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22467 return false; 22468 return true; 22469 } 22470 22471 protected SubstancePolymer.SubstancePolymerMonomerSetComponent parseSubstancePolymerSubstancePolymerMonomerSetComponent( 22472 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22473 SubstancePolymer.SubstancePolymerMonomerSetComponent res = new SubstancePolymer.SubstancePolymerMonomerSetComponent(); 22474 parseBackboneAttributes(xpp, res); 22475 next(xpp); 22476 int eventType = nextNoWhitespace(xpp); 22477 while (eventType != XmlPullParser.END_TAG) { 22478 if (!parseSubstancePolymerSubstancePolymerMonomerSetComponentContent(eventType, xpp, owner, res)) 22479 unknownContent(xpp); 22480 eventType = nextNoWhitespace(xpp); 22481 } 22482 next(xpp); 22483 parseElementClose(res); 22484 return res; 22485 } 22486 22487 protected boolean parseSubstancePolymerSubstancePolymerMonomerSetComponentContent(int eventType, XmlPullParser xpp, 22488 SubstancePolymer owner, SubstancePolymer.SubstancePolymerMonomerSetComponent res) 22489 throws XmlPullParserException, IOException, FHIRFormatError { 22490 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("ratioType")) { 22491 res.setRatioType(parseCodeableConcept(xpp)); 22492 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("startingMaterial")) { 22493 res.getStartingMaterial() 22494 .add(parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(xpp, owner)); 22495 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22496 return false; 22497 return true; 22498 } 22499 22500 protected SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent( 22501 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22502 SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent res = new SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent(); 22503 parseBackboneAttributes(xpp, res); 22504 next(xpp); 22505 int eventType = nextNoWhitespace(xpp); 22506 while (eventType != XmlPullParser.END_TAG) { 22507 if (!parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentContent(eventType, xpp, owner, res)) 22508 unknownContent(xpp); 22509 eventType = nextNoWhitespace(xpp); 22510 } 22511 next(xpp); 22512 parseElementClose(res); 22513 return res; 22514 } 22515 22516 protected boolean parseSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentContent(int eventType, 22517 XmlPullParser xpp, SubstancePolymer owner, 22518 SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent res) 22519 throws XmlPullParserException, IOException, FHIRFormatError { 22520 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("material")) { 22521 res.setMaterial(parseCodeableConcept(xpp)); 22522 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22523 res.setType(parseCodeableConcept(xpp)); 22524 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isDefining")) { 22525 res.setIsDefiningElement(parseBoolean(xpp)); 22526 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 22527 res.setAmount(parseSubstanceAmount(xpp)); 22528 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22529 return false; 22530 return true; 22531 } 22532 22533 protected SubstancePolymer.SubstancePolymerRepeatComponent parseSubstancePolymerSubstancePolymerRepeatComponent( 22534 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22535 SubstancePolymer.SubstancePolymerRepeatComponent res = new SubstancePolymer.SubstancePolymerRepeatComponent(); 22536 parseBackboneAttributes(xpp, res); 22537 next(xpp); 22538 int eventType = nextNoWhitespace(xpp); 22539 while (eventType != XmlPullParser.END_TAG) { 22540 if (!parseSubstancePolymerSubstancePolymerRepeatComponentContent(eventType, xpp, owner, res)) 22541 unknownContent(xpp); 22542 eventType = nextNoWhitespace(xpp); 22543 } 22544 next(xpp); 22545 parseElementClose(res); 22546 return res; 22547 } 22548 22549 protected boolean parseSubstancePolymerSubstancePolymerRepeatComponentContent(int eventType, XmlPullParser xpp, 22550 SubstancePolymer owner, SubstancePolymer.SubstancePolymerRepeatComponent res) 22551 throws XmlPullParserException, IOException, FHIRFormatError { 22552 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfUnits")) { 22553 res.setNumberOfUnitsElement(parseInteger(xpp)); 22554 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("averageMolecularFormula")) { 22555 res.setAverageMolecularFormulaElement(parseString(xpp)); 22556 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeatUnitAmountType")) { 22557 res.setRepeatUnitAmountType(parseCodeableConcept(xpp)); 22558 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeatUnit")) { 22559 res.getRepeatUnit().add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(xpp, owner)); 22560 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22561 return false; 22562 return true; 22563 } 22564 22565 protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent( 22566 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22567 SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent(); 22568 parseBackboneAttributes(xpp, res); 22569 next(xpp); 22570 int eventType = nextNoWhitespace(xpp); 22571 while (eventType != XmlPullParser.END_TAG) { 22572 if (!parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentContent(eventType, xpp, owner, res)) 22573 unknownContent(xpp); 22574 eventType = nextNoWhitespace(xpp); 22575 } 22576 next(xpp); 22577 parseElementClose(res); 22578 return res; 22579 } 22580 22581 protected boolean parseSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentContent(int eventType, 22582 XmlPullParser xpp, SubstancePolymer owner, SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent res) 22583 throws XmlPullParserException, IOException, FHIRFormatError { 22584 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("orientationOfPolymerisation")) { 22585 res.setOrientationOfPolymerisation(parseCodeableConcept(xpp)); 22586 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repeatUnit")) { 22587 res.setRepeatUnitElement(parseString(xpp)); 22588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 22589 res.setAmount(parseSubstanceAmount(xpp)); 22590 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("degreeOfPolymerisation")) { 22591 res.getDegreeOfPolymerisation() 22592 .add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(xpp, owner)); 22593 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structuralRepresentation")) { 22594 res.getStructuralRepresentation() 22595 .add(parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(xpp, owner)); 22596 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22597 return false; 22598 return true; 22599 } 22600 22601 protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent( 22602 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22603 SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(); 22604 parseBackboneAttributes(xpp, res); 22605 next(xpp); 22606 int eventType = nextNoWhitespace(xpp); 22607 while (eventType != XmlPullParser.END_TAG) { 22608 if (!parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentContent(eventType, xpp, 22609 owner, res)) 22610 unknownContent(xpp); 22611 eventType = nextNoWhitespace(xpp); 22612 } 22613 next(xpp); 22614 parseElementClose(res); 22615 return res; 22616 } 22617 22618 protected boolean parseSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentContent( 22619 int eventType, XmlPullParser xpp, SubstancePolymer owner, 22620 SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent res) 22621 throws XmlPullParserException, IOException, FHIRFormatError { 22622 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("degree")) { 22623 res.setDegree(parseCodeableConcept(xpp)); 22624 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 22625 res.setAmount(parseSubstanceAmount(xpp)); 22626 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22627 return false; 22628 return true; 22629 } 22630 22631 protected SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent( 22632 XmlPullParser xpp, SubstancePolymer owner) throws XmlPullParserException, IOException, FHIRFormatError { 22633 SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent res = new SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(); 22634 parseBackboneAttributes(xpp, res); 22635 next(xpp); 22636 int eventType = nextNoWhitespace(xpp); 22637 while (eventType != XmlPullParser.END_TAG) { 22638 if (!parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentContent(eventType, xpp, 22639 owner, res)) 22640 unknownContent(xpp); 22641 eventType = nextNoWhitespace(xpp); 22642 } 22643 next(xpp); 22644 parseElementClose(res); 22645 return res; 22646 } 22647 22648 protected boolean parseSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentContent( 22649 int eventType, XmlPullParser xpp, SubstancePolymer owner, 22650 SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent res) 22651 throws XmlPullParserException, IOException, FHIRFormatError { 22652 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22653 res.setType(parseCodeableConcept(xpp)); 22654 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { 22655 res.setRepresentationElement(parseString(xpp)); 22656 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachment")) { 22657 res.setAttachment(parseAttachment(xpp)); 22658 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22659 return false; 22660 return true; 22661 } 22662 22663 protected SubstanceProtein parseSubstanceProtein(XmlPullParser xpp) 22664 throws XmlPullParserException, IOException, FHIRFormatError { 22665 SubstanceProtein res = new SubstanceProtein(); 22666 parseDomainResourceAttributes(xpp, res); 22667 next(xpp); 22668 int eventType = nextNoWhitespace(xpp); 22669 while (eventType != XmlPullParser.END_TAG) { 22670 if (!parseSubstanceProteinContent(eventType, xpp, res)) 22671 unknownContent(xpp); 22672 eventType = nextNoWhitespace(xpp); 22673 } 22674 next(xpp); 22675 parseElementClose(res); 22676 return res; 22677 } 22678 22679 protected boolean parseSubstanceProteinContent(int eventType, XmlPullParser xpp, SubstanceProtein res) 22680 throws XmlPullParserException, IOException, FHIRFormatError { 22681 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceType")) { 22682 res.setSequenceType(parseCodeableConcept(xpp)); 22683 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("numberOfSubunits")) { 22684 res.setNumberOfSubunitsElement(parseInteger(xpp)); 22685 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("disulfideLinkage")) { 22686 res.getDisulfideLinkage().add(parseString(xpp)); 22687 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subunit")) { 22688 res.getSubunit().add(parseSubstanceProteinSubstanceProteinSubunitComponent(xpp, res)); 22689 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22690 return false; 22691 return true; 22692 } 22693 22694 protected SubstanceProtein.SubstanceProteinSubunitComponent parseSubstanceProteinSubstanceProteinSubunitComponent( 22695 XmlPullParser xpp, SubstanceProtein owner) throws XmlPullParserException, IOException, FHIRFormatError { 22696 SubstanceProtein.SubstanceProteinSubunitComponent res = new SubstanceProtein.SubstanceProteinSubunitComponent(); 22697 parseBackboneAttributes(xpp, res); 22698 next(xpp); 22699 int eventType = nextNoWhitespace(xpp); 22700 while (eventType != XmlPullParser.END_TAG) { 22701 if (!parseSubstanceProteinSubstanceProteinSubunitComponentContent(eventType, xpp, owner, res)) 22702 unknownContent(xpp); 22703 eventType = nextNoWhitespace(xpp); 22704 } 22705 next(xpp); 22706 parseElementClose(res); 22707 return res; 22708 } 22709 22710 protected boolean parseSubstanceProteinSubstanceProteinSubunitComponentContent(int eventType, XmlPullParser xpp, 22711 SubstanceProtein owner, SubstanceProtein.SubstanceProteinSubunitComponent res) 22712 throws XmlPullParserException, IOException, FHIRFormatError { 22713 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subunit")) { 22714 res.setSubunitElement(parseInteger(xpp)); 22715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequence")) { 22716 res.setSequenceElement(parseString(xpp)); 22717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("length")) { 22718 res.setLengthElement(parseInteger(xpp)); 22719 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sequenceAttachment")) { 22720 res.setSequenceAttachment(parseAttachment(xpp)); 22721 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nTerminalModificationId")) { 22722 res.setNTerminalModificationId(parseIdentifier(xpp)); 22723 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nTerminalModification")) { 22724 res.setNTerminalModificationElement(parseString(xpp)); 22725 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cTerminalModificationId")) { 22726 res.setCTerminalModificationId(parseIdentifier(xpp)); 22727 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cTerminalModification")) { 22728 res.setCTerminalModificationElement(parseString(xpp)); 22729 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22730 return false; 22731 return true; 22732 } 22733 22734 protected SubstanceReferenceInformation parseSubstanceReferenceInformation(XmlPullParser xpp) 22735 throws XmlPullParserException, IOException, FHIRFormatError { 22736 SubstanceReferenceInformation res = new SubstanceReferenceInformation(); 22737 parseDomainResourceAttributes(xpp, res); 22738 next(xpp); 22739 int eventType = nextNoWhitespace(xpp); 22740 while (eventType != XmlPullParser.END_TAG) { 22741 if (!parseSubstanceReferenceInformationContent(eventType, xpp, res)) 22742 unknownContent(xpp); 22743 eventType = nextNoWhitespace(xpp); 22744 } 22745 next(xpp); 22746 parseElementClose(res); 22747 return res; 22748 } 22749 22750 protected boolean parseSubstanceReferenceInformationContent(int eventType, XmlPullParser xpp, 22751 SubstanceReferenceInformation res) throws XmlPullParserException, IOException, FHIRFormatError { 22752 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 22753 res.setCommentElement(parseString(xpp)); 22754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gene")) { 22755 res.getGene().add(parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(xpp, res)); 22756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("geneElement")) { 22757 res.getGeneElement() 22758 .add(parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(xpp, res)); 22759 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 22760 res.getClassification() 22761 .add(parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(xpp, res)); 22762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 22763 res.getTarget().add(parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(xpp, res)); 22764 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22765 return false; 22766 return true; 22767 } 22768 22769 protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent( 22770 XmlPullParser xpp, SubstanceReferenceInformation owner) 22771 throws XmlPullParserException, IOException, FHIRFormatError { 22772 SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent(); 22773 parseBackboneAttributes(xpp, res); 22774 next(xpp); 22775 int eventType = nextNoWhitespace(xpp); 22776 while (eventType != XmlPullParser.END_TAG) { 22777 if (!parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentContent(eventType, xpp, owner, 22778 res)) 22779 unknownContent(xpp); 22780 eventType = nextNoWhitespace(xpp); 22781 } 22782 next(xpp); 22783 parseElementClose(res); 22784 return res; 22785 } 22786 22787 protected boolean parseSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentContent(int eventType, 22788 XmlPullParser xpp, SubstanceReferenceInformation owner, 22789 SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent res) 22790 throws XmlPullParserException, IOException, FHIRFormatError { 22791 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("geneSequenceOrigin")) { 22792 res.setGeneSequenceOrigin(parseCodeableConcept(xpp)); 22793 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("gene")) { 22794 res.setGene(parseCodeableConcept(xpp)); 22795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 22796 res.getSource().add(parseReference(xpp)); 22797 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22798 return false; 22799 return true; 22800 } 22801 22802 protected SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent( 22803 XmlPullParser xpp, SubstanceReferenceInformation owner) 22804 throws XmlPullParserException, IOException, FHIRFormatError { 22805 SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent(); 22806 parseBackboneAttributes(xpp, res); 22807 next(xpp); 22808 int eventType = nextNoWhitespace(xpp); 22809 while (eventType != XmlPullParser.END_TAG) { 22810 if (!parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentContent(eventType, xpp, 22811 owner, res)) 22812 unknownContent(xpp); 22813 eventType = nextNoWhitespace(xpp); 22814 } 22815 next(xpp); 22816 parseElementClose(res); 22817 return res; 22818 } 22819 22820 protected boolean parseSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentContent( 22821 int eventType, XmlPullParser xpp, SubstanceReferenceInformation owner, 22822 SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent res) 22823 throws XmlPullParserException, IOException, FHIRFormatError { 22824 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22825 res.setType(parseCodeableConcept(xpp)); 22826 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("element")) { 22827 res.setElement(parseIdentifier(xpp)); 22828 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 22829 res.getSource().add(parseReference(xpp)); 22830 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22831 return false; 22832 return true; 22833 } 22834 22835 protected SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent( 22836 XmlPullParser xpp, SubstanceReferenceInformation owner) 22837 throws XmlPullParserException, IOException, FHIRFormatError { 22838 SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent(); 22839 parseBackboneAttributes(xpp, res); 22840 next(xpp); 22841 int eventType = nextNoWhitespace(xpp); 22842 while (eventType != XmlPullParser.END_TAG) { 22843 if (!parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentContent(eventType, xpp, 22844 owner, res)) 22845 unknownContent(xpp); 22846 eventType = nextNoWhitespace(xpp); 22847 } 22848 next(xpp); 22849 parseElementClose(res); 22850 return res; 22851 } 22852 22853 protected boolean parseSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentContent( 22854 int eventType, XmlPullParser xpp, SubstanceReferenceInformation owner, 22855 SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent res) 22856 throws XmlPullParserException, IOException, FHIRFormatError { 22857 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { 22858 res.setDomain(parseCodeableConcept(xpp)); 22859 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("classification")) { 22860 res.setClassification(parseCodeableConcept(xpp)); 22861 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subtype")) { 22862 res.getSubtype().add(parseCodeableConcept(xpp)); 22863 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 22864 res.getSource().add(parseReference(xpp)); 22865 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22866 return false; 22867 return true; 22868 } 22869 22870 protected SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent( 22871 XmlPullParser xpp, SubstanceReferenceInformation owner) 22872 throws XmlPullParserException, IOException, FHIRFormatError { 22873 SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent res = new SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent(); 22874 parseBackboneAttributes(xpp, res); 22875 next(xpp); 22876 int eventType = nextNoWhitespace(xpp); 22877 while (eventType != XmlPullParser.END_TAG) { 22878 if (!parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentContent(eventType, xpp, owner, 22879 res)) 22880 unknownContent(xpp); 22881 eventType = nextNoWhitespace(xpp); 22882 } 22883 next(xpp); 22884 parseElementClose(res); 22885 return res; 22886 } 22887 22888 protected boolean parseSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentContent(int eventType, 22889 XmlPullParser xpp, SubstanceReferenceInformation owner, 22890 SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent res) 22891 throws XmlPullParserException, IOException, FHIRFormatError { 22892 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 22893 res.setTarget(parseIdentifier(xpp)); 22894 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 22895 res.setType(parseCodeableConcept(xpp)); 22896 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("interaction")) { 22897 res.setInteraction(parseCodeableConcept(xpp)); 22898 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organism")) { 22899 res.setOrganism(parseCodeableConcept(xpp)); 22900 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organismType")) { 22901 res.setOrganismType(parseCodeableConcept(xpp)); 22902 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "amount")) { 22903 res.setAmount(parseType("amount", xpp)); 22904 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amountType")) { 22905 res.setAmountType(parseCodeableConcept(xpp)); 22906 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 22907 res.getSource().add(parseReference(xpp)); 22908 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22909 return false; 22910 return true; 22911 } 22912 22913 protected SubstanceSourceMaterial parseSubstanceSourceMaterial(XmlPullParser xpp) 22914 throws XmlPullParserException, IOException, FHIRFormatError { 22915 SubstanceSourceMaterial res = new SubstanceSourceMaterial(); 22916 parseDomainResourceAttributes(xpp, res); 22917 next(xpp); 22918 int eventType = nextNoWhitespace(xpp); 22919 while (eventType != XmlPullParser.END_TAG) { 22920 if (!parseSubstanceSourceMaterialContent(eventType, xpp, res)) 22921 unknownContent(xpp); 22922 eventType = nextNoWhitespace(xpp); 22923 } 22924 next(xpp); 22925 parseElementClose(res); 22926 return res; 22927 } 22928 22929 protected boolean parseSubstanceSourceMaterialContent(int eventType, XmlPullParser xpp, SubstanceSourceMaterial res) 22930 throws XmlPullParserException, IOException, FHIRFormatError { 22931 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceMaterialClass")) { 22932 res.setSourceMaterialClass(parseCodeableConcept(xpp)); 22933 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceMaterialType")) { 22934 res.setSourceMaterialType(parseCodeableConcept(xpp)); 22935 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceMaterialState")) { 22936 res.setSourceMaterialState(parseCodeableConcept(xpp)); 22937 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organismId")) { 22938 res.setOrganismId(parseIdentifier(xpp)); 22939 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organismName")) { 22940 res.setOrganismNameElement(parseString(xpp)); 22941 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parentSubstanceId")) { 22942 res.getParentSubstanceId().add(parseIdentifier(xpp)); 22943 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parentSubstanceName")) { 22944 res.getParentSubstanceName().add(parseString(xpp)); 22945 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("countryOfOrigin")) { 22946 res.getCountryOfOrigin().add(parseCodeableConcept(xpp)); 22947 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("geographicalLocation")) { 22948 res.getGeographicalLocation().add(parseString(xpp)); 22949 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("developmentStage")) { 22950 res.setDevelopmentStage(parseCodeableConcept(xpp)); 22951 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fractionDescription")) { 22952 res.getFractionDescription() 22953 .add(parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(xpp, res)); 22954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organism")) { 22955 res.setOrganism(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent(xpp, res)); 22956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partDescription")) { 22957 res.getPartDescription() 22958 .add(parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(xpp, res)); 22959 } else if (!parseDomainResourceContent(eventType, xpp, res)) 22960 return false; 22961 return true; 22962 } 22963 22964 protected SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent( 22965 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 22966 SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent(); 22967 parseBackboneAttributes(xpp, res); 22968 next(xpp); 22969 int eventType = nextNoWhitespace(xpp); 22970 while (eventType != XmlPullParser.END_TAG) { 22971 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentContent(eventType, xpp, owner, 22972 res)) 22973 unknownContent(xpp); 22974 eventType = nextNoWhitespace(xpp); 22975 } 22976 next(xpp); 22977 parseElementClose(res); 22978 return res; 22979 } 22980 22981 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentContent( 22982 int eventType, XmlPullParser xpp, SubstanceSourceMaterial owner, 22983 SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent res) 22984 throws XmlPullParserException, IOException, FHIRFormatError { 22985 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fraction")) { 22986 res.setFractionElement(parseString(xpp)); 22987 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("materialType")) { 22988 res.setMaterialType(parseCodeableConcept(xpp)); 22989 } else if (!parseBackboneElementContent(eventType, xpp, res)) 22990 return false; 22991 return true; 22992 } 22993 22994 protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent( 22995 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 22996 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent(); 22997 parseBackboneAttributes(xpp, res); 22998 next(xpp); 22999 int eventType = nextNoWhitespace(xpp); 23000 while (eventType != XmlPullParser.END_TAG) { 23001 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentContent(eventType, xpp, owner, res)) 23002 unknownContent(xpp); 23003 eventType = nextNoWhitespace(xpp); 23004 } 23005 next(xpp); 23006 parseElementClose(res); 23007 return res; 23008 } 23009 23010 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentContent(int eventType, 23011 XmlPullParser xpp, SubstanceSourceMaterial owner, 23012 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent res) 23013 throws XmlPullParserException, IOException, FHIRFormatError { 23014 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("family")) { 23015 res.setFamily(parseCodeableConcept(xpp)); 23016 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("genus")) { 23017 res.setGenus(parseCodeableConcept(xpp)); 23018 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("species")) { 23019 res.setSpecies(parseCodeableConcept(xpp)); 23020 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intraspecificType")) { 23021 res.setIntraspecificType(parseCodeableConcept(xpp)); 23022 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intraspecificDescription")) { 23023 res.setIntraspecificDescriptionElement(parseString(xpp)); 23024 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("author")) { 23025 res.getAuthor().add(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(xpp, owner)); 23026 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hybrid")) { 23027 res.setHybrid(parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent(xpp, owner)); 23028 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organismGeneral")) { 23029 res.setOrganismGeneral( 23030 parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent(xpp, owner)); 23031 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23032 return false; 23033 return true; 23034 } 23035 23036 protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent( 23037 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 23038 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent(); 23039 parseBackboneAttributes(xpp, res); 23040 next(xpp); 23041 int eventType = nextNoWhitespace(xpp); 23042 while (eventType != XmlPullParser.END_TAG) { 23043 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentContent(eventType, xpp, owner, 23044 res)) 23045 unknownContent(xpp); 23046 eventType = nextNoWhitespace(xpp); 23047 } 23048 next(xpp); 23049 parseElementClose(res); 23050 return res; 23051 } 23052 23053 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentContent(int eventType, 23054 XmlPullParser xpp, SubstanceSourceMaterial owner, 23055 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent res) 23056 throws XmlPullParserException, IOException, FHIRFormatError { 23057 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorType")) { 23058 res.setAuthorType(parseCodeableConcept(xpp)); 23059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authorDescription")) { 23060 res.setAuthorDescriptionElement(parseString(xpp)); 23061 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23062 return false; 23063 return true; 23064 } 23065 23066 protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent( 23067 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 23068 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent(); 23069 parseBackboneAttributes(xpp, res); 23070 next(xpp); 23071 int eventType = nextNoWhitespace(xpp); 23072 while (eventType != XmlPullParser.END_TAG) { 23073 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentContent(eventType, xpp, owner, 23074 res)) 23075 unknownContent(xpp); 23076 eventType = nextNoWhitespace(xpp); 23077 } 23078 next(xpp); 23079 parseElementClose(res); 23080 return res; 23081 } 23082 23083 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentContent(int eventType, 23084 XmlPullParser xpp, SubstanceSourceMaterial owner, 23085 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent res) 23086 throws XmlPullParserException, IOException, FHIRFormatError { 23087 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maternalOrganismId")) { 23088 res.setMaternalOrganismIdElement(parseString(xpp)); 23089 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("maternalOrganismName")) { 23090 res.setMaternalOrganismNameElement(parseString(xpp)); 23091 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paternalOrganismId")) { 23092 res.setPaternalOrganismIdElement(parseString(xpp)); 23093 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paternalOrganismName")) { 23094 res.setPaternalOrganismNameElement(parseString(xpp)); 23095 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hybridType")) { 23096 res.setHybridType(parseCodeableConcept(xpp)); 23097 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23098 return false; 23099 return true; 23100 } 23101 23102 protected SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent( 23103 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 23104 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent(); 23105 parseBackboneAttributes(xpp, res); 23106 next(xpp); 23107 int eventType = nextNoWhitespace(xpp); 23108 while (eventType != XmlPullParser.END_TAG) { 23109 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentContent(eventType, xpp, 23110 owner, res)) 23111 unknownContent(xpp); 23112 eventType = nextNoWhitespace(xpp); 23113 } 23114 next(xpp); 23115 parseElementClose(res); 23116 return res; 23117 } 23118 23119 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentContent( 23120 int eventType, XmlPullParser xpp, SubstanceSourceMaterial owner, 23121 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent res) 23122 throws XmlPullParserException, IOException, FHIRFormatError { 23123 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kingdom")) { 23124 res.setKingdom(parseCodeableConcept(xpp)); 23125 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("phylum")) { 23126 res.setPhylum(parseCodeableConcept(xpp)); 23127 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("class")) { 23128 res.setClass_(parseCodeableConcept(xpp)); 23129 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("order")) { 23130 res.setOrder(parseCodeableConcept(xpp)); 23131 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23132 return false; 23133 return true; 23134 } 23135 23136 protected SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent( 23137 XmlPullParser xpp, SubstanceSourceMaterial owner) throws XmlPullParserException, IOException, FHIRFormatError { 23138 SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent res = new SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent(); 23139 parseBackboneAttributes(xpp, res); 23140 next(xpp); 23141 int eventType = nextNoWhitespace(xpp); 23142 while (eventType != XmlPullParser.END_TAG) { 23143 if (!parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentContent(eventType, xpp, owner, 23144 res)) 23145 unknownContent(xpp); 23146 eventType = nextNoWhitespace(xpp); 23147 } 23148 next(xpp); 23149 parseElementClose(res); 23150 return res; 23151 } 23152 23153 protected boolean parseSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentContent(int eventType, 23154 XmlPullParser xpp, SubstanceSourceMaterial owner, 23155 SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent res) 23156 throws XmlPullParserException, IOException, FHIRFormatError { 23157 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("part")) { 23158 res.setPart(parseCodeableConcept(xpp)); 23159 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partLocation")) { 23160 res.setPartLocation(parseCodeableConcept(xpp)); 23161 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23162 return false; 23163 return true; 23164 } 23165 23166 protected SubstanceSpecification parseSubstanceSpecification(XmlPullParser xpp) 23167 throws XmlPullParserException, IOException, FHIRFormatError { 23168 SubstanceSpecification res = new SubstanceSpecification(); 23169 parseDomainResourceAttributes(xpp, res); 23170 next(xpp); 23171 int eventType = nextNoWhitespace(xpp); 23172 while (eventType != XmlPullParser.END_TAG) { 23173 if (!parseSubstanceSpecificationContent(eventType, xpp, res)) 23174 unknownContent(xpp); 23175 eventType = nextNoWhitespace(xpp); 23176 } 23177 next(xpp); 23178 parseElementClose(res); 23179 return res; 23180 } 23181 23182 protected boolean parseSubstanceSpecificationContent(int eventType, XmlPullParser xpp, SubstanceSpecification res) 23183 throws XmlPullParserException, IOException, FHIRFormatError { 23184 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23185 res.setIdentifier(parseIdentifier(xpp)); 23186 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23187 res.setType(parseCodeableConcept(xpp)); 23188 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23189 res.setStatus(parseCodeableConcept(xpp)); 23190 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { 23191 res.setDomain(parseCodeableConcept(xpp)); 23192 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 23193 res.setDescriptionElement(parseString(xpp)); 23194 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 23195 res.getSource().add(parseReference(xpp)); 23196 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 23197 res.setCommentElement(parseString(xpp)); 23198 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("moiety")) { 23199 res.getMoiety().add(parseSubstanceSpecificationSubstanceSpecificationMoietyComponent(xpp, res)); 23200 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 23201 res.getProperty().add(parseSubstanceSpecificationSubstanceSpecificationPropertyComponent(xpp, res)); 23202 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("referenceInformation")) { 23203 res.setReferenceInformation(parseReference(xpp)); 23204 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("structure")) { 23205 res.setStructure(parseSubstanceSpecificationSubstanceSpecificationStructureComponent(xpp, res)); 23206 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 23207 res.getCode().add(parseSubstanceSpecificationSubstanceSpecificationCodeComponent(xpp, res)); 23208 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 23209 res.getName().add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(xpp, res)); 23210 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularWeight")) { 23211 res.getMolecularWeight() 23212 .add(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(xpp, res)); 23213 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 23214 res.getRelationship().add(parseSubstanceSpecificationSubstanceSpecificationRelationshipComponent(xpp, res)); 23215 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nucleicAcid")) { 23216 res.setNucleicAcid(parseReference(xpp)); 23217 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("polymer")) { 23218 res.setPolymer(parseReference(xpp)); 23219 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("protein")) { 23220 res.setProtein(parseReference(xpp)); 23221 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceMaterial")) { 23222 res.setSourceMaterial(parseReference(xpp)); 23223 } else if (!parseDomainResourceContent(eventType, xpp, res)) 23224 return false; 23225 return true; 23226 } 23227 23228 protected SubstanceSpecification.SubstanceSpecificationMoietyComponent parseSubstanceSpecificationSubstanceSpecificationMoietyComponent( 23229 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23230 SubstanceSpecification.SubstanceSpecificationMoietyComponent res = new SubstanceSpecification.SubstanceSpecificationMoietyComponent(); 23231 parseBackboneAttributes(xpp, res); 23232 next(xpp); 23233 int eventType = nextNoWhitespace(xpp); 23234 while (eventType != XmlPullParser.END_TAG) { 23235 if (!parseSubstanceSpecificationSubstanceSpecificationMoietyComponentContent(eventType, xpp, owner, res)) 23236 unknownContent(xpp); 23237 eventType = nextNoWhitespace(xpp); 23238 } 23239 next(xpp); 23240 parseElementClose(res); 23241 return res; 23242 } 23243 23244 protected boolean parseSubstanceSpecificationSubstanceSpecificationMoietyComponentContent(int eventType, 23245 XmlPullParser xpp, SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationMoietyComponent res) 23246 throws XmlPullParserException, IOException, FHIRFormatError { 23247 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("role")) { 23248 res.setRole(parseCodeableConcept(xpp)); 23249 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23250 res.setIdentifier(parseIdentifier(xpp)); 23251 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 23252 res.setNameElement(parseString(xpp)); 23253 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stereochemistry")) { 23254 res.setStereochemistry(parseCodeableConcept(xpp)); 23255 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("opticalActivity")) { 23256 res.setOpticalActivity(parseCodeableConcept(xpp)); 23257 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularFormula")) { 23258 res.setMolecularFormulaElement(parseString(xpp)); 23259 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "amount")) { 23260 res.setAmount(parseType("amount", xpp)); 23261 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23262 return false; 23263 return true; 23264 } 23265 23266 protected SubstanceSpecification.SubstanceSpecificationPropertyComponent parseSubstanceSpecificationSubstanceSpecificationPropertyComponent( 23267 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23268 SubstanceSpecification.SubstanceSpecificationPropertyComponent res = new SubstanceSpecification.SubstanceSpecificationPropertyComponent(); 23269 parseBackboneAttributes(xpp, res); 23270 next(xpp); 23271 int eventType = nextNoWhitespace(xpp); 23272 while (eventType != XmlPullParser.END_TAG) { 23273 if (!parseSubstanceSpecificationSubstanceSpecificationPropertyComponentContent(eventType, xpp, owner, res)) 23274 unknownContent(xpp); 23275 eventType = nextNoWhitespace(xpp); 23276 } 23277 next(xpp); 23278 parseElementClose(res); 23279 return res; 23280 } 23281 23282 protected boolean parseSubstanceSpecificationSubstanceSpecificationPropertyComponentContent(int eventType, 23283 XmlPullParser xpp, SubstanceSpecification owner, 23284 SubstanceSpecification.SubstanceSpecificationPropertyComponent res) 23285 throws XmlPullParserException, IOException, FHIRFormatError { 23286 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 23287 res.setCategory(parseCodeableConcept(xpp)); 23288 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 23289 res.setCode(parseCodeableConcept(xpp)); 23290 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameters")) { 23291 res.setParametersElement(parseString(xpp)); 23292 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "definingSubstance")) { 23293 res.setDefiningSubstance(parseType("definingSubstance", xpp)); 23294 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "amount")) { 23295 res.setAmount(parseType("amount", xpp)); 23296 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23297 return false; 23298 return true; 23299 } 23300 23301 protected SubstanceSpecification.SubstanceSpecificationStructureComponent parseSubstanceSpecificationSubstanceSpecificationStructureComponent( 23302 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23303 SubstanceSpecification.SubstanceSpecificationStructureComponent res = new SubstanceSpecification.SubstanceSpecificationStructureComponent(); 23304 parseBackboneAttributes(xpp, res); 23305 next(xpp); 23306 int eventType = nextNoWhitespace(xpp); 23307 while (eventType != XmlPullParser.END_TAG) { 23308 if (!parseSubstanceSpecificationSubstanceSpecificationStructureComponentContent(eventType, xpp, owner, res)) 23309 unknownContent(xpp); 23310 eventType = nextNoWhitespace(xpp); 23311 } 23312 next(xpp); 23313 parseElementClose(res); 23314 return res; 23315 } 23316 23317 protected boolean parseSubstanceSpecificationSubstanceSpecificationStructureComponentContent(int eventType, 23318 XmlPullParser xpp, SubstanceSpecification owner, 23319 SubstanceSpecification.SubstanceSpecificationStructureComponent res) 23320 throws XmlPullParserException, IOException, FHIRFormatError { 23321 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("stereochemistry")) { 23322 res.setStereochemistry(parseCodeableConcept(xpp)); 23323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("opticalActivity")) { 23324 res.setOpticalActivity(parseCodeableConcept(xpp)); 23325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularFormula")) { 23326 res.setMolecularFormulaElement(parseString(xpp)); 23327 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularFormulaByMoiety")) { 23328 res.setMolecularFormulaByMoietyElement(parseString(xpp)); 23329 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isotope")) { 23330 res.getIsotope().add(parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(xpp, owner)); 23331 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularWeight")) { 23332 res.setMolecularWeight( 23333 parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(xpp, owner)); 23334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 23335 res.getSource().add(parseReference(xpp)); 23336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { 23337 res.getRepresentation() 23338 .add(parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(xpp, owner)); 23339 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23340 return false; 23341 return true; 23342 } 23343 23344 protected SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent( 23345 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23346 SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent res = new SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent(); 23347 parseBackboneAttributes(xpp, res); 23348 next(xpp); 23349 int eventType = nextNoWhitespace(xpp); 23350 while (eventType != XmlPullParser.END_TAG) { 23351 if (!parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentContent(eventType, xpp, owner, 23352 res)) 23353 unknownContent(xpp); 23354 eventType = nextNoWhitespace(xpp); 23355 } 23356 next(xpp); 23357 parseElementClose(res); 23358 return res; 23359 } 23360 23361 protected boolean parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentContent(int eventType, 23362 XmlPullParser xpp, SubstanceSpecification owner, 23363 SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent res) 23364 throws XmlPullParserException, IOException, FHIRFormatError { 23365 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23366 res.setIdentifier(parseIdentifier(xpp)); 23367 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 23368 res.setName(parseCodeableConcept(xpp)); 23369 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("substitution")) { 23370 res.setSubstitution(parseCodeableConcept(xpp)); 23371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("halfLife")) { 23372 res.setHalfLife(parseQuantity(xpp)); 23373 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("molecularWeight")) { 23374 res.setMolecularWeight( 23375 parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent(xpp, owner)); 23376 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23377 return false; 23378 return true; 23379 } 23380 23381 protected SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent( 23382 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23383 SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent res = new SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent(); 23384 parseBackboneAttributes(xpp, res); 23385 next(xpp); 23386 int eventType = nextNoWhitespace(xpp); 23387 while (eventType != XmlPullParser.END_TAG) { 23388 if (!parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentContent(eventType, 23389 xpp, owner, res)) 23390 unknownContent(xpp); 23391 eventType = nextNoWhitespace(xpp); 23392 } 23393 next(xpp); 23394 parseElementClose(res); 23395 return res; 23396 } 23397 23398 protected boolean parseSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentContent( 23399 int eventType, XmlPullParser xpp, SubstanceSpecification owner, 23400 SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent res) 23401 throws XmlPullParserException, IOException, FHIRFormatError { 23402 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 23403 res.setMethod(parseCodeableConcept(xpp)); 23404 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23405 res.setType(parseCodeableConcept(xpp)); 23406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 23407 res.setAmount(parseQuantity(xpp)); 23408 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23409 return false; 23410 return true; 23411 } 23412 23413 protected SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent( 23414 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23415 SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent res = new SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent(); 23416 parseBackboneAttributes(xpp, res); 23417 next(xpp); 23418 int eventType = nextNoWhitespace(xpp); 23419 while (eventType != XmlPullParser.END_TAG) { 23420 if (!parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentContent(eventType, xpp, 23421 owner, res)) 23422 unknownContent(xpp); 23423 eventType = nextNoWhitespace(xpp); 23424 } 23425 next(xpp); 23426 parseElementClose(res); 23427 return res; 23428 } 23429 23430 protected boolean parseSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentContent( 23431 int eventType, XmlPullParser xpp, SubstanceSpecification owner, 23432 SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent res) 23433 throws XmlPullParserException, IOException, FHIRFormatError { 23434 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23435 res.setType(parseCodeableConcept(xpp)); 23436 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("representation")) { 23437 res.setRepresentationElement(parseString(xpp)); 23438 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attachment")) { 23439 res.setAttachment(parseAttachment(xpp)); 23440 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23441 return false; 23442 return true; 23443 } 23444 23445 protected SubstanceSpecification.SubstanceSpecificationCodeComponent parseSubstanceSpecificationSubstanceSpecificationCodeComponent( 23446 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23447 SubstanceSpecification.SubstanceSpecificationCodeComponent res = new SubstanceSpecification.SubstanceSpecificationCodeComponent(); 23448 parseBackboneAttributes(xpp, res); 23449 next(xpp); 23450 int eventType = nextNoWhitespace(xpp); 23451 while (eventType != XmlPullParser.END_TAG) { 23452 if (!parseSubstanceSpecificationSubstanceSpecificationCodeComponentContent(eventType, xpp, owner, res)) 23453 unknownContent(xpp); 23454 eventType = nextNoWhitespace(xpp); 23455 } 23456 next(xpp); 23457 parseElementClose(res); 23458 return res; 23459 } 23460 23461 protected boolean parseSubstanceSpecificationSubstanceSpecificationCodeComponentContent(int eventType, 23462 XmlPullParser xpp, SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationCodeComponent res) 23463 throws XmlPullParserException, IOException, FHIRFormatError { 23464 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 23465 res.setCode(parseCodeableConcept(xpp)); 23466 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23467 res.setStatus(parseCodeableConcept(xpp)); 23468 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { 23469 res.setStatusDateElement(parseDateTime(xpp)); 23470 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) { 23471 res.setCommentElement(parseString(xpp)); 23472 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 23473 res.getSource().add(parseReference(xpp)); 23474 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23475 return false; 23476 return true; 23477 } 23478 23479 protected SubstanceSpecification.SubstanceSpecificationNameComponent parseSubstanceSpecificationSubstanceSpecificationNameComponent( 23480 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23481 SubstanceSpecification.SubstanceSpecificationNameComponent res = new SubstanceSpecification.SubstanceSpecificationNameComponent(); 23482 parseBackboneAttributes(xpp, res); 23483 next(xpp); 23484 int eventType = nextNoWhitespace(xpp); 23485 while (eventType != XmlPullParser.END_TAG) { 23486 if (!parseSubstanceSpecificationSubstanceSpecificationNameComponentContent(eventType, xpp, owner, res)) 23487 unknownContent(xpp); 23488 eventType = nextNoWhitespace(xpp); 23489 } 23490 next(xpp); 23491 parseElementClose(res); 23492 return res; 23493 } 23494 23495 protected boolean parseSubstanceSpecificationSubstanceSpecificationNameComponentContent(int eventType, 23496 XmlPullParser xpp, SubstanceSpecification owner, SubstanceSpecification.SubstanceSpecificationNameComponent res) 23497 throws XmlPullParserException, IOException, FHIRFormatError { 23498 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 23499 res.setNameElement(parseString(xpp)); 23500 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23501 res.setType(parseCodeableConcept(xpp)); 23502 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23503 res.setStatus(parseCodeableConcept(xpp)); 23504 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("preferred")) { 23505 res.setPreferredElement(parseBoolean(xpp)); 23506 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 23507 res.getLanguage().add(parseCodeableConcept(xpp)); 23508 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("domain")) { 23509 res.getDomain().add(parseCodeableConcept(xpp)); 23510 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 23511 res.getJurisdiction().add(parseCodeableConcept(xpp)); 23512 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("synonym")) { 23513 res.getSynonym().add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(xpp, owner)); 23514 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("translation")) { 23515 res.getTranslation().add(parseSubstanceSpecificationSubstanceSpecificationNameComponent(xpp, owner)); 23516 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("official")) { 23517 res.getOfficial().add(parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(xpp, owner)); 23518 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 23519 res.getSource().add(parseReference(xpp)); 23520 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23521 return false; 23522 return true; 23523 } 23524 23525 protected SubstanceSpecification.SubstanceSpecificationNameOfficialComponent parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponent( 23526 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23527 SubstanceSpecification.SubstanceSpecificationNameOfficialComponent res = new SubstanceSpecification.SubstanceSpecificationNameOfficialComponent(); 23528 parseBackboneAttributes(xpp, res); 23529 next(xpp); 23530 int eventType = nextNoWhitespace(xpp); 23531 while (eventType != XmlPullParser.END_TAG) { 23532 if (!parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponentContent(eventType, xpp, owner, res)) 23533 unknownContent(xpp); 23534 eventType = nextNoWhitespace(xpp); 23535 } 23536 next(xpp); 23537 parseElementClose(res); 23538 return res; 23539 } 23540 23541 protected boolean parseSubstanceSpecificationSubstanceSpecificationNameOfficialComponentContent(int eventType, 23542 XmlPullParser xpp, SubstanceSpecification owner, 23543 SubstanceSpecification.SubstanceSpecificationNameOfficialComponent res) 23544 throws XmlPullParserException, IOException, FHIRFormatError { 23545 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authority")) { 23546 res.setAuthority(parseCodeableConcept(xpp)); 23547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23548 res.setStatus(parseCodeableConcept(xpp)); 23549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 23550 res.setDateElement(parseDateTime(xpp)); 23551 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23552 return false; 23553 return true; 23554 } 23555 23556 protected SubstanceSpecification.SubstanceSpecificationRelationshipComponent parseSubstanceSpecificationSubstanceSpecificationRelationshipComponent( 23557 XmlPullParser xpp, SubstanceSpecification owner) throws XmlPullParserException, IOException, FHIRFormatError { 23558 SubstanceSpecification.SubstanceSpecificationRelationshipComponent res = new SubstanceSpecification.SubstanceSpecificationRelationshipComponent(); 23559 parseBackboneAttributes(xpp, res); 23560 next(xpp); 23561 int eventType = nextNoWhitespace(xpp); 23562 while (eventType != XmlPullParser.END_TAG) { 23563 if (!parseSubstanceSpecificationSubstanceSpecificationRelationshipComponentContent(eventType, xpp, owner, res)) 23564 unknownContent(xpp); 23565 eventType = nextNoWhitespace(xpp); 23566 } 23567 next(xpp); 23568 parseElementClose(res); 23569 return res; 23570 } 23571 23572 protected boolean parseSubstanceSpecificationSubstanceSpecificationRelationshipComponentContent(int eventType, 23573 XmlPullParser xpp, SubstanceSpecification owner, 23574 SubstanceSpecification.SubstanceSpecificationRelationshipComponent res) 23575 throws XmlPullParserException, IOException, FHIRFormatError { 23576 if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "substance")) { 23577 res.setSubstance(parseType("substance", xpp)); 23578 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) { 23579 res.setRelationship(parseCodeableConcept(xpp)); 23580 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isDefining")) { 23581 res.setIsDefiningElement(parseBoolean(xpp)); 23582 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "amount")) { 23583 res.setAmount(parseType("amount", xpp)); 23584 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amountRatioLowLimit")) { 23585 res.setAmountRatioLowLimit(parseRatio(xpp)); 23586 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amountType")) { 23587 res.setAmountType(parseCodeableConcept(xpp)); 23588 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("source")) { 23589 res.getSource().add(parseReference(xpp)); 23590 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23591 return false; 23592 return true; 23593 } 23594 23595 protected SupplyDelivery parseSupplyDelivery(XmlPullParser xpp) 23596 throws XmlPullParserException, IOException, FHIRFormatError { 23597 SupplyDelivery res = new SupplyDelivery(); 23598 parseDomainResourceAttributes(xpp, res); 23599 next(xpp); 23600 int eventType = nextNoWhitespace(xpp); 23601 while (eventType != XmlPullParser.END_TAG) { 23602 if (!parseSupplyDeliveryContent(eventType, xpp, res)) 23603 unknownContent(xpp); 23604 eventType = nextNoWhitespace(xpp); 23605 } 23606 next(xpp); 23607 parseElementClose(res); 23608 return res; 23609 } 23610 23611 protected boolean parseSupplyDeliveryContent(int eventType, XmlPullParser xpp, SupplyDelivery res) 23612 throws XmlPullParserException, IOException, FHIRFormatError { 23613 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23614 res.getIdentifier().add(parseIdentifier(xpp)); 23615 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 23616 res.getBasedOn().add(parseReference(xpp)); 23617 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 23618 res.getPartOf().add(parseReference(xpp)); 23619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23620 res.setStatusElement(parseEnumeration(xpp, SupplyDelivery.SupplyDeliveryStatus.NULL, 23621 new SupplyDelivery.SupplyDeliveryStatusEnumFactory())); 23622 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 23623 res.setPatient(parseReference(xpp)); 23624 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23625 res.setType(parseCodeableConcept(xpp)); 23626 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("suppliedItem")) { 23627 res.setSuppliedItem(parseSupplyDeliverySupplyDeliverySuppliedItemComponent(xpp, res)); 23628 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 23629 res.setOccurrence(parseType("occurrence", xpp)); 23630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { 23631 res.setSupplier(parseReference(xpp)); 23632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 23633 res.setDestination(parseReference(xpp)); 23634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("receiver")) { 23635 res.getReceiver().add(parseReference(xpp)); 23636 } else if (!parseDomainResourceContent(eventType, xpp, res)) 23637 return false; 23638 return true; 23639 } 23640 23641 protected SupplyDelivery.SupplyDeliverySuppliedItemComponent parseSupplyDeliverySupplyDeliverySuppliedItemComponent( 23642 XmlPullParser xpp, SupplyDelivery owner) throws XmlPullParserException, IOException, FHIRFormatError { 23643 SupplyDelivery.SupplyDeliverySuppliedItemComponent res = new SupplyDelivery.SupplyDeliverySuppliedItemComponent(); 23644 parseBackboneAttributes(xpp, res); 23645 next(xpp); 23646 int eventType = nextNoWhitespace(xpp); 23647 while (eventType != XmlPullParser.END_TAG) { 23648 if (!parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(eventType, xpp, owner, res)) 23649 unknownContent(xpp); 23650 eventType = nextNoWhitespace(xpp); 23651 } 23652 next(xpp); 23653 parseElementClose(res); 23654 return res; 23655 } 23656 23657 protected boolean parseSupplyDeliverySupplyDeliverySuppliedItemComponentContent(int eventType, XmlPullParser xpp, 23658 SupplyDelivery owner, SupplyDelivery.SupplyDeliverySuppliedItemComponent res) 23659 throws XmlPullParserException, IOException, FHIRFormatError { 23660 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 23661 res.setQuantity(parseQuantity(xpp)); 23662 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { 23663 res.setItem(parseType("item", xpp)); 23664 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23665 return false; 23666 return true; 23667 } 23668 23669 protected SupplyRequest parseSupplyRequest(XmlPullParser xpp) 23670 throws XmlPullParserException, IOException, FHIRFormatError { 23671 SupplyRequest res = new SupplyRequest(); 23672 parseDomainResourceAttributes(xpp, res); 23673 next(xpp); 23674 int eventType = nextNoWhitespace(xpp); 23675 while (eventType != XmlPullParser.END_TAG) { 23676 if (!parseSupplyRequestContent(eventType, xpp, res)) 23677 unknownContent(xpp); 23678 eventType = nextNoWhitespace(xpp); 23679 } 23680 next(xpp); 23681 parseElementClose(res); 23682 return res; 23683 } 23684 23685 protected boolean parseSupplyRequestContent(int eventType, XmlPullParser xpp, SupplyRequest res) 23686 throws XmlPullParserException, IOException, FHIRFormatError { 23687 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23688 res.getIdentifier().add(parseIdentifier(xpp)); 23689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23690 res.setStatusElement(parseEnumeration(xpp, SupplyRequest.SupplyRequestStatus.NULL, 23691 new SupplyRequest.SupplyRequestStatusEnumFactory())); 23692 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("category")) { 23693 res.setCategory(parseCodeableConcept(xpp)); 23694 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 23695 res.setPriorityElement( 23696 parseEnumeration(xpp, SupplyRequest.RequestPriority.NULL, new SupplyRequest.RequestPriorityEnumFactory())); 23697 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "item")) { 23698 res.setItem(parseType("item", xpp)); 23699 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("quantity")) { 23700 res.setQuantity(parseQuantity(xpp)); 23701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 23702 res.getParameter().add(parseSupplyRequestSupplyRequestParameterComponent(xpp, res)); 23703 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "occurrence")) { 23704 res.setOccurrence(parseType("occurrence", xpp)); 23705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 23706 res.setAuthoredOnElement(parseDateTime(xpp)); 23707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 23708 res.setRequester(parseReference(xpp)); 23709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("supplier")) { 23710 res.getSupplier().add(parseReference(xpp)); 23711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 23712 res.getReasonCode().add(parseCodeableConcept(xpp)); 23713 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 23714 res.getReasonReference().add(parseReference(xpp)); 23715 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverFrom")) { 23716 res.setDeliverFrom(parseReference(xpp)); 23717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("deliverTo")) { 23718 res.setDeliverTo(parseReference(xpp)); 23719 } else if (!parseDomainResourceContent(eventType, xpp, res)) 23720 return false; 23721 return true; 23722 } 23723 23724 protected SupplyRequest.SupplyRequestParameterComponent parseSupplyRequestSupplyRequestParameterComponent( 23725 XmlPullParser xpp, SupplyRequest owner) throws XmlPullParserException, IOException, FHIRFormatError { 23726 SupplyRequest.SupplyRequestParameterComponent res = new SupplyRequest.SupplyRequestParameterComponent(); 23727 parseBackboneAttributes(xpp, res); 23728 next(xpp); 23729 int eventType = nextNoWhitespace(xpp); 23730 while (eventType != XmlPullParser.END_TAG) { 23731 if (!parseSupplyRequestSupplyRequestParameterComponentContent(eventType, xpp, owner, res)) 23732 unknownContent(xpp); 23733 eventType = nextNoWhitespace(xpp); 23734 } 23735 next(xpp); 23736 parseElementClose(res); 23737 return res; 23738 } 23739 23740 protected boolean parseSupplyRequestSupplyRequestParameterComponentContent(int eventType, XmlPullParser xpp, 23741 SupplyRequest owner, SupplyRequest.SupplyRequestParameterComponent res) 23742 throws XmlPullParserException, IOException, FHIRFormatError { 23743 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 23744 res.setCode(parseCodeableConcept(xpp)); 23745 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 23746 res.setValue(parseType("value", xpp)); 23747 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23748 return false; 23749 return true; 23750 } 23751 23752 protected Task parseTask(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 23753 Task res = new Task(); 23754 parseDomainResourceAttributes(xpp, res); 23755 next(xpp); 23756 int eventType = nextNoWhitespace(xpp); 23757 while (eventType != XmlPullParser.END_TAG) { 23758 if (!parseTaskContent(eventType, xpp, res)) 23759 unknownContent(xpp); 23760 eventType = nextNoWhitespace(xpp); 23761 } 23762 next(xpp); 23763 parseElementClose(res); 23764 return res; 23765 } 23766 23767 protected boolean parseTaskContent(int eventType, XmlPullParser xpp, Task res) 23768 throws XmlPullParserException, IOException, FHIRFormatError { 23769 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 23770 res.getIdentifier().add(parseIdentifier(xpp)); 23771 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesCanonical")) { 23772 res.setInstantiatesCanonicalElement(parseCanonical(xpp)); 23773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("instantiatesUri")) { 23774 res.setInstantiatesUriElement(parseUri(xpp)); 23775 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("basedOn")) { 23776 res.getBasedOn().add(parseReference(xpp)); 23777 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("groupIdentifier")) { 23778 res.setGroupIdentifier(parseIdentifier(xpp)); 23779 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("partOf")) { 23780 res.getPartOf().add(parseReference(xpp)); 23781 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23782 res.setStatusElement(parseEnumeration(xpp, Task.TaskStatus.NULL, new Task.TaskStatusEnumFactory())); 23783 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusReason")) { 23784 res.setStatusReason(parseCodeableConcept(xpp)); 23785 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("businessStatus")) { 23786 res.setBusinessStatus(parseCodeableConcept(xpp)); 23787 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("intent")) { 23788 res.setIntentElement(parseEnumeration(xpp, Task.TaskIntent.NULL, new Task.TaskIntentEnumFactory())); 23789 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("priority")) { 23790 res.setPriorityElement(parseEnumeration(xpp, Task.TaskPriority.NULL, new Task.TaskPriorityEnumFactory())); 23791 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 23792 res.setCode(parseCodeableConcept(xpp)); 23793 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 23794 res.setDescriptionElement(parseString(xpp)); 23795 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("focus")) { 23796 res.setFocus(parseReference(xpp)); 23797 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("for")) { 23798 res.setFor(parseReference(xpp)); 23799 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 23800 res.setEncounter(parseReference(xpp)); 23801 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("executionPeriod")) { 23802 res.setExecutionPeriod(parsePeriod(xpp)); 23803 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("authoredOn")) { 23804 res.setAuthoredOnElement(parseDateTime(xpp)); 23805 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastModified")) { 23806 res.setLastModifiedElement(parseDateTime(xpp)); 23807 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requester")) { 23808 res.setRequester(parseReference(xpp)); 23809 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("performerType")) { 23810 res.getPerformerType().add(parseCodeableConcept(xpp)); 23811 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("owner")) { 23812 res.setOwner(parseReference(xpp)); 23813 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("location")) { 23814 res.setLocation(parseReference(xpp)); 23815 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonCode")) { 23816 res.setReasonCode(parseCodeableConcept(xpp)); 23817 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("reasonReference")) { 23818 res.setReasonReference(parseReference(xpp)); 23819 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("insurance")) { 23820 res.getInsurance().add(parseReference(xpp)); 23821 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 23822 res.getNote().add(parseAnnotation(xpp)); 23823 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relevantHistory")) { 23824 res.getRelevantHistory().add(parseReference(xpp)); 23825 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("restriction")) { 23826 res.setRestriction(parseTaskTaskRestrictionComponent(xpp, res)); 23827 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("input")) { 23828 res.getInput().add(parseTaskParameterComponent(xpp, res)); 23829 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("output")) { 23830 res.getOutput().add(parseTaskTaskOutputComponent(xpp, res)); 23831 } else if (!parseDomainResourceContent(eventType, xpp, res)) 23832 return false; 23833 return true; 23834 } 23835 23836 protected Task.TaskRestrictionComponent parseTaskTaskRestrictionComponent(XmlPullParser xpp, Task owner) 23837 throws XmlPullParserException, IOException, FHIRFormatError { 23838 Task.TaskRestrictionComponent res = new Task.TaskRestrictionComponent(); 23839 parseBackboneAttributes(xpp, res); 23840 next(xpp); 23841 int eventType = nextNoWhitespace(xpp); 23842 while (eventType != XmlPullParser.END_TAG) { 23843 if (!parseTaskTaskRestrictionComponentContent(eventType, xpp, owner, res)) 23844 unknownContent(xpp); 23845 eventType = nextNoWhitespace(xpp); 23846 } 23847 next(xpp); 23848 parseElementClose(res); 23849 return res; 23850 } 23851 23852 protected boolean parseTaskTaskRestrictionComponentContent(int eventType, XmlPullParser xpp, Task owner, 23853 Task.TaskRestrictionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 23854 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("repetitions")) { 23855 res.setRepetitionsElement(parsePositiveInt(xpp)); 23856 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("period")) { 23857 res.setPeriod(parsePeriod(xpp)); 23858 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("recipient")) { 23859 res.getRecipient().add(parseReference(xpp)); 23860 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23861 return false; 23862 return true; 23863 } 23864 23865 protected Task.ParameterComponent parseTaskParameterComponent(XmlPullParser xpp, Task owner) 23866 throws XmlPullParserException, IOException, FHIRFormatError { 23867 Task.ParameterComponent res = new Task.ParameterComponent(); 23868 parseBackboneAttributes(xpp, res); 23869 next(xpp); 23870 int eventType = nextNoWhitespace(xpp); 23871 while (eventType != XmlPullParser.END_TAG) { 23872 if (!parseTaskParameterComponentContent(eventType, xpp, owner, res)) 23873 unknownContent(xpp); 23874 eventType = nextNoWhitespace(xpp); 23875 } 23876 next(xpp); 23877 parseElementClose(res); 23878 return res; 23879 } 23880 23881 protected boolean parseTaskParameterComponentContent(int eventType, XmlPullParser xpp, Task owner, 23882 Task.ParameterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 23883 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23884 res.setType(parseCodeableConcept(xpp)); 23885 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 23886 res.setValue(parseType("value", xpp)); 23887 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23888 return false; 23889 return true; 23890 } 23891 23892 protected Task.TaskOutputComponent parseTaskTaskOutputComponent(XmlPullParser xpp, Task owner) 23893 throws XmlPullParserException, IOException, FHIRFormatError { 23894 Task.TaskOutputComponent res = new Task.TaskOutputComponent(); 23895 parseBackboneAttributes(xpp, res); 23896 next(xpp); 23897 int eventType = nextNoWhitespace(xpp); 23898 while (eventType != XmlPullParser.END_TAG) { 23899 if (!parseTaskTaskOutputComponentContent(eventType, xpp, owner, res)) 23900 unknownContent(xpp); 23901 eventType = nextNoWhitespace(xpp); 23902 } 23903 next(xpp); 23904 parseElementClose(res); 23905 return res; 23906 } 23907 23908 protected boolean parseTaskTaskOutputComponentContent(int eventType, XmlPullParser xpp, Task owner, 23909 Task.TaskOutputComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 23910 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 23911 res.setType(parseCodeableConcept(xpp)); 23912 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 23913 res.setValue(parseType("value", xpp)); 23914 } else if (!parseBackboneElementContent(eventType, xpp, res)) 23915 return false; 23916 return true; 23917 } 23918 23919 protected TerminologyCapabilities parseTerminologyCapabilities(XmlPullParser xpp) 23920 throws XmlPullParserException, IOException, FHIRFormatError { 23921 TerminologyCapabilities res = new TerminologyCapabilities(); 23922 parseDomainResourceAttributes(xpp, res); 23923 next(xpp); 23924 int eventType = nextNoWhitespace(xpp); 23925 while (eventType != XmlPullParser.END_TAG) { 23926 if (!parseTerminologyCapabilitiesContent(eventType, xpp, res)) 23927 unknownContent(xpp); 23928 eventType = nextNoWhitespace(xpp); 23929 } 23930 next(xpp); 23931 parseElementClose(res); 23932 return res; 23933 } 23934 23935 protected boolean parseTerminologyCapabilitiesContent(int eventType, XmlPullParser xpp, TerminologyCapabilities res) 23936 throws XmlPullParserException, IOException, FHIRFormatError { 23937 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 23938 res.setUrlElement(parseUri(xpp)); 23939 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 23940 res.setVersionElement(parseString(xpp)); 23941 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 23942 res.setNameElement(parseString(xpp)); 23943 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 23944 res.setTitleElement(parseString(xpp)); 23945 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 23946 res.setStatusElement( 23947 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 23948 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 23949 res.setExperimentalElement(parseBoolean(xpp)); 23950 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 23951 res.setDateElement(parseDateTime(xpp)); 23952 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 23953 res.setPublisherElement(parseString(xpp)); 23954 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 23955 res.getContact().add(parseContactDetail(xpp)); 23956 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 23957 res.setDescriptionElement(parseMarkdown(xpp)); 23958 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 23959 res.getUseContext().add(parseUsageContext(xpp)); 23960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 23961 res.getJurisdiction().add(parseCodeableConcept(xpp)); 23962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 23963 res.setPurposeElement(parseMarkdown(xpp)); 23964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 23965 res.setCopyrightElement(parseMarkdown(xpp)); 23966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("kind")) { 23967 res.setKindElement(parseEnumeration(xpp, TerminologyCapabilities.CapabilityStatementKind.NULL, 23968 new TerminologyCapabilities.CapabilityStatementKindEnumFactory())); 23969 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("software")) { 23970 res.setSoftware(parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(xpp, res)); 23971 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("implementation")) { 23972 res.setImplementation(parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(xpp, res)); 23973 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lockedDate")) { 23974 res.setLockedDateElement(parseBoolean(xpp)); 23975 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codeSystem")) { 23976 res.getCodeSystem().add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(xpp, res)); 23977 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expansion")) { 23978 res.setExpansion(parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(xpp, res)); 23979 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("codeSearch")) { 23980 res.setCodeSearchElement(parseEnumeration(xpp, TerminologyCapabilities.CodeSearchSupport.NULL, 23981 new TerminologyCapabilities.CodeSearchSupportEnumFactory())); 23982 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validateCode")) { 23983 res.setValidateCode(parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(xpp, res)); 23984 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("translation")) { 23985 res.setTranslation(parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(xpp, res)); 23986 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("closure")) { 23987 res.setClosure(parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(xpp, res)); 23988 } else if (!parseDomainResourceContent(eventType, xpp, res)) 23989 return false; 23990 return true; 23991 } 23992 23993 protected TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent( 23994 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 23995 TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent res = new TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent(); 23996 parseBackboneAttributes(xpp, res); 23997 next(xpp); 23998 int eventType = nextNoWhitespace(xpp); 23999 while (eventType != XmlPullParser.END_TAG) { 24000 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentContent(eventType, xpp, owner, res)) 24001 unknownContent(xpp); 24002 eventType = nextNoWhitespace(xpp); 24003 } 24004 next(xpp); 24005 parseElementClose(res); 24006 return res; 24007 } 24008 24009 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentContent(int eventType, 24010 XmlPullParser xpp, TerminologyCapabilities owner, 24011 TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent res) 24012 throws XmlPullParserException, IOException, FHIRFormatError { 24013 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24014 res.setNameElement(parseString(xpp)); 24015 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 24016 res.setVersionElement(parseString(xpp)); 24017 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24018 return false; 24019 return true; 24020 } 24021 24022 protected TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent( 24023 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24024 TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent(); 24025 parseBackboneAttributes(xpp, res); 24026 next(xpp); 24027 int eventType = nextNoWhitespace(xpp); 24028 while (eventType != XmlPullParser.END_TAG) { 24029 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentContent(eventType, xpp, owner, 24030 res)) 24031 unknownContent(xpp); 24032 eventType = nextNoWhitespace(xpp); 24033 } 24034 next(xpp); 24035 parseElementClose(res); 24036 return res; 24037 } 24038 24039 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentContent(int eventType, 24040 XmlPullParser xpp, TerminologyCapabilities owner, 24041 TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent res) 24042 throws XmlPullParserException, IOException, FHIRFormatError { 24043 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24044 res.setDescriptionElement(parseString(xpp)); 24045 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 24046 res.setUrlElement(parseUrl(xpp)); 24047 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24048 return false; 24049 return true; 24050 } 24051 24052 protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent( 24053 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24054 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent(); 24055 parseBackboneAttributes(xpp, res); 24056 next(xpp); 24057 int eventType = nextNoWhitespace(xpp); 24058 while (eventType != XmlPullParser.END_TAG) { 24059 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentContent(eventType, xpp, owner, res)) 24060 unknownContent(xpp); 24061 eventType = nextNoWhitespace(xpp); 24062 } 24063 next(xpp); 24064 parseElementClose(res); 24065 return res; 24066 } 24067 24068 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentContent(int eventType, 24069 XmlPullParser xpp, TerminologyCapabilities owner, 24070 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent res) 24071 throws XmlPullParserException, IOException, FHIRFormatError { 24072 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 24073 res.setUriElement(parseCanonical(xpp)); 24074 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 24075 res.getVersion().add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(xpp, owner)); 24076 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("subsumption")) { 24077 res.setSubsumptionElement(parseBoolean(xpp)); 24078 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24079 return false; 24080 return true; 24081 } 24082 24083 protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent( 24084 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24085 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent(); 24086 parseBackboneAttributes(xpp, res); 24087 next(xpp); 24088 int eventType = nextNoWhitespace(xpp); 24089 while (eventType != XmlPullParser.END_TAG) { 24090 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentContent(eventType, xpp, owner, 24091 res)) 24092 unknownContent(xpp); 24093 eventType = nextNoWhitespace(xpp); 24094 } 24095 next(xpp); 24096 parseElementClose(res); 24097 return res; 24098 } 24099 24100 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentContent(int eventType, 24101 XmlPullParser xpp, TerminologyCapabilities owner, 24102 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent res) 24103 throws XmlPullParserException, IOException, FHIRFormatError { 24104 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 24105 res.setCodeElement(parseString(xpp)); 24106 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("isDefault")) { 24107 res.setIsDefaultElement(parseBoolean(xpp)); 24108 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compositional")) { 24109 res.setCompositionalElement(parseBoolean(xpp)); 24110 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 24111 res.getLanguage().add(parseCode(xpp)); 24112 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { 24113 res.getFilter() 24114 .add(parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(xpp, owner)); 24115 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 24116 res.getProperty().add(parseCode(xpp)); 24117 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24118 return false; 24119 return true; 24120 } 24121 24122 protected TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent( 24123 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24124 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent(); 24125 parseBackboneAttributes(xpp, res); 24126 next(xpp); 24127 int eventType = nextNoWhitespace(xpp); 24128 while (eventType != XmlPullParser.END_TAG) { 24129 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentContent(eventType, xpp, 24130 owner, res)) 24131 unknownContent(xpp); 24132 eventType = nextNoWhitespace(xpp); 24133 } 24134 next(xpp); 24135 parseElementClose(res); 24136 return res; 24137 } 24138 24139 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentContent( 24140 int eventType, XmlPullParser xpp, TerminologyCapabilities owner, 24141 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent res) 24142 throws XmlPullParserException, IOException, FHIRFormatError { 24143 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 24144 res.setCodeElement(parseCode(xpp)); 24145 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("op")) { 24146 res.getOp().add(parseCode(xpp)); 24147 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24148 return false; 24149 return true; 24150 } 24151 24152 protected TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent( 24153 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24154 TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent(); 24155 parseBackboneAttributes(xpp, res); 24156 next(xpp); 24157 int eventType = nextNoWhitespace(xpp); 24158 while (eventType != XmlPullParser.END_TAG) { 24159 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentContent(eventType, xpp, owner, res)) 24160 unknownContent(xpp); 24161 eventType = nextNoWhitespace(xpp); 24162 } 24163 next(xpp); 24164 parseElementClose(res); 24165 return res; 24166 } 24167 24168 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentContent(int eventType, 24169 XmlPullParser xpp, TerminologyCapabilities owner, 24170 TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent res) 24171 throws XmlPullParserException, IOException, FHIRFormatError { 24172 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hierarchical")) { 24173 res.setHierarchicalElement(parseBoolean(xpp)); 24174 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("paging")) { 24175 res.setPagingElement(parseBoolean(xpp)); 24176 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("incomplete")) { 24177 res.setIncompleteElement(parseBoolean(xpp)); 24178 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 24179 res.getParameter() 24180 .add(parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(xpp, owner)); 24181 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("textFilter")) { 24182 res.setTextFilterElement(parseMarkdown(xpp)); 24183 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24184 return false; 24185 return true; 24186 } 24187 24188 protected TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent( 24189 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24190 TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent res = new TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent(); 24191 parseBackboneAttributes(xpp, res); 24192 next(xpp); 24193 int eventType = nextNoWhitespace(xpp); 24194 while (eventType != XmlPullParser.END_TAG) { 24195 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentContent(eventType, xpp, owner, 24196 res)) 24197 unknownContent(xpp); 24198 eventType = nextNoWhitespace(xpp); 24199 } 24200 next(xpp); 24201 parseElementClose(res); 24202 return res; 24203 } 24204 24205 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentContent(int eventType, 24206 XmlPullParser xpp, TerminologyCapabilities owner, 24207 TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent res) 24208 throws XmlPullParserException, IOException, FHIRFormatError { 24209 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24210 res.setNameElement(parseCode(xpp)); 24211 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("documentation")) { 24212 res.setDocumentationElement(parseString(xpp)); 24213 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24214 return false; 24215 return true; 24216 } 24217 24218 protected TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent( 24219 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24220 TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent res = new TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent(); 24221 parseBackboneAttributes(xpp, res); 24222 next(xpp); 24223 int eventType = nextNoWhitespace(xpp); 24224 while (eventType != XmlPullParser.END_TAG) { 24225 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentContent(eventType, xpp, owner, res)) 24226 unknownContent(xpp); 24227 eventType = nextNoWhitespace(xpp); 24228 } 24229 next(xpp); 24230 parseElementClose(res); 24231 return res; 24232 } 24233 24234 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentContent(int eventType, 24235 XmlPullParser xpp, TerminologyCapabilities owner, 24236 TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent res) 24237 throws XmlPullParserException, IOException, FHIRFormatError { 24238 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("translations")) { 24239 res.setTranslationsElement(parseBoolean(xpp)); 24240 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24241 return false; 24242 return true; 24243 } 24244 24245 protected TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent( 24246 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24247 TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent res = new TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent(); 24248 parseBackboneAttributes(xpp, res); 24249 next(xpp); 24250 int eventType = nextNoWhitespace(xpp); 24251 while (eventType != XmlPullParser.END_TAG) { 24252 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentContent(eventType, xpp, owner, res)) 24253 unknownContent(xpp); 24254 eventType = nextNoWhitespace(xpp); 24255 } 24256 next(xpp); 24257 parseElementClose(res); 24258 return res; 24259 } 24260 24261 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentContent(int eventType, 24262 XmlPullParser xpp, TerminologyCapabilities owner, 24263 TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent res) 24264 throws XmlPullParserException, IOException, FHIRFormatError { 24265 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("needsMap")) { 24266 res.setNeedsMapElement(parseBoolean(xpp)); 24267 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24268 return false; 24269 return true; 24270 } 24271 24272 protected TerminologyCapabilities.TerminologyCapabilitiesClosureComponent parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent( 24273 XmlPullParser xpp, TerminologyCapabilities owner) throws XmlPullParserException, IOException, FHIRFormatError { 24274 TerminologyCapabilities.TerminologyCapabilitiesClosureComponent res = new TerminologyCapabilities.TerminologyCapabilitiesClosureComponent(); 24275 parseBackboneAttributes(xpp, res); 24276 next(xpp); 24277 int eventType = nextNoWhitespace(xpp); 24278 while (eventType != XmlPullParser.END_TAG) { 24279 if (!parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentContent(eventType, xpp, owner, res)) 24280 unknownContent(xpp); 24281 eventType = nextNoWhitespace(xpp); 24282 } 24283 next(xpp); 24284 parseElementClose(res); 24285 return res; 24286 } 24287 24288 protected boolean parseTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentContent(int eventType, 24289 XmlPullParser xpp, TerminologyCapabilities owner, 24290 TerminologyCapabilities.TerminologyCapabilitiesClosureComponent res) 24291 throws XmlPullParserException, IOException, FHIRFormatError { 24292 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("translation")) { 24293 res.setTranslationElement(parseBoolean(xpp)); 24294 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24295 return false; 24296 return true; 24297 } 24298 24299 protected TestReport parseTestReport(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 24300 TestReport res = new TestReport(); 24301 parseDomainResourceAttributes(xpp, res); 24302 next(xpp); 24303 int eventType = nextNoWhitespace(xpp); 24304 while (eventType != XmlPullParser.END_TAG) { 24305 if (!parseTestReportContent(eventType, xpp, res)) 24306 unknownContent(xpp); 24307 eventType = nextNoWhitespace(xpp); 24308 } 24309 next(xpp); 24310 parseElementClose(res); 24311 return res; 24312 } 24313 24314 protected boolean parseTestReportContent(int eventType, XmlPullParser xpp, TestReport res) 24315 throws XmlPullParserException, IOException, FHIRFormatError { 24316 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 24317 res.setIdentifier(parseIdentifier(xpp)); 24318 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24319 res.setNameElement(parseString(xpp)); 24320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 24321 res.setStatusElement( 24322 parseEnumeration(xpp, TestReport.TestReportStatus.NULL, new TestReport.TestReportStatusEnumFactory())); 24323 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("testScript")) { 24324 res.setTestScript(parseReference(xpp)); 24325 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { 24326 res.setResultElement( 24327 parseEnumeration(xpp, TestReport.TestReportResult.NULL, new TestReport.TestReportResultEnumFactory())); 24328 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("score")) { 24329 res.setScoreElement(parseDecimal(xpp)); 24330 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("tester")) { 24331 res.setTesterElement(parseString(xpp)); 24332 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("issued")) { 24333 res.setIssuedElement(parseDateTime(xpp)); 24334 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("participant")) { 24335 res.getParticipant().add(parseTestReportTestReportParticipantComponent(xpp, res)); 24336 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { 24337 res.setSetup(parseTestReportTestReportSetupComponent(xpp, res)); 24338 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { 24339 res.getTest().add(parseTestReportTestReportTestComponent(xpp, res)); 24340 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { 24341 res.setTeardown(parseTestReportTestReportTeardownComponent(xpp, res)); 24342 } else if (!parseDomainResourceContent(eventType, xpp, res)) 24343 return false; 24344 return true; 24345 } 24346 24347 protected TestReport.TestReportParticipantComponent parseTestReportTestReportParticipantComponent(XmlPullParser xpp, 24348 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24349 TestReport.TestReportParticipantComponent res = new TestReport.TestReportParticipantComponent(); 24350 parseBackboneAttributes(xpp, res); 24351 next(xpp); 24352 int eventType = nextNoWhitespace(xpp); 24353 while (eventType != XmlPullParser.END_TAG) { 24354 if (!parseTestReportTestReportParticipantComponentContent(eventType, xpp, owner, res)) 24355 unknownContent(xpp); 24356 eventType = nextNoWhitespace(xpp); 24357 } 24358 next(xpp); 24359 parseElementClose(res); 24360 return res; 24361 } 24362 24363 protected boolean parseTestReportTestReportParticipantComponentContent(int eventType, XmlPullParser xpp, 24364 TestReport owner, TestReport.TestReportParticipantComponent res) 24365 throws XmlPullParserException, IOException, FHIRFormatError { 24366 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 24367 res.setTypeElement(parseEnumeration(xpp, TestReport.TestReportParticipantType.NULL, 24368 new TestReport.TestReportParticipantTypeEnumFactory())); 24369 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("uri")) { 24370 res.setUriElement(parseUri(xpp)); 24371 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 24372 res.setDisplayElement(parseString(xpp)); 24373 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24374 return false; 24375 return true; 24376 } 24377 24378 protected TestReport.TestReportSetupComponent parseTestReportTestReportSetupComponent(XmlPullParser xpp, 24379 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24380 TestReport.TestReportSetupComponent res = new TestReport.TestReportSetupComponent(); 24381 parseBackboneAttributes(xpp, res); 24382 next(xpp); 24383 int eventType = nextNoWhitespace(xpp); 24384 while (eventType != XmlPullParser.END_TAG) { 24385 if (!parseTestReportTestReportSetupComponentContent(eventType, xpp, owner, res)) 24386 unknownContent(xpp); 24387 eventType = nextNoWhitespace(xpp); 24388 } 24389 next(xpp); 24390 parseElementClose(res); 24391 return res; 24392 } 24393 24394 protected boolean parseTestReportTestReportSetupComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24395 TestReport.TestReportSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24396 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 24397 res.getAction().add(parseTestReportSetupActionComponent(xpp, owner)); 24398 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24399 return false; 24400 return true; 24401 } 24402 24403 protected TestReport.SetupActionComponent parseTestReportSetupActionComponent(XmlPullParser xpp, TestReport owner) 24404 throws XmlPullParserException, IOException, FHIRFormatError { 24405 TestReport.SetupActionComponent res = new TestReport.SetupActionComponent(); 24406 parseBackboneAttributes(xpp, res); 24407 next(xpp); 24408 int eventType = nextNoWhitespace(xpp); 24409 while (eventType != XmlPullParser.END_TAG) { 24410 if (!parseTestReportSetupActionComponentContent(eventType, xpp, owner, res)) 24411 unknownContent(xpp); 24412 eventType = nextNoWhitespace(xpp); 24413 } 24414 next(xpp); 24415 parseElementClose(res); 24416 return res; 24417 } 24418 24419 protected boolean parseTestReportSetupActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24420 TestReport.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24421 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 24422 res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); 24423 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { 24424 res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); 24425 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24426 return false; 24427 return true; 24428 } 24429 24430 protected TestReport.SetupActionOperationComponent parseTestReportSetupActionOperationComponent(XmlPullParser xpp, 24431 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24432 TestReport.SetupActionOperationComponent res = new TestReport.SetupActionOperationComponent(); 24433 parseBackboneAttributes(xpp, res); 24434 next(xpp); 24435 int eventType = nextNoWhitespace(xpp); 24436 while (eventType != XmlPullParser.END_TAG) { 24437 if (!parseTestReportSetupActionOperationComponentContent(eventType, xpp, owner, res)) 24438 unknownContent(xpp); 24439 eventType = nextNoWhitespace(xpp); 24440 } 24441 next(xpp); 24442 parseElementClose(res); 24443 return res; 24444 } 24445 24446 protected boolean parseTestReportSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, 24447 TestReport owner, TestReport.SetupActionOperationComponent res) 24448 throws XmlPullParserException, IOException, FHIRFormatError { 24449 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { 24450 res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, 24451 new TestReport.TestReportActionResultEnumFactory())); 24452 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { 24453 res.setMessageElement(parseMarkdown(xpp)); 24454 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 24455 res.setDetailElement(parseUri(xpp)); 24456 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24457 return false; 24458 return true; 24459 } 24460 24461 protected TestReport.SetupActionAssertComponent parseTestReportSetupActionAssertComponent(XmlPullParser xpp, 24462 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24463 TestReport.SetupActionAssertComponent res = new TestReport.SetupActionAssertComponent(); 24464 parseBackboneAttributes(xpp, res); 24465 next(xpp); 24466 int eventType = nextNoWhitespace(xpp); 24467 while (eventType != XmlPullParser.END_TAG) { 24468 if (!parseTestReportSetupActionAssertComponentContent(eventType, xpp, owner, res)) 24469 unknownContent(xpp); 24470 eventType = nextNoWhitespace(xpp); 24471 } 24472 next(xpp); 24473 parseElementClose(res); 24474 return res; 24475 } 24476 24477 protected boolean parseTestReportSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24478 TestReport.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24479 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("result")) { 24480 res.setResultElement(parseEnumeration(xpp, TestReport.TestReportActionResult.NULL, 24481 new TestReport.TestReportActionResultEnumFactory())); 24482 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("message")) { 24483 res.setMessageElement(parseMarkdown(xpp)); 24484 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("detail")) { 24485 res.setDetailElement(parseString(xpp)); 24486 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24487 return false; 24488 return true; 24489 } 24490 24491 protected TestReport.TestReportTestComponent parseTestReportTestReportTestComponent(XmlPullParser xpp, 24492 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24493 TestReport.TestReportTestComponent res = new TestReport.TestReportTestComponent(); 24494 parseBackboneAttributes(xpp, res); 24495 next(xpp); 24496 int eventType = nextNoWhitespace(xpp); 24497 while (eventType != XmlPullParser.END_TAG) { 24498 if (!parseTestReportTestReportTestComponentContent(eventType, xpp, owner, res)) 24499 unknownContent(xpp); 24500 eventType = nextNoWhitespace(xpp); 24501 } 24502 next(xpp); 24503 parseElementClose(res); 24504 return res; 24505 } 24506 24507 protected boolean parseTestReportTestReportTestComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24508 TestReport.TestReportTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24509 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24510 res.setNameElement(parseString(xpp)); 24511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24512 res.setDescriptionElement(parseString(xpp)); 24513 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 24514 res.getAction().add(parseTestReportTestActionComponent(xpp, owner)); 24515 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24516 return false; 24517 return true; 24518 } 24519 24520 protected TestReport.TestActionComponent parseTestReportTestActionComponent(XmlPullParser xpp, TestReport owner) 24521 throws XmlPullParserException, IOException, FHIRFormatError { 24522 TestReport.TestActionComponent res = new TestReport.TestActionComponent(); 24523 parseBackboneAttributes(xpp, res); 24524 next(xpp); 24525 int eventType = nextNoWhitespace(xpp); 24526 while (eventType != XmlPullParser.END_TAG) { 24527 if (!parseTestReportTestActionComponentContent(eventType, xpp, owner, res)) 24528 unknownContent(xpp); 24529 eventType = nextNoWhitespace(xpp); 24530 } 24531 next(xpp); 24532 parseElementClose(res); 24533 return res; 24534 } 24535 24536 protected boolean parseTestReportTestActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24537 TestReport.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24538 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 24539 res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); 24540 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { 24541 res.setAssert(parseTestReportSetupActionAssertComponent(xpp, owner)); 24542 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24543 return false; 24544 return true; 24545 } 24546 24547 protected TestReport.TestReportTeardownComponent parseTestReportTestReportTeardownComponent(XmlPullParser xpp, 24548 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24549 TestReport.TestReportTeardownComponent res = new TestReport.TestReportTeardownComponent(); 24550 parseBackboneAttributes(xpp, res); 24551 next(xpp); 24552 int eventType = nextNoWhitespace(xpp); 24553 while (eventType != XmlPullParser.END_TAG) { 24554 if (!parseTestReportTestReportTeardownComponentContent(eventType, xpp, owner, res)) 24555 unknownContent(xpp); 24556 eventType = nextNoWhitespace(xpp); 24557 } 24558 next(xpp); 24559 parseElementClose(res); 24560 return res; 24561 } 24562 24563 protected boolean parseTestReportTestReportTeardownComponentContent(int eventType, XmlPullParser xpp, 24564 TestReport owner, TestReport.TestReportTeardownComponent res) 24565 throws XmlPullParserException, IOException, FHIRFormatError { 24566 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 24567 res.getAction().add(parseTestReportTeardownActionComponent(xpp, owner)); 24568 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24569 return false; 24570 return true; 24571 } 24572 24573 protected TestReport.TeardownActionComponent parseTestReportTeardownActionComponent(XmlPullParser xpp, 24574 TestReport owner) throws XmlPullParserException, IOException, FHIRFormatError { 24575 TestReport.TeardownActionComponent res = new TestReport.TeardownActionComponent(); 24576 parseBackboneAttributes(xpp, res); 24577 next(xpp); 24578 int eventType = nextNoWhitespace(xpp); 24579 while (eventType != XmlPullParser.END_TAG) { 24580 if (!parseTestReportTeardownActionComponentContent(eventType, xpp, owner, res)) 24581 unknownContent(xpp); 24582 eventType = nextNoWhitespace(xpp); 24583 } 24584 next(xpp); 24585 parseElementClose(res); 24586 return res; 24587 } 24588 24589 protected boolean parseTestReportTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestReport owner, 24590 TestReport.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24591 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 24592 res.setOperation(parseTestReportSetupActionOperationComponent(xpp, owner)); 24593 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24594 return false; 24595 return true; 24596 } 24597 24598 protected TestScript parseTestScript(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 24599 TestScript res = new TestScript(); 24600 parseDomainResourceAttributes(xpp, res); 24601 next(xpp); 24602 int eventType = nextNoWhitespace(xpp); 24603 while (eventType != XmlPullParser.END_TAG) { 24604 if (!parseTestScriptContent(eventType, xpp, res)) 24605 unknownContent(xpp); 24606 eventType = nextNoWhitespace(xpp); 24607 } 24608 next(xpp); 24609 parseElementClose(res); 24610 return res; 24611 } 24612 24613 protected boolean parseTestScriptContent(int eventType, XmlPullParser xpp, TestScript res) 24614 throws XmlPullParserException, IOException, FHIRFormatError { 24615 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 24616 res.setUrlElement(parseUri(xpp)); 24617 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 24618 res.setIdentifier(parseIdentifier(xpp)); 24619 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 24620 res.setVersionElement(parseString(xpp)); 24621 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24622 res.setNameElement(parseString(xpp)); 24623 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 24624 res.setTitleElement(parseString(xpp)); 24625 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 24626 res.setStatusElement( 24627 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 24628 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 24629 res.setExperimentalElement(parseBoolean(xpp)); 24630 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 24631 res.setDateElement(parseDateTime(xpp)); 24632 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 24633 res.setPublisherElement(parseString(xpp)); 24634 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 24635 res.getContact().add(parseContactDetail(xpp)); 24636 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24637 res.setDescriptionElement(parseMarkdown(xpp)); 24638 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 24639 res.getUseContext().add(parseUsageContext(xpp)); 24640 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 24641 res.getJurisdiction().add(parseCodeableConcept(xpp)); 24642 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 24643 res.setPurposeElement(parseMarkdown(xpp)); 24644 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 24645 res.setCopyrightElement(parseMarkdown(xpp)); 24646 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { 24647 res.getOrigin().add(parseTestScriptTestScriptOriginComponent(xpp, res)); 24648 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 24649 res.getDestination().add(parseTestScriptTestScriptDestinationComponent(xpp, res)); 24650 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("metadata")) { 24651 res.setMetadata(parseTestScriptTestScriptMetadataComponent(xpp, res)); 24652 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("fixture")) { 24653 res.getFixture().add(parseTestScriptTestScriptFixtureComponent(xpp, res)); 24654 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 24655 res.getProfile().add(parseReference(xpp)); 24656 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("variable")) { 24657 res.getVariable().add(parseTestScriptTestScriptVariableComponent(xpp, res)); 24658 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("setup")) { 24659 res.setSetup(parseTestScriptTestScriptSetupComponent(xpp, res)); 24660 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("test")) { 24661 res.getTest().add(parseTestScriptTestScriptTestComponent(xpp, res)); 24662 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("teardown")) { 24663 res.setTeardown(parseTestScriptTestScriptTeardownComponent(xpp, res)); 24664 } else if (!parseDomainResourceContent(eventType, xpp, res)) 24665 return false; 24666 return true; 24667 } 24668 24669 protected TestScript.TestScriptOriginComponent parseTestScriptTestScriptOriginComponent(XmlPullParser xpp, 24670 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24671 TestScript.TestScriptOriginComponent res = new TestScript.TestScriptOriginComponent(); 24672 parseBackboneAttributes(xpp, res); 24673 next(xpp); 24674 int eventType = nextNoWhitespace(xpp); 24675 while (eventType != XmlPullParser.END_TAG) { 24676 if (!parseTestScriptTestScriptOriginComponentContent(eventType, xpp, owner, res)) 24677 unknownContent(xpp); 24678 eventType = nextNoWhitespace(xpp); 24679 } 24680 next(xpp); 24681 parseElementClose(res); 24682 return res; 24683 } 24684 24685 protected boolean parseTestScriptTestScriptOriginComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 24686 TestScript.TestScriptOriginComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24687 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { 24688 res.setIndexElement(parseInteger(xpp)); 24689 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 24690 res.setProfile(parseCoding(xpp)); 24691 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24692 return false; 24693 return true; 24694 } 24695 24696 protected TestScript.TestScriptDestinationComponent parseTestScriptTestScriptDestinationComponent(XmlPullParser xpp, 24697 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24698 TestScript.TestScriptDestinationComponent res = new TestScript.TestScriptDestinationComponent(); 24699 parseBackboneAttributes(xpp, res); 24700 next(xpp); 24701 int eventType = nextNoWhitespace(xpp); 24702 while (eventType != XmlPullParser.END_TAG) { 24703 if (!parseTestScriptTestScriptDestinationComponentContent(eventType, xpp, owner, res)) 24704 unknownContent(xpp); 24705 eventType = nextNoWhitespace(xpp); 24706 } 24707 next(xpp); 24708 parseElementClose(res); 24709 return res; 24710 } 24711 24712 protected boolean parseTestScriptTestScriptDestinationComponentContent(int eventType, XmlPullParser xpp, 24713 TestScript owner, TestScript.TestScriptDestinationComponent res) 24714 throws XmlPullParserException, IOException, FHIRFormatError { 24715 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("index")) { 24716 res.setIndexElement(parseInteger(xpp)); 24717 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("profile")) { 24718 res.setProfile(parseCoding(xpp)); 24719 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24720 return false; 24721 return true; 24722 } 24723 24724 protected TestScript.TestScriptMetadataComponent parseTestScriptTestScriptMetadataComponent(XmlPullParser xpp, 24725 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24726 TestScript.TestScriptMetadataComponent res = new TestScript.TestScriptMetadataComponent(); 24727 parseBackboneAttributes(xpp, res); 24728 next(xpp); 24729 int eventType = nextNoWhitespace(xpp); 24730 while (eventType != XmlPullParser.END_TAG) { 24731 if (!parseTestScriptTestScriptMetadataComponentContent(eventType, xpp, owner, res)) 24732 unknownContent(xpp); 24733 eventType = nextNoWhitespace(xpp); 24734 } 24735 next(xpp); 24736 parseElementClose(res); 24737 return res; 24738 } 24739 24740 protected boolean parseTestScriptTestScriptMetadataComponentContent(int eventType, XmlPullParser xpp, 24741 TestScript owner, TestScript.TestScriptMetadataComponent res) 24742 throws XmlPullParserException, IOException, FHIRFormatError { 24743 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 24744 res.getLink().add(parseTestScriptTestScriptMetadataLinkComponent(xpp, owner)); 24745 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capability")) { 24746 res.getCapability().add(parseTestScriptTestScriptMetadataCapabilityComponent(xpp, owner)); 24747 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24748 return false; 24749 return true; 24750 } 24751 24752 protected TestScript.TestScriptMetadataLinkComponent parseTestScriptTestScriptMetadataLinkComponent(XmlPullParser xpp, 24753 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24754 TestScript.TestScriptMetadataLinkComponent res = new TestScript.TestScriptMetadataLinkComponent(); 24755 parseBackboneAttributes(xpp, res); 24756 next(xpp); 24757 int eventType = nextNoWhitespace(xpp); 24758 while (eventType != XmlPullParser.END_TAG) { 24759 if (!parseTestScriptTestScriptMetadataLinkComponentContent(eventType, xpp, owner, res)) 24760 unknownContent(xpp); 24761 eventType = nextNoWhitespace(xpp); 24762 } 24763 next(xpp); 24764 parseElementClose(res); 24765 return res; 24766 } 24767 24768 protected boolean parseTestScriptTestScriptMetadataLinkComponentContent(int eventType, XmlPullParser xpp, 24769 TestScript owner, TestScript.TestScriptMetadataLinkComponent res) 24770 throws XmlPullParserException, IOException, FHIRFormatError { 24771 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 24772 res.setUrlElement(parseUri(xpp)); 24773 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24774 res.setDescriptionElement(parseString(xpp)); 24775 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24776 return false; 24777 return true; 24778 } 24779 24780 protected TestScript.TestScriptMetadataCapabilityComponent parseTestScriptTestScriptMetadataCapabilityComponent( 24781 XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24782 TestScript.TestScriptMetadataCapabilityComponent res = new TestScript.TestScriptMetadataCapabilityComponent(); 24783 parseBackboneAttributes(xpp, res); 24784 next(xpp); 24785 int eventType = nextNoWhitespace(xpp); 24786 while (eventType != XmlPullParser.END_TAG) { 24787 if (!parseTestScriptTestScriptMetadataCapabilityComponentContent(eventType, xpp, owner, res)) 24788 unknownContent(xpp); 24789 eventType = nextNoWhitespace(xpp); 24790 } 24791 next(xpp); 24792 parseElementClose(res); 24793 return res; 24794 } 24795 24796 protected boolean parseTestScriptTestScriptMetadataCapabilityComponentContent(int eventType, XmlPullParser xpp, 24797 TestScript owner, TestScript.TestScriptMetadataCapabilityComponent res) 24798 throws XmlPullParserException, IOException, FHIRFormatError { 24799 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("required")) { 24800 res.setRequiredElement(parseBoolean(xpp)); 24801 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validated")) { 24802 res.setValidatedElement(parseBoolean(xpp)); 24803 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24804 res.setDescriptionElement(parseString(xpp)); 24805 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { 24806 res.getOrigin().add(parseInteger(xpp)); 24807 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 24808 res.setDestinationElement(parseInteger(xpp)); 24809 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("link")) { 24810 res.getLink().add(parseUri(xpp)); 24811 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("capabilities")) { 24812 res.setCapabilitiesElement(parseCanonical(xpp)); 24813 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24814 return false; 24815 return true; 24816 } 24817 24818 protected TestScript.TestScriptFixtureComponent parseTestScriptTestScriptFixtureComponent(XmlPullParser xpp, 24819 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24820 TestScript.TestScriptFixtureComponent res = new TestScript.TestScriptFixtureComponent(); 24821 parseBackboneAttributes(xpp, res); 24822 next(xpp); 24823 int eventType = nextNoWhitespace(xpp); 24824 while (eventType != XmlPullParser.END_TAG) { 24825 if (!parseTestScriptTestScriptFixtureComponentContent(eventType, xpp, owner, res)) 24826 unknownContent(xpp); 24827 eventType = nextNoWhitespace(xpp); 24828 } 24829 next(xpp); 24830 parseElementClose(res); 24831 return res; 24832 } 24833 24834 protected boolean parseTestScriptTestScriptFixtureComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 24835 TestScript.TestScriptFixtureComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24836 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autocreate")) { 24837 res.setAutocreateElement(parseBoolean(xpp)); 24838 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("autodelete")) { 24839 res.setAutodeleteElement(parseBoolean(xpp)); 24840 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 24841 res.setResource(parseReference(xpp)); 24842 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24843 return false; 24844 return true; 24845 } 24846 24847 protected TestScript.TestScriptVariableComponent parseTestScriptTestScriptVariableComponent(XmlPullParser xpp, 24848 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24849 TestScript.TestScriptVariableComponent res = new TestScript.TestScriptVariableComponent(); 24850 parseBackboneAttributes(xpp, res); 24851 next(xpp); 24852 int eventType = nextNoWhitespace(xpp); 24853 while (eventType != XmlPullParser.END_TAG) { 24854 if (!parseTestScriptTestScriptVariableComponentContent(eventType, xpp, owner, res)) 24855 unknownContent(xpp); 24856 eventType = nextNoWhitespace(xpp); 24857 } 24858 next(xpp); 24859 parseElementClose(res); 24860 return res; 24861 } 24862 24863 protected boolean parseTestScriptTestScriptVariableComponentContent(int eventType, XmlPullParser xpp, 24864 TestScript owner, TestScript.TestScriptVariableComponent res) 24865 throws XmlPullParserException, IOException, FHIRFormatError { 24866 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 24867 res.setNameElement(parseString(xpp)); 24868 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("defaultValue")) { 24869 res.setDefaultValueElement(parseString(xpp)); 24870 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24871 res.setDescriptionElement(parseString(xpp)); 24872 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 24873 res.setExpressionElement(parseString(xpp)); 24874 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { 24875 res.setHeaderFieldElement(parseString(xpp)); 24876 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("hint")) { 24877 res.setHintElement(parseString(xpp)); 24878 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 24879 res.setPathElement(parseString(xpp)); 24880 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { 24881 res.setSourceIdElement(parseId(xpp)); 24882 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24883 return false; 24884 return true; 24885 } 24886 24887 protected TestScript.TestScriptSetupComponent parseTestScriptTestScriptSetupComponent(XmlPullParser xpp, 24888 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24889 TestScript.TestScriptSetupComponent res = new TestScript.TestScriptSetupComponent(); 24890 parseBackboneAttributes(xpp, res); 24891 next(xpp); 24892 int eventType = nextNoWhitespace(xpp); 24893 while (eventType != XmlPullParser.END_TAG) { 24894 if (!parseTestScriptTestScriptSetupComponentContent(eventType, xpp, owner, res)) 24895 unknownContent(xpp); 24896 eventType = nextNoWhitespace(xpp); 24897 } 24898 next(xpp); 24899 parseElementClose(res); 24900 return res; 24901 } 24902 24903 protected boolean parseTestScriptTestScriptSetupComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 24904 TestScript.TestScriptSetupComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24905 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 24906 res.getAction().add(parseTestScriptSetupActionComponent(xpp, owner)); 24907 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24908 return false; 24909 return true; 24910 } 24911 24912 protected TestScript.SetupActionComponent parseTestScriptSetupActionComponent(XmlPullParser xpp, TestScript owner) 24913 throws XmlPullParserException, IOException, FHIRFormatError { 24914 TestScript.SetupActionComponent res = new TestScript.SetupActionComponent(); 24915 parseBackboneAttributes(xpp, res); 24916 next(xpp); 24917 int eventType = nextNoWhitespace(xpp); 24918 while (eventType != XmlPullParser.END_TAG) { 24919 if (!parseTestScriptSetupActionComponentContent(eventType, xpp, owner, res)) 24920 unknownContent(xpp); 24921 eventType = nextNoWhitespace(xpp); 24922 } 24923 next(xpp); 24924 parseElementClose(res); 24925 return res; 24926 } 24927 24928 protected boolean parseTestScriptSetupActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 24929 TestScript.SetupActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 24930 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 24931 res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); 24932 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { 24933 res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); 24934 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24935 return false; 24936 return true; 24937 } 24938 24939 protected TestScript.SetupActionOperationComponent parseTestScriptSetupActionOperationComponent(XmlPullParser xpp, 24940 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 24941 TestScript.SetupActionOperationComponent res = new TestScript.SetupActionOperationComponent(); 24942 parseBackboneAttributes(xpp, res); 24943 next(xpp); 24944 int eventType = nextNoWhitespace(xpp); 24945 while (eventType != XmlPullParser.END_TAG) { 24946 if (!parseTestScriptSetupActionOperationComponentContent(eventType, xpp, owner, res)) 24947 unknownContent(xpp); 24948 eventType = nextNoWhitespace(xpp); 24949 } 24950 next(xpp); 24951 parseElementClose(res); 24952 return res; 24953 } 24954 24955 protected boolean parseTestScriptSetupActionOperationComponentContent(int eventType, XmlPullParser xpp, 24956 TestScript owner, TestScript.SetupActionOperationComponent res) 24957 throws XmlPullParserException, IOException, FHIRFormatError { 24958 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 24959 res.setType(parseCoding(xpp)); 24960 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 24961 res.setResourceElement(parseCode(xpp)); 24962 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { 24963 res.setLabelElement(parseString(xpp)); 24964 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 24965 res.setDescriptionElement(parseString(xpp)); 24966 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("accept")) { 24967 res.setAcceptElement(parseCode(xpp)); 24968 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { 24969 res.setContentTypeElement(parseCode(xpp)); 24970 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("destination")) { 24971 res.setDestinationElement(parseInteger(xpp)); 24972 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encodeRequestUrl")) { 24973 res.setEncodeRequestUrlElement(parseBoolean(xpp)); 24974 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("method")) { 24975 res.setMethodElement(parseEnumeration(xpp, TestScript.TestScriptRequestMethodCode.NULL, 24976 new TestScript.TestScriptRequestMethodCodeEnumFactory())); 24977 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("origin")) { 24978 res.setOriginElement(parseInteger(xpp)); 24979 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("params")) { 24980 res.setParamsElement(parseString(xpp)); 24981 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestHeader")) { 24982 res.getRequestHeader().add(parseTestScriptSetupActionOperationRequestHeaderComponent(xpp, owner)); 24983 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestId")) { 24984 res.setRequestIdElement(parseId(xpp)); 24985 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseId")) { 24986 res.setResponseIdElement(parseId(xpp)); 24987 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { 24988 res.setSourceIdElement(parseId(xpp)); 24989 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetId")) { 24990 res.setTargetIdElement(parseId(xpp)); 24991 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 24992 res.setUrlElement(parseString(xpp)); 24993 } else if (!parseBackboneElementContent(eventType, xpp, res)) 24994 return false; 24995 return true; 24996 } 24997 24998 protected TestScript.SetupActionOperationRequestHeaderComponent parseTestScriptSetupActionOperationRequestHeaderComponent( 24999 XmlPullParser xpp, TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 25000 TestScript.SetupActionOperationRequestHeaderComponent res = new TestScript.SetupActionOperationRequestHeaderComponent(); 25001 parseBackboneAttributes(xpp, res); 25002 next(xpp); 25003 int eventType = nextNoWhitespace(xpp); 25004 while (eventType != XmlPullParser.END_TAG) { 25005 if (!parseTestScriptSetupActionOperationRequestHeaderComponentContent(eventType, xpp, owner, res)) 25006 unknownContent(xpp); 25007 eventType = nextNoWhitespace(xpp); 25008 } 25009 next(xpp); 25010 parseElementClose(res); 25011 return res; 25012 } 25013 25014 protected boolean parseTestScriptSetupActionOperationRequestHeaderComponentContent(int eventType, XmlPullParser xpp, 25015 TestScript owner, TestScript.SetupActionOperationRequestHeaderComponent res) 25016 throws XmlPullParserException, IOException, FHIRFormatError { 25017 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("field")) { 25018 res.setFieldElement(parseString(xpp)); 25019 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 25020 res.setValueElement(parseString(xpp)); 25021 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25022 return false; 25023 return true; 25024 } 25025 25026 protected TestScript.SetupActionAssertComponent parseTestScriptSetupActionAssertComponent(XmlPullParser xpp, 25027 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 25028 TestScript.SetupActionAssertComponent res = new TestScript.SetupActionAssertComponent(); 25029 parseBackboneAttributes(xpp, res); 25030 next(xpp); 25031 int eventType = nextNoWhitespace(xpp); 25032 while (eventType != XmlPullParser.END_TAG) { 25033 if (!parseTestScriptSetupActionAssertComponentContent(eventType, xpp, owner, res)) 25034 unknownContent(xpp); 25035 eventType = nextNoWhitespace(xpp); 25036 } 25037 next(xpp); 25038 parseElementClose(res); 25039 return res; 25040 } 25041 25042 protected boolean parseTestScriptSetupActionAssertComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 25043 TestScript.SetupActionAssertComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25044 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("label")) { 25045 res.setLabelElement(parseString(xpp)); 25046 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 25047 res.setDescriptionElement(parseString(xpp)); 25048 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("direction")) { 25049 res.setDirectionElement(parseEnumeration(xpp, TestScript.AssertionDirectionType.NULL, 25050 new TestScript.AssertionDirectionTypeEnumFactory())); 25051 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceId")) { 25052 res.setCompareToSourceIdElement(parseString(xpp)); 25053 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourceExpression")) { 25054 res.setCompareToSourceExpressionElement(parseString(xpp)); 25055 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compareToSourcePath")) { 25056 res.setCompareToSourcePathElement(parseString(xpp)); 25057 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contentType")) { 25058 res.setContentTypeElement(parseCode(xpp)); 25059 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expression")) { 25060 res.setExpressionElement(parseString(xpp)); 25061 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("headerField")) { 25062 res.setHeaderFieldElement(parseString(xpp)); 25063 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("minimumId")) { 25064 res.setMinimumIdElement(parseString(xpp)); 25065 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("navigationLinks")) { 25066 res.setNavigationLinksElement(parseBoolean(xpp)); 25067 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operator")) { 25068 res.setOperatorElement(parseEnumeration(xpp, TestScript.AssertionOperatorType.NULL, 25069 new TestScript.AssertionOperatorTypeEnumFactory())); 25070 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("path")) { 25071 res.setPathElement(parseString(xpp)); 25072 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestMethod")) { 25073 res.setRequestMethodElement(parseEnumeration(xpp, TestScript.TestScriptRequestMethodCode.NULL, 25074 new TestScript.TestScriptRequestMethodCodeEnumFactory())); 25075 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("requestURL")) { 25076 res.setRequestURLElement(parseString(xpp)); 25077 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("resource")) { 25078 res.setResourceElement(parseCode(xpp)); 25079 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("response")) { 25080 res.setResponseElement(parseEnumeration(xpp, TestScript.AssertionResponseTypes.NULL, 25081 new TestScript.AssertionResponseTypesEnumFactory())); 25082 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("responseCode")) { 25083 res.setResponseCodeElement(parseString(xpp)); 25084 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceId")) { 25085 res.setSourceIdElement(parseId(xpp)); 25086 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validateProfileId")) { 25087 res.setValidateProfileIdElement(parseId(xpp)); 25088 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 25089 res.setValueElement(parseString(xpp)); 25090 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("warningOnly")) { 25091 res.setWarningOnlyElement(parseBoolean(xpp)); 25092 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25093 return false; 25094 return true; 25095 } 25096 25097 protected TestScript.TestScriptTestComponent parseTestScriptTestScriptTestComponent(XmlPullParser xpp, 25098 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 25099 TestScript.TestScriptTestComponent res = new TestScript.TestScriptTestComponent(); 25100 parseBackboneAttributes(xpp, res); 25101 next(xpp); 25102 int eventType = nextNoWhitespace(xpp); 25103 while (eventType != XmlPullParser.END_TAG) { 25104 if (!parseTestScriptTestScriptTestComponentContent(eventType, xpp, owner, res)) 25105 unknownContent(xpp); 25106 eventType = nextNoWhitespace(xpp); 25107 } 25108 next(xpp); 25109 parseElementClose(res); 25110 return res; 25111 } 25112 25113 protected boolean parseTestScriptTestScriptTestComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 25114 TestScript.TestScriptTestComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25115 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 25116 res.setNameElement(parseString(xpp)); 25117 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 25118 res.setDescriptionElement(parseString(xpp)); 25119 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 25120 res.getAction().add(parseTestScriptTestActionComponent(xpp, owner)); 25121 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25122 return false; 25123 return true; 25124 } 25125 25126 protected TestScript.TestActionComponent parseTestScriptTestActionComponent(XmlPullParser xpp, TestScript owner) 25127 throws XmlPullParserException, IOException, FHIRFormatError { 25128 TestScript.TestActionComponent res = new TestScript.TestActionComponent(); 25129 parseBackboneAttributes(xpp, res); 25130 next(xpp); 25131 int eventType = nextNoWhitespace(xpp); 25132 while (eventType != XmlPullParser.END_TAG) { 25133 if (!parseTestScriptTestActionComponentContent(eventType, xpp, owner, res)) 25134 unknownContent(xpp); 25135 eventType = nextNoWhitespace(xpp); 25136 } 25137 next(xpp); 25138 parseElementClose(res); 25139 return res; 25140 } 25141 25142 protected boolean parseTestScriptTestActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 25143 TestScript.TestActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25144 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 25145 res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); 25146 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("assert")) { 25147 res.setAssert(parseTestScriptSetupActionAssertComponent(xpp, owner)); 25148 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25149 return false; 25150 return true; 25151 } 25152 25153 protected TestScript.TestScriptTeardownComponent parseTestScriptTestScriptTeardownComponent(XmlPullParser xpp, 25154 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 25155 TestScript.TestScriptTeardownComponent res = new TestScript.TestScriptTeardownComponent(); 25156 parseBackboneAttributes(xpp, res); 25157 next(xpp); 25158 int eventType = nextNoWhitespace(xpp); 25159 while (eventType != XmlPullParser.END_TAG) { 25160 if (!parseTestScriptTestScriptTeardownComponentContent(eventType, xpp, owner, res)) 25161 unknownContent(xpp); 25162 eventType = nextNoWhitespace(xpp); 25163 } 25164 next(xpp); 25165 parseElementClose(res); 25166 return res; 25167 } 25168 25169 protected boolean parseTestScriptTestScriptTeardownComponentContent(int eventType, XmlPullParser xpp, 25170 TestScript owner, TestScript.TestScriptTeardownComponent res) 25171 throws XmlPullParserException, IOException, FHIRFormatError { 25172 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("action")) { 25173 res.getAction().add(parseTestScriptTeardownActionComponent(xpp, owner)); 25174 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25175 return false; 25176 return true; 25177 } 25178 25179 protected TestScript.TeardownActionComponent parseTestScriptTeardownActionComponent(XmlPullParser xpp, 25180 TestScript owner) throws XmlPullParserException, IOException, FHIRFormatError { 25181 TestScript.TeardownActionComponent res = new TestScript.TeardownActionComponent(); 25182 parseBackboneAttributes(xpp, res); 25183 next(xpp); 25184 int eventType = nextNoWhitespace(xpp); 25185 while (eventType != XmlPullParser.END_TAG) { 25186 if (!parseTestScriptTeardownActionComponentContent(eventType, xpp, owner, res)) 25187 unknownContent(xpp); 25188 eventType = nextNoWhitespace(xpp); 25189 } 25190 next(xpp); 25191 parseElementClose(res); 25192 return res; 25193 } 25194 25195 protected boolean parseTestScriptTeardownActionComponentContent(int eventType, XmlPullParser xpp, TestScript owner, 25196 TestScript.TeardownActionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25197 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("operation")) { 25198 res.setOperation(parseTestScriptSetupActionOperationComponent(xpp, owner)); 25199 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25200 return false; 25201 return true; 25202 } 25203 25204 protected ValueSet parseValueSet(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 25205 ValueSet res = new ValueSet(); 25206 parseDomainResourceAttributes(xpp, res); 25207 next(xpp); 25208 int eventType = nextNoWhitespace(xpp); 25209 while (eventType != XmlPullParser.END_TAG) { 25210 if (!parseValueSetContent(eventType, xpp, res)) 25211 unknownContent(xpp); 25212 eventType = nextNoWhitespace(xpp); 25213 } 25214 next(xpp); 25215 parseElementClose(res); 25216 return res; 25217 } 25218 25219 protected boolean parseValueSetContent(int eventType, XmlPullParser xpp, ValueSet res) 25220 throws XmlPullParserException, IOException, FHIRFormatError { 25221 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("url")) { 25222 res.setUrlElement(parseUri(xpp)); 25223 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 25224 res.getIdentifier().add(parseIdentifier(xpp)); 25225 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 25226 res.setVersionElement(parseString(xpp)); 25227 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 25228 res.setNameElement(parseString(xpp)); 25229 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("title")) { 25230 res.setTitleElement(parseString(xpp)); 25231 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 25232 res.setStatusElement( 25233 parseEnumeration(xpp, Enumerations.PublicationStatus.NULL, new Enumerations.PublicationStatusEnumFactory())); 25234 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("experimental")) { 25235 res.setExperimentalElement(parseBoolean(xpp)); 25236 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 25237 res.setDateElement(parseDateTime(xpp)); 25238 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("publisher")) { 25239 res.setPublisherElement(parseString(xpp)); 25240 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contact")) { 25241 res.getContact().add(parseContactDetail(xpp)); 25242 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("description")) { 25243 res.setDescriptionElement(parseMarkdown(xpp)); 25244 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("useContext")) { 25245 res.getUseContext().add(parseUsageContext(xpp)); 25246 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("jurisdiction")) { 25247 res.getJurisdiction().add(parseCodeableConcept(xpp)); 25248 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("immutable")) { 25249 res.setImmutableElement(parseBoolean(xpp)); 25250 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("purpose")) { 25251 res.setPurposeElement(parseMarkdown(xpp)); 25252 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("copyright")) { 25253 res.setCopyrightElement(parseMarkdown(xpp)); 25254 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("compose")) { 25255 res.setCompose(parseValueSetValueSetComposeComponent(xpp, res)); 25256 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("expansion")) { 25257 res.setExpansion(parseValueSetValueSetExpansionComponent(xpp, res)); 25258 } else if (!parseDomainResourceContent(eventType, xpp, res)) 25259 return false; 25260 return true; 25261 } 25262 25263 protected ValueSet.ValueSetComposeComponent parseValueSetValueSetComposeComponent(XmlPullParser xpp, ValueSet owner) 25264 throws XmlPullParserException, IOException, FHIRFormatError { 25265 ValueSet.ValueSetComposeComponent res = new ValueSet.ValueSetComposeComponent(); 25266 parseBackboneAttributes(xpp, res); 25267 next(xpp); 25268 int eventType = nextNoWhitespace(xpp); 25269 while (eventType != XmlPullParser.END_TAG) { 25270 if (!parseValueSetValueSetComposeComponentContent(eventType, xpp, owner, res)) 25271 unknownContent(xpp); 25272 eventType = nextNoWhitespace(xpp); 25273 } 25274 next(xpp); 25275 parseElementClose(res); 25276 return res; 25277 } 25278 25279 protected boolean parseValueSetValueSetComposeComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, 25280 ValueSet.ValueSetComposeComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25281 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lockedDate")) { 25282 res.setLockedDateElement(parseDate(xpp)); 25283 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { 25284 res.setInactiveElement(parseBoolean(xpp)); 25285 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("include")) { 25286 res.getInclude().add(parseValueSetConceptSetComponent(xpp, owner)); 25287 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("exclude")) { 25288 res.getExclude().add(parseValueSetConceptSetComponent(xpp, owner)); 25289 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25290 return false; 25291 return true; 25292 } 25293 25294 protected ValueSet.ConceptSetComponent parseValueSetConceptSetComponent(XmlPullParser xpp, ValueSet owner) 25295 throws XmlPullParserException, IOException, FHIRFormatError { 25296 ValueSet.ConceptSetComponent res = new ValueSet.ConceptSetComponent(); 25297 parseBackboneAttributes(xpp, res); 25298 next(xpp); 25299 int eventType = nextNoWhitespace(xpp); 25300 while (eventType != XmlPullParser.END_TAG) { 25301 if (!parseValueSetConceptSetComponentContent(eventType, xpp, owner, res)) 25302 unknownContent(xpp); 25303 eventType = nextNoWhitespace(xpp); 25304 } 25305 next(xpp); 25306 parseElementClose(res); 25307 return res; 25308 } 25309 25310 protected boolean parseValueSetConceptSetComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, 25311 ValueSet.ConceptSetComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25312 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 25313 res.setSystemElement(parseUri(xpp)); 25314 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 25315 res.setVersionElement(parseString(xpp)); 25316 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("concept")) { 25317 res.getConcept().add(parseValueSetConceptReferenceComponent(xpp, owner)); 25318 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("filter")) { 25319 res.getFilter().add(parseValueSetConceptSetFilterComponent(xpp, owner)); 25320 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("valueSet")) { 25321 res.getValueSet().add(parseCanonical(xpp)); 25322 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25323 return false; 25324 return true; 25325 } 25326 25327 protected ValueSet.ConceptReferenceComponent parseValueSetConceptReferenceComponent(XmlPullParser xpp, ValueSet owner) 25328 throws XmlPullParserException, IOException, FHIRFormatError { 25329 ValueSet.ConceptReferenceComponent res = new ValueSet.ConceptReferenceComponent(); 25330 parseBackboneAttributes(xpp, res); 25331 next(xpp); 25332 int eventType = nextNoWhitespace(xpp); 25333 while (eventType != XmlPullParser.END_TAG) { 25334 if (!parseValueSetConceptReferenceComponentContent(eventType, xpp, owner, res)) 25335 unknownContent(xpp); 25336 eventType = nextNoWhitespace(xpp); 25337 } 25338 next(xpp); 25339 parseElementClose(res); 25340 return res; 25341 } 25342 25343 protected boolean parseValueSetConceptReferenceComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, 25344 ValueSet.ConceptReferenceComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25345 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 25346 res.setCodeElement(parseCode(xpp)); 25347 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 25348 res.setDisplayElement(parseString(xpp)); 25349 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { 25350 res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); 25351 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25352 return false; 25353 return true; 25354 } 25355 25356 protected ValueSet.ConceptReferenceDesignationComponent parseValueSetConceptReferenceDesignationComponent( 25357 XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { 25358 ValueSet.ConceptReferenceDesignationComponent res = new ValueSet.ConceptReferenceDesignationComponent(); 25359 parseBackboneAttributes(xpp, res); 25360 next(xpp); 25361 int eventType = nextNoWhitespace(xpp); 25362 while (eventType != XmlPullParser.END_TAG) { 25363 if (!parseValueSetConceptReferenceDesignationComponentContent(eventType, xpp, owner, res)) 25364 unknownContent(xpp); 25365 eventType = nextNoWhitespace(xpp); 25366 } 25367 next(xpp); 25368 parseElementClose(res); 25369 return res; 25370 } 25371 25372 protected boolean parseValueSetConceptReferenceDesignationComponentContent(int eventType, XmlPullParser xpp, 25373 ValueSet owner, ValueSet.ConceptReferenceDesignationComponent res) 25374 throws XmlPullParserException, IOException, FHIRFormatError { 25375 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("language")) { 25376 res.setLanguageElement(parseCode(xpp)); 25377 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("use")) { 25378 res.setUse(parseCoding(xpp)); 25379 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 25380 res.setValueElement(parseString(xpp)); 25381 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25382 return false; 25383 return true; 25384 } 25385 25386 protected ValueSet.ConceptSetFilterComponent parseValueSetConceptSetFilterComponent(XmlPullParser xpp, ValueSet owner) 25387 throws XmlPullParserException, IOException, FHIRFormatError { 25388 ValueSet.ConceptSetFilterComponent res = new ValueSet.ConceptSetFilterComponent(); 25389 parseBackboneAttributes(xpp, res); 25390 next(xpp); 25391 int eventType = nextNoWhitespace(xpp); 25392 while (eventType != XmlPullParser.END_TAG) { 25393 if (!parseValueSetConceptSetFilterComponentContent(eventType, xpp, owner, res)) 25394 unknownContent(xpp); 25395 eventType = nextNoWhitespace(xpp); 25396 } 25397 next(xpp); 25398 parseElementClose(res); 25399 return res; 25400 } 25401 25402 protected boolean parseValueSetConceptSetFilterComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, 25403 ValueSet.ConceptSetFilterComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25404 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("property")) { 25405 res.setPropertyElement(parseCode(xpp)); 25406 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("op")) { 25407 res.setOpElement(parseEnumeration(xpp, ValueSet.FilterOperator.NULL, new ValueSet.FilterOperatorEnumFactory())); 25408 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("value")) { 25409 res.setValueElement(parseString(xpp)); 25410 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25411 return false; 25412 return true; 25413 } 25414 25415 protected ValueSet.ValueSetExpansionComponent parseValueSetValueSetExpansionComponent(XmlPullParser xpp, 25416 ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { 25417 ValueSet.ValueSetExpansionComponent res = new ValueSet.ValueSetExpansionComponent(); 25418 parseBackboneAttributes(xpp, res); 25419 next(xpp); 25420 int eventType = nextNoWhitespace(xpp); 25421 while (eventType != XmlPullParser.END_TAG) { 25422 if (!parseValueSetValueSetExpansionComponentContent(eventType, xpp, owner, res)) 25423 unknownContent(xpp); 25424 eventType = nextNoWhitespace(xpp); 25425 } 25426 next(xpp); 25427 parseElementClose(res); 25428 return res; 25429 } 25430 25431 protected boolean parseValueSetValueSetExpansionComponentContent(int eventType, XmlPullParser xpp, ValueSet owner, 25432 ValueSet.ValueSetExpansionComponent res) throws XmlPullParserException, IOException, FHIRFormatError { 25433 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 25434 res.setIdentifierElement(parseUri(xpp)); 25435 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("timestamp")) { 25436 res.setTimestampElement(parseDateTime(xpp)); 25437 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("total")) { 25438 res.setTotalElement(parseInteger(xpp)); 25439 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("offset")) { 25440 res.setOffsetElement(parseInteger(xpp)); 25441 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("parameter")) { 25442 res.getParameter().add(parseValueSetValueSetExpansionParameterComponent(xpp, owner)); 25443 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { 25444 res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); 25445 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25446 return false; 25447 return true; 25448 } 25449 25450 protected ValueSet.ValueSetExpansionParameterComponent parseValueSetValueSetExpansionParameterComponent( 25451 XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { 25452 ValueSet.ValueSetExpansionParameterComponent res = new ValueSet.ValueSetExpansionParameterComponent(); 25453 parseBackboneAttributes(xpp, res); 25454 next(xpp); 25455 int eventType = nextNoWhitespace(xpp); 25456 while (eventType != XmlPullParser.END_TAG) { 25457 if (!parseValueSetValueSetExpansionParameterComponentContent(eventType, xpp, owner, res)) 25458 unknownContent(xpp); 25459 eventType = nextNoWhitespace(xpp); 25460 } 25461 next(xpp); 25462 parseElementClose(res); 25463 return res; 25464 } 25465 25466 protected boolean parseValueSetValueSetExpansionParameterComponentContent(int eventType, XmlPullParser xpp, 25467 ValueSet owner, ValueSet.ValueSetExpansionParameterComponent res) 25468 throws XmlPullParserException, IOException, FHIRFormatError { 25469 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("name")) { 25470 res.setNameElement(parseString(xpp)); 25471 } else if (eventType == XmlPullParser.START_TAG && nameIsTypeName(xpp, "value")) { 25472 res.setValue(parseType("value", xpp)); 25473 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25474 return false; 25475 return true; 25476 } 25477 25478 protected ValueSet.ValueSetExpansionContainsComponent parseValueSetValueSetExpansionContainsComponent( 25479 XmlPullParser xpp, ValueSet owner) throws XmlPullParserException, IOException, FHIRFormatError { 25480 ValueSet.ValueSetExpansionContainsComponent res = new ValueSet.ValueSetExpansionContainsComponent(); 25481 parseBackboneAttributes(xpp, res); 25482 next(xpp); 25483 int eventType = nextNoWhitespace(xpp); 25484 while (eventType != XmlPullParser.END_TAG) { 25485 if (!parseValueSetValueSetExpansionContainsComponentContent(eventType, xpp, owner, res)) 25486 unknownContent(xpp); 25487 eventType = nextNoWhitespace(xpp); 25488 } 25489 next(xpp); 25490 parseElementClose(res); 25491 return res; 25492 } 25493 25494 protected boolean parseValueSetValueSetExpansionContainsComponentContent(int eventType, XmlPullParser xpp, 25495 ValueSet owner, ValueSet.ValueSetExpansionContainsComponent res) 25496 throws XmlPullParserException, IOException, FHIRFormatError { 25497 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("system")) { 25498 res.setSystemElement(parseUri(xpp)); 25499 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("abstract")) { 25500 res.setAbstractElement(parseBoolean(xpp)); 25501 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("inactive")) { 25502 res.setInactiveElement(parseBoolean(xpp)); 25503 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("version")) { 25504 res.setVersionElement(parseString(xpp)); 25505 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("code")) { 25506 res.setCodeElement(parseCode(xpp)); 25507 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) { 25508 res.setDisplayElement(parseString(xpp)); 25509 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("designation")) { 25510 res.getDesignation().add(parseValueSetConceptReferenceDesignationComponent(xpp, owner)); 25511 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("contains")) { 25512 res.getContains().add(parseValueSetValueSetExpansionContainsComponent(xpp, owner)); 25513 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25514 return false; 25515 return true; 25516 } 25517 25518 protected VerificationResult parseVerificationResult(XmlPullParser xpp) 25519 throws XmlPullParserException, IOException, FHIRFormatError { 25520 VerificationResult res = new VerificationResult(); 25521 parseDomainResourceAttributes(xpp, res); 25522 next(xpp); 25523 int eventType = nextNoWhitespace(xpp); 25524 while (eventType != XmlPullParser.END_TAG) { 25525 if (!parseVerificationResultContent(eventType, xpp, res)) 25526 unknownContent(xpp); 25527 eventType = nextNoWhitespace(xpp); 25528 } 25529 next(xpp); 25530 parseElementClose(res); 25531 return res; 25532 } 25533 25534 protected boolean parseVerificationResultContent(int eventType, XmlPullParser xpp, VerificationResult res) 25535 throws XmlPullParserException, IOException, FHIRFormatError { 25536 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("target")) { 25537 res.getTarget().add(parseReference(xpp)); 25538 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("targetLocation")) { 25539 res.getTargetLocation().add(parseString(xpp)); 25540 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("need")) { 25541 res.setNeed(parseCodeableConcept(xpp)); 25542 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 25543 res.setStatusElement( 25544 parseEnumeration(xpp, VerificationResult.Status.NULL, new VerificationResult.StatusEnumFactory())); 25545 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("statusDate")) { 25546 res.setStatusDateElement(parseDateTime(xpp)); 25547 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validationType")) { 25548 res.setValidationType(parseCodeableConcept(xpp)); 25549 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validationProcess")) { 25550 res.getValidationProcess().add(parseCodeableConcept(xpp)); 25551 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("frequency")) { 25552 res.setFrequency(parseTiming(xpp)); 25553 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lastPerformed")) { 25554 res.setLastPerformedElement(parseDateTime(xpp)); 25555 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("nextScheduled")) { 25556 res.setNextScheduledElement(parseDate(xpp)); 25557 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("failureAction")) { 25558 res.setFailureAction(parseCodeableConcept(xpp)); 25559 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("primarySource")) { 25560 res.getPrimarySource().add(parseVerificationResultVerificationResultPrimarySourceComponent(xpp, res)); 25561 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attestation")) { 25562 res.setAttestation(parseVerificationResultVerificationResultAttestationComponent(xpp, res)); 25563 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validator")) { 25564 res.getValidator().add(parseVerificationResultVerificationResultValidatorComponent(xpp, res)); 25565 } else if (!parseDomainResourceContent(eventType, xpp, res)) 25566 return false; 25567 return true; 25568 } 25569 25570 protected VerificationResult.VerificationResultPrimarySourceComponent parseVerificationResultVerificationResultPrimarySourceComponent( 25571 XmlPullParser xpp, VerificationResult owner) throws XmlPullParserException, IOException, FHIRFormatError { 25572 VerificationResult.VerificationResultPrimarySourceComponent res = new VerificationResult.VerificationResultPrimarySourceComponent(); 25573 parseBackboneAttributes(xpp, res); 25574 next(xpp); 25575 int eventType = nextNoWhitespace(xpp); 25576 while (eventType != XmlPullParser.END_TAG) { 25577 if (!parseVerificationResultVerificationResultPrimarySourceComponentContent(eventType, xpp, owner, res)) 25578 unknownContent(xpp); 25579 eventType = nextNoWhitespace(xpp); 25580 } 25581 next(xpp); 25582 parseElementClose(res); 25583 return res; 25584 } 25585 25586 protected boolean parseVerificationResultVerificationResultPrimarySourceComponentContent(int eventType, 25587 XmlPullParser xpp, VerificationResult owner, VerificationResult.VerificationResultPrimarySourceComponent res) 25588 throws XmlPullParserException, IOException, FHIRFormatError { 25589 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { 25590 res.setWho(parseReference(xpp)); 25591 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("type")) { 25592 res.getType().add(parseCodeableConcept(xpp)); 25593 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationMethod")) { 25594 res.getCommunicationMethod().add(parseCodeableConcept(xpp)); 25595 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validationStatus")) { 25596 res.setValidationStatus(parseCodeableConcept(xpp)); 25597 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("validationDate")) { 25598 res.setValidationDateElement(parseDateTime(xpp)); 25599 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("canPushUpdates")) { 25600 res.setCanPushUpdates(parseCodeableConcept(xpp)); 25601 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("pushTypeAvailable")) { 25602 res.getPushTypeAvailable().add(parseCodeableConcept(xpp)); 25603 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25604 return false; 25605 return true; 25606 } 25607 25608 protected VerificationResult.VerificationResultAttestationComponent parseVerificationResultVerificationResultAttestationComponent( 25609 XmlPullParser xpp, VerificationResult owner) throws XmlPullParserException, IOException, FHIRFormatError { 25610 VerificationResult.VerificationResultAttestationComponent res = new VerificationResult.VerificationResultAttestationComponent(); 25611 parseBackboneAttributes(xpp, res); 25612 next(xpp); 25613 int eventType = nextNoWhitespace(xpp); 25614 while (eventType != XmlPullParser.END_TAG) { 25615 if (!parseVerificationResultVerificationResultAttestationComponentContent(eventType, xpp, owner, res)) 25616 unknownContent(xpp); 25617 eventType = nextNoWhitespace(xpp); 25618 } 25619 next(xpp); 25620 parseElementClose(res); 25621 return res; 25622 } 25623 25624 protected boolean parseVerificationResultVerificationResultAttestationComponentContent(int eventType, 25625 XmlPullParser xpp, VerificationResult owner, VerificationResult.VerificationResultAttestationComponent res) 25626 throws XmlPullParserException, IOException, FHIRFormatError { 25627 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("who")) { 25628 res.setWho(parseReference(xpp)); 25629 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("onBehalfOf")) { 25630 res.setOnBehalfOf(parseReference(xpp)); 25631 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("communicationMethod")) { 25632 res.setCommunicationMethod(parseCodeableConcept(xpp)); 25633 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("date")) { 25634 res.setDateElement(parseDate(xpp)); 25635 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceIdentityCertificate")) { 25636 res.setSourceIdentityCertificateElement(parseString(xpp)); 25637 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("proxyIdentityCertificate")) { 25638 res.setProxyIdentityCertificateElement(parseString(xpp)); 25639 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("proxySignature")) { 25640 res.setProxySignature(parseSignature(xpp)); 25641 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sourceSignature")) { 25642 res.setSourceSignature(parseSignature(xpp)); 25643 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25644 return false; 25645 return true; 25646 } 25647 25648 protected VerificationResult.VerificationResultValidatorComponent parseVerificationResultVerificationResultValidatorComponent( 25649 XmlPullParser xpp, VerificationResult owner) throws XmlPullParserException, IOException, FHIRFormatError { 25650 VerificationResult.VerificationResultValidatorComponent res = new VerificationResult.VerificationResultValidatorComponent(); 25651 parseBackboneAttributes(xpp, res); 25652 next(xpp); 25653 int eventType = nextNoWhitespace(xpp); 25654 while (eventType != XmlPullParser.END_TAG) { 25655 if (!parseVerificationResultVerificationResultValidatorComponentContent(eventType, xpp, owner, res)) 25656 unknownContent(xpp); 25657 eventType = nextNoWhitespace(xpp); 25658 } 25659 next(xpp); 25660 parseElementClose(res); 25661 return res; 25662 } 25663 25664 protected boolean parseVerificationResultVerificationResultValidatorComponentContent(int eventType, XmlPullParser xpp, 25665 VerificationResult owner, VerificationResult.VerificationResultValidatorComponent res) 25666 throws XmlPullParserException, IOException, FHIRFormatError { 25667 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("organization")) { 25668 res.setOrganization(parseReference(xpp)); 25669 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identityCertificate")) { 25670 res.setIdentityCertificateElement(parseString(xpp)); 25671 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("attestationSignature")) { 25672 res.setAttestationSignature(parseSignature(xpp)); 25673 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25674 return false; 25675 return true; 25676 } 25677 25678 protected VisionPrescription parseVisionPrescription(XmlPullParser xpp) 25679 throws XmlPullParserException, IOException, FHIRFormatError { 25680 VisionPrescription res = new VisionPrescription(); 25681 parseDomainResourceAttributes(xpp, res); 25682 next(xpp); 25683 int eventType = nextNoWhitespace(xpp); 25684 while (eventType != XmlPullParser.END_TAG) { 25685 if (!parseVisionPrescriptionContent(eventType, xpp, res)) 25686 unknownContent(xpp); 25687 eventType = nextNoWhitespace(xpp); 25688 } 25689 next(xpp); 25690 parseElementClose(res); 25691 return res; 25692 } 25693 25694 protected boolean parseVisionPrescriptionContent(int eventType, XmlPullParser xpp, VisionPrescription res) 25695 throws XmlPullParserException, IOException, FHIRFormatError { 25696 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("identifier")) { 25697 res.getIdentifier().add(parseIdentifier(xpp)); 25698 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("status")) { 25699 res.setStatusElement(parseEnumeration(xpp, VisionPrescription.VisionStatus.NULL, 25700 new VisionPrescription.VisionStatusEnumFactory())); 25701 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("created")) { 25702 res.setCreatedElement(parseDateTime(xpp)); 25703 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("patient")) { 25704 res.setPatient(parseReference(xpp)); 25705 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("encounter")) { 25706 res.setEncounter(parseReference(xpp)); 25707 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dateWritten")) { 25708 res.setDateWrittenElement(parseDateTime(xpp)); 25709 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prescriber")) { 25710 res.setPrescriber(parseReference(xpp)); 25711 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("lensSpecification")) { 25712 res.getLensSpecification().add(parseVisionPrescriptionVisionPrescriptionLensSpecificationComponent(xpp, res)); 25713 } else if (!parseDomainResourceContent(eventType, xpp, res)) 25714 return false; 25715 return true; 25716 } 25717 25718 protected VisionPrescription.VisionPrescriptionLensSpecificationComponent parseVisionPrescriptionVisionPrescriptionLensSpecificationComponent( 25719 XmlPullParser xpp, VisionPrescription owner) throws XmlPullParserException, IOException, FHIRFormatError { 25720 VisionPrescription.VisionPrescriptionLensSpecificationComponent res = new VisionPrescription.VisionPrescriptionLensSpecificationComponent(); 25721 parseBackboneAttributes(xpp, res); 25722 next(xpp); 25723 int eventType = nextNoWhitespace(xpp); 25724 while (eventType != XmlPullParser.END_TAG) { 25725 if (!parseVisionPrescriptionVisionPrescriptionLensSpecificationComponentContent(eventType, xpp, owner, res)) 25726 unknownContent(xpp); 25727 eventType = nextNoWhitespace(xpp); 25728 } 25729 next(xpp); 25730 parseElementClose(res); 25731 return res; 25732 } 25733 25734 protected boolean parseVisionPrescriptionVisionPrescriptionLensSpecificationComponentContent(int eventType, 25735 XmlPullParser xpp, VisionPrescription owner, VisionPrescription.VisionPrescriptionLensSpecificationComponent res) 25736 throws XmlPullParserException, IOException, FHIRFormatError { 25737 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("product")) { 25738 res.setProduct(parseCodeableConcept(xpp)); 25739 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("eye")) { 25740 res.setEyeElement( 25741 parseEnumeration(xpp, VisionPrescription.VisionEyes.NULL, new VisionPrescription.VisionEyesEnumFactory())); 25742 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("sphere")) { 25743 res.setSphereElement(parseDecimal(xpp)); 25744 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("cylinder")) { 25745 res.setCylinderElement(parseDecimal(xpp)); 25746 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("axis")) { 25747 res.setAxisElement(parseInteger(xpp)); 25748 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("prism")) { 25749 res.getPrism().add(parseVisionPrescriptionPrismComponent(xpp, owner)); 25750 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("add")) { 25751 res.setAddElement(parseDecimal(xpp)); 25752 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("power")) { 25753 res.setPowerElement(parseDecimal(xpp)); 25754 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("backCurve")) { 25755 res.setBackCurveElement(parseDecimal(xpp)); 25756 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("diameter")) { 25757 res.setDiameterElement(parseDecimal(xpp)); 25758 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("duration")) { 25759 res.setDuration(parseQuantity(xpp)); 25760 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("color")) { 25761 res.setColorElement(parseString(xpp)); 25762 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("brand")) { 25763 res.setBrandElement(parseString(xpp)); 25764 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("note")) { 25765 res.getNote().add(parseAnnotation(xpp)); 25766 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25767 return false; 25768 return true; 25769 } 25770 25771 protected VisionPrescription.PrismComponent parseVisionPrescriptionPrismComponent(XmlPullParser xpp, 25772 VisionPrescription owner) throws XmlPullParserException, IOException, FHIRFormatError { 25773 VisionPrescription.PrismComponent res = new VisionPrescription.PrismComponent(); 25774 parseBackboneAttributes(xpp, res); 25775 next(xpp); 25776 int eventType = nextNoWhitespace(xpp); 25777 while (eventType != XmlPullParser.END_TAG) { 25778 if (!parseVisionPrescriptionPrismComponentContent(eventType, xpp, owner, res)) 25779 unknownContent(xpp); 25780 eventType = nextNoWhitespace(xpp); 25781 } 25782 next(xpp); 25783 parseElementClose(res); 25784 return res; 25785 } 25786 25787 protected boolean parseVisionPrescriptionPrismComponentContent(int eventType, XmlPullParser xpp, 25788 VisionPrescription owner, VisionPrescription.PrismComponent res) 25789 throws XmlPullParserException, IOException, FHIRFormatError { 25790 if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("amount")) { 25791 res.setAmountElement(parseDecimal(xpp)); 25792 } else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("base")) { 25793 res.setBaseElement( 25794 parseEnumeration(xpp, VisionPrescription.VisionBase.NULL, new VisionPrescription.VisionBaseEnumFactory())); 25795 } else if (!parseBackboneElementContent(eventType, xpp, res)) 25796 return false; 25797 return true; 25798 } 25799 25800 @Override 25801 protected Resource parseResource(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { 25802 if (xpp.getName().equals("Parameters")) 25803 return parseParameters(xpp); 25804 else if (xpp.getName().equals("Account")) 25805 return parseAccount(xpp); 25806 else if (xpp.getName().equals("ActivityDefinition")) 25807 return parseActivityDefinition(xpp); 25808 else if (xpp.getName().equals("AdverseEvent")) 25809 return parseAdverseEvent(xpp); 25810 else if (xpp.getName().equals("AllergyIntolerance")) 25811 return parseAllergyIntolerance(xpp); 25812 else if (xpp.getName().equals("Appointment")) 25813 return parseAppointment(xpp); 25814 else if (xpp.getName().equals("AppointmentResponse")) 25815 return parseAppointmentResponse(xpp); 25816 else if (xpp.getName().equals("AuditEvent")) 25817 return parseAuditEvent(xpp); 25818 else if (xpp.getName().equals("Basic")) 25819 return parseBasic(xpp); 25820 else if (xpp.getName().equals("Binary")) 25821 return parseBinary(xpp); 25822 else if (xpp.getName().equals("BiologicallyDerivedProduct")) 25823 return parseBiologicallyDerivedProduct(xpp); 25824 else if (xpp.getName().equals("BodyStructure")) 25825 return parseBodyStructure(xpp); 25826 else if (xpp.getName().equals("Bundle")) 25827 return parseBundle(xpp); 25828 else if (xpp.getName().equals("CapabilityStatement")) 25829 return parseCapabilityStatement(xpp); 25830 else if (xpp.getName().equals("CarePlan")) 25831 return parseCarePlan(xpp); 25832 else if (xpp.getName().equals("CareTeam")) 25833 return parseCareTeam(xpp); 25834 else if (xpp.getName().equals("CatalogEntry")) 25835 return parseCatalogEntry(xpp); 25836 else if (xpp.getName().equals("ChargeItem")) 25837 return parseChargeItem(xpp); 25838 else if (xpp.getName().equals("ChargeItemDefinition")) 25839 return parseChargeItemDefinition(xpp); 25840 else if (xpp.getName().equals("Claim")) 25841 return parseClaim(xpp); 25842 else if (xpp.getName().equals("ClaimResponse")) 25843 return parseClaimResponse(xpp); 25844 else if (xpp.getName().equals("ClinicalImpression")) 25845 return parseClinicalImpression(xpp); 25846 else if (xpp.getName().equals("CodeSystem")) 25847 return parseCodeSystem(xpp); 25848 else if (xpp.getName().equals("Communication")) 25849 return parseCommunication(xpp); 25850 else if (xpp.getName().equals("CommunicationRequest")) 25851 return parseCommunicationRequest(xpp); 25852 else if (xpp.getName().equals("CompartmentDefinition")) 25853 return parseCompartmentDefinition(xpp); 25854 else if (xpp.getName().equals("Composition")) 25855 return parseComposition(xpp); 25856 else if (xpp.getName().equals("ConceptMap")) 25857 return parseConceptMap(xpp); 25858 else if (xpp.getName().equals("Condition")) 25859 return parseCondition(xpp); 25860 else if (xpp.getName().equals("Consent")) 25861 return parseConsent(xpp); 25862 else if (xpp.getName().equals("Contract")) 25863 return parseContract(xpp); 25864 else if (xpp.getName().equals("Coverage")) 25865 return parseCoverage(xpp); 25866 else if (xpp.getName().equals("CoverageEligibilityRequest")) 25867 return parseCoverageEligibilityRequest(xpp); 25868 else if (xpp.getName().equals("CoverageEligibilityResponse")) 25869 return parseCoverageEligibilityResponse(xpp); 25870 else if (xpp.getName().equals("DetectedIssue")) 25871 return parseDetectedIssue(xpp); 25872 else if (xpp.getName().equals("Device")) 25873 return parseDevice(xpp); 25874 else if (xpp.getName().equals("DeviceDefinition")) 25875 return parseDeviceDefinition(xpp); 25876 else if (xpp.getName().equals("DeviceMetric")) 25877 return parseDeviceMetric(xpp); 25878 else if (xpp.getName().equals("DeviceRequest")) 25879 return parseDeviceRequest(xpp); 25880 else if (xpp.getName().equals("DeviceUseStatement")) 25881 return parseDeviceUseStatement(xpp); 25882 else if (xpp.getName().equals("DiagnosticReport")) 25883 return parseDiagnosticReport(xpp); 25884 else if (xpp.getName().equals("DocumentManifest")) 25885 return parseDocumentManifest(xpp); 25886 else if (xpp.getName().equals("DocumentReference")) 25887 return parseDocumentReference(xpp); 25888 else if (xpp.getName().equals("EffectEvidenceSynthesis")) 25889 return parseEffectEvidenceSynthesis(xpp); 25890 else if (xpp.getName().equals("Encounter")) 25891 return parseEncounter(xpp); 25892 else if (xpp.getName().equals("Endpoint")) 25893 return parseEndpoint(xpp); 25894 else if (xpp.getName().equals("EnrollmentRequest")) 25895 return parseEnrollmentRequest(xpp); 25896 else if (xpp.getName().equals("EnrollmentResponse")) 25897 return parseEnrollmentResponse(xpp); 25898 else if (xpp.getName().equals("EpisodeOfCare")) 25899 return parseEpisodeOfCare(xpp); 25900 else if (xpp.getName().equals("EventDefinition")) 25901 return parseEventDefinition(xpp); 25902 else if (xpp.getName().equals("Evidence")) 25903 return parseEvidence(xpp); 25904 else if (xpp.getName().equals("EvidenceVariable")) 25905 return parseEvidenceVariable(xpp); 25906 else if (xpp.getName().equals("ExampleScenario")) 25907 return parseExampleScenario(xpp); 25908 else if (xpp.getName().equals("ExplanationOfBenefit")) 25909 return parseExplanationOfBenefit(xpp); 25910 else if (xpp.getName().equals("FamilyMemberHistory")) 25911 return parseFamilyMemberHistory(xpp); 25912 else if (xpp.getName().equals("Flag")) 25913 return parseFlag(xpp); 25914 else if (xpp.getName().equals("Goal")) 25915 return parseGoal(xpp); 25916 else if (xpp.getName().equals("GraphDefinition")) 25917 return parseGraphDefinition(xpp); 25918 else if (xpp.getName().equals("Group")) 25919 return parseGroup(xpp); 25920 else if (xpp.getName().equals("GuidanceResponse")) 25921 return parseGuidanceResponse(xpp); 25922 else if (xpp.getName().equals("HealthcareService")) 25923 return parseHealthcareService(xpp); 25924 else if (xpp.getName().equals("ImagingStudy")) 25925 return parseImagingStudy(xpp); 25926 else if (xpp.getName().equals("Immunization")) 25927 return parseImmunization(xpp); 25928 else if (xpp.getName().equals("ImmunizationEvaluation")) 25929 return parseImmunizationEvaluation(xpp); 25930 else if (xpp.getName().equals("ImmunizationRecommendation")) 25931 return parseImmunizationRecommendation(xpp); 25932 else if (xpp.getName().equals("ImplementationGuide")) 25933 return parseImplementationGuide(xpp); 25934 else if (xpp.getName().equals("InsurancePlan")) 25935 return parseInsurancePlan(xpp); 25936 else if (xpp.getName().equals("Invoice")) 25937 return parseInvoice(xpp); 25938 else if (xpp.getName().equals("Library")) 25939 return parseLibrary(xpp); 25940 else if (xpp.getName().equals("Linkage")) 25941 return parseLinkage(xpp); 25942 else if (xpp.getName().equals("List")) 25943 return parseListResource(xpp); 25944 else if (xpp.getName().equals("Location")) 25945 return parseLocation(xpp); 25946 else if (xpp.getName().equals("Measure")) 25947 return parseMeasure(xpp); 25948 else if (xpp.getName().equals("MeasureReport")) 25949 return parseMeasureReport(xpp); 25950 else if (xpp.getName().equals("Media")) 25951 return parseMedia(xpp); 25952 else if (xpp.getName().equals("Medication")) 25953 return parseMedication(xpp); 25954 else if (xpp.getName().equals("MedicationAdministration")) 25955 return parseMedicationAdministration(xpp); 25956 else if (xpp.getName().equals("MedicationDispense")) 25957 return parseMedicationDispense(xpp); 25958 else if (xpp.getName().equals("MedicationKnowledge")) 25959 return parseMedicationKnowledge(xpp); 25960 else if (xpp.getName().equals("MedicationRequest")) 25961 return parseMedicationRequest(xpp); 25962 else if (xpp.getName().equals("MedicationStatement")) 25963 return parseMedicationStatement(xpp); 25964 else if (xpp.getName().equals("MedicinalProduct")) 25965 return parseMedicinalProduct(xpp); 25966 else if (xpp.getName().equals("MedicinalProductAuthorization")) 25967 return parseMedicinalProductAuthorization(xpp); 25968 else if (xpp.getName().equals("MedicinalProductContraindication")) 25969 return parseMedicinalProductContraindication(xpp); 25970 else if (xpp.getName().equals("MedicinalProductIndication")) 25971 return parseMedicinalProductIndication(xpp); 25972 else if (xpp.getName().equals("MedicinalProductIngredient")) 25973 return parseMedicinalProductIngredient(xpp); 25974 else if (xpp.getName().equals("MedicinalProductInteraction")) 25975 return parseMedicinalProductInteraction(xpp); 25976 else if (xpp.getName().equals("MedicinalProductManufactured")) 25977 return parseMedicinalProductManufactured(xpp); 25978 else if (xpp.getName().equals("MedicinalProductPackaged")) 25979 return parseMedicinalProductPackaged(xpp); 25980 else if (xpp.getName().equals("MedicinalProductPharmaceutical")) 25981 return parseMedicinalProductPharmaceutical(xpp); 25982 else if (xpp.getName().equals("MedicinalProductUndesirableEffect")) 25983 return parseMedicinalProductUndesirableEffect(xpp); 25984 else if (xpp.getName().equals("MessageDefinition")) 25985 return parseMessageDefinition(xpp); 25986 else if (xpp.getName().equals("MessageHeader")) 25987 return parseMessageHeader(xpp); 25988 else if (xpp.getName().equals("MolecularSequence")) 25989 return parseMolecularSequence(xpp); 25990 else if (xpp.getName().equals("NamingSystem")) 25991 return parseNamingSystem(xpp); 25992 else if (xpp.getName().equals("NutritionOrder")) 25993 return parseNutritionOrder(xpp); 25994 else if (xpp.getName().equals("Observation")) 25995 return parseObservation(xpp); 25996 else if (xpp.getName().equals("ObservationDefinition")) 25997 return parseObservationDefinition(xpp); 25998 else if (xpp.getName().equals("OperationDefinition")) 25999 return parseOperationDefinition(xpp); 26000 else if (xpp.getName().equals("OperationOutcome")) 26001 return parseOperationOutcome(xpp); 26002 else if (xpp.getName().equals("Organization")) 26003 return parseOrganization(xpp); 26004 else if (xpp.getName().equals("OrganizationAffiliation")) 26005 return parseOrganizationAffiliation(xpp); 26006 else if (xpp.getName().equals("Patient")) 26007 return parsePatient(xpp); 26008 else if (xpp.getName().equals("PaymentNotice")) 26009 return parsePaymentNotice(xpp); 26010 else if (xpp.getName().equals("PaymentReconciliation")) 26011 return parsePaymentReconciliation(xpp); 26012 else if (xpp.getName().equals("Person")) 26013 return parsePerson(xpp); 26014 else if (xpp.getName().equals("PlanDefinition")) 26015 return parsePlanDefinition(xpp); 26016 else if (xpp.getName().equals("Practitioner")) 26017 return parsePractitioner(xpp); 26018 else if (xpp.getName().equals("PractitionerRole")) 26019 return parsePractitionerRole(xpp); 26020 else if (xpp.getName().equals("Procedure")) 26021 return parseProcedure(xpp); 26022 else if (xpp.getName().equals("Provenance")) 26023 return parseProvenance(xpp); 26024 else if (xpp.getName().equals("Questionnaire")) 26025 return parseQuestionnaire(xpp); 26026 else if (xpp.getName().equals("QuestionnaireResponse")) 26027 return parseQuestionnaireResponse(xpp); 26028 else if (xpp.getName().equals("RelatedPerson")) 26029 return parseRelatedPerson(xpp); 26030 else if (xpp.getName().equals("RequestGroup")) 26031 return parseRequestGroup(xpp); 26032 else if (xpp.getName().equals("ResearchDefinition")) 26033 return parseResearchDefinition(xpp); 26034 else if (xpp.getName().equals("ResearchElementDefinition")) 26035 return parseResearchElementDefinition(xpp); 26036 else if (xpp.getName().equals("ResearchStudy")) 26037 return parseResearchStudy(xpp); 26038 else if (xpp.getName().equals("ResearchSubject")) 26039 return parseResearchSubject(xpp); 26040 else if (xpp.getName().equals("RiskAssessment")) 26041 return parseRiskAssessment(xpp); 26042 else if (xpp.getName().equals("RiskEvidenceSynthesis")) 26043 return parseRiskEvidenceSynthesis(xpp); 26044 else if (xpp.getName().equals("Schedule")) 26045 return parseSchedule(xpp); 26046 else if (xpp.getName().equals("SearchParameter")) 26047 return parseSearchParameter(xpp); 26048 else if (xpp.getName().equals("ServiceRequest")) 26049 return parseServiceRequest(xpp); 26050 else if (xpp.getName().equals("Slot")) 26051 return parseSlot(xpp); 26052 else if (xpp.getName().equals("Specimen")) 26053 return parseSpecimen(xpp); 26054 else if (xpp.getName().equals("SpecimenDefinition")) 26055 return parseSpecimenDefinition(xpp); 26056 else if (xpp.getName().equals("StructureDefinition")) 26057 return parseStructureDefinition(xpp); 26058 else if (xpp.getName().equals("StructureMap")) 26059 return parseStructureMap(xpp); 26060 else if (xpp.getName().equals("Subscription")) 26061 return parseSubscription(xpp); 26062 else if (xpp.getName().equals("Substance")) 26063 return parseSubstance(xpp); 26064 else if (xpp.getName().equals("SubstanceNucleicAcid")) 26065 return parseSubstanceNucleicAcid(xpp); 26066 else if (xpp.getName().equals("SubstancePolymer")) 26067 return parseSubstancePolymer(xpp); 26068 else if (xpp.getName().equals("SubstanceProtein")) 26069 return parseSubstanceProtein(xpp); 26070 else if (xpp.getName().equals("SubstanceReferenceInformation")) 26071 return parseSubstanceReferenceInformation(xpp); 26072 else if (xpp.getName().equals("SubstanceSourceMaterial")) 26073 return parseSubstanceSourceMaterial(xpp); 26074 else if (xpp.getName().equals("SubstanceSpecification")) 26075 return parseSubstanceSpecification(xpp); 26076 else if (xpp.getName().equals("SupplyDelivery")) 26077 return parseSupplyDelivery(xpp); 26078 else if (xpp.getName().equals("SupplyRequest")) 26079 return parseSupplyRequest(xpp); 26080 else if (xpp.getName().equals("Task")) 26081 return parseTask(xpp); 26082 else if (xpp.getName().equals("TerminologyCapabilities")) 26083 return parseTerminologyCapabilities(xpp); 26084 else if (xpp.getName().equals("TestReport")) 26085 return parseTestReport(xpp); 26086 else if (xpp.getName().equals("TestScript")) 26087 return parseTestScript(xpp); 26088 else if (xpp.getName().equals("ValueSet")) 26089 return parseValueSet(xpp); 26090 else if (xpp.getName().equals("VerificationResult")) 26091 return parseVerificationResult(xpp); 26092 else if (xpp.getName().equals("VisionPrescription")) 26093 return parseVisionPrescription(xpp); 26094 else if (xpp.getName().equals("Binary")) 26095 return parseBinary(xpp); 26096 throw new FHIRFormatError("Unknown resource type " + xpp.getName() + ""); 26097 } 26098 26099 protected Type parseType(String prefix, XmlPullParser xpp) 26100 throws XmlPullParserException, IOException, FHIRFormatError { 26101 if (xpp.getName().equals(prefix + "date")) 26102 return parseDate(xpp); 26103 else if (xpp.getName().equals(prefix + "dateTime")) 26104 return parseDateTime(xpp); 26105 else if (xpp.getName().equals(prefix + "code")) 26106 return parseCode(xpp); 26107 else if (xpp.getName().equals(prefix + "string")) 26108 return parseString(xpp); 26109 else if (xpp.getName().equals(prefix + "integer")) 26110 return parseInteger(xpp); 26111 else if (xpp.getName().equals(prefix + "oid")) 26112 return parseOid(xpp); 26113 else if (xpp.getName().equals(prefix + "canonical")) 26114 return parseCanonical(xpp); 26115 else if (xpp.getName().equals(prefix + "uri")) 26116 return parseUri(xpp); 26117 else if (xpp.getName().equals(prefix + "uuid")) 26118 return parseUuid(xpp); 26119 else if (xpp.getName().equals(prefix + "url")) 26120 return parseUrl(xpp); 26121 else if (xpp.getName().equals(prefix + "instant")) 26122 return parseInstant(xpp); 26123 else if (xpp.getName().equals(prefix + "boolean")) 26124 return parseBoolean(xpp); 26125 else if (xpp.getName().equals(prefix + "base64Binary")) 26126 return parseBase64Binary(xpp); 26127 else if (xpp.getName().equals(prefix + "unsignedInt")) 26128 return parseUnsignedInt(xpp); 26129 else if (xpp.getName().equals(prefix + "markdown")) 26130 return parseMarkdown(xpp); 26131 else if (xpp.getName().equals(prefix + "time")) 26132 return parseTime(xpp); 26133 else if (xpp.getName().equals(prefix + "id")) 26134 return parseId(xpp); 26135 else if (xpp.getName().equals(prefix + "positiveInt")) 26136 return parsePositiveInt(xpp); 26137 else if (xpp.getName().equals(prefix + "decimal")) 26138 return parseDecimal(xpp); 26139 else if (xpp.getName().equals(prefix + "Extension")) 26140 return parseExtension(xpp); 26141 else if (xpp.getName().equals(prefix + "Narrative")) 26142 return parseNarrative(xpp); 26143 else if (xpp.getName().equals(prefix + "Meta")) 26144 return parseMeta(xpp); 26145 else if (xpp.getName().equals(prefix + "Address")) 26146 return parseAddress(xpp); 26147 else if (xpp.getName().equals(prefix + "Contributor")) 26148 return parseContributor(xpp); 26149 else if (xpp.getName().equals(prefix + "Attachment")) 26150 return parseAttachment(xpp); 26151 else if (xpp.getName().equals(prefix + "Count")) 26152 return parseCount(xpp); 26153 else if (xpp.getName().equals(prefix + "DataRequirement")) 26154 return parseDataRequirement(xpp); 26155 else if (xpp.getName().equals(prefix + "Dosage")) 26156 return parseDosage(xpp); 26157 else if (xpp.getName().equals(prefix + "Money")) 26158 return parseMoney(xpp); 26159 else if (xpp.getName().equals(prefix + "HumanName")) 26160 return parseHumanName(xpp); 26161 else if (xpp.getName().equals(prefix + "ContactPoint")) 26162 return parseContactPoint(xpp); 26163 else if (xpp.getName().equals(prefix + "MarketingStatus")) 26164 return parseMarketingStatus(xpp); 26165 else if (xpp.getName().equals(prefix + "Identifier")) 26166 return parseIdentifier(xpp); 26167 else if (xpp.getName().equals(prefix + "SubstanceAmount")) 26168 return parseSubstanceAmount(xpp); 26169 else if (xpp.getName().equals(prefix + "Coding")) 26170 return parseCoding(xpp); 26171 else if (xpp.getName().equals(prefix + "SampledData")) 26172 return parseSampledData(xpp); 26173 else if (xpp.getName().equals(prefix + "Population")) 26174 return parsePopulation(xpp); 26175 else if (xpp.getName().equals(prefix + "Ratio")) 26176 return parseRatio(xpp); 26177 else if (xpp.getName().equals(prefix + "Distance")) 26178 return parseDistance(xpp); 26179 else if (xpp.getName().equals(prefix + "Age")) 26180 return parseAge(xpp); 26181 else if (xpp.getName().equals(prefix + "Reference")) 26182 return parseReference(xpp); 26183 else if (xpp.getName().equals(prefix + "TriggerDefinition")) 26184 return parseTriggerDefinition(xpp); 26185 else if (xpp.getName().equals(prefix + "Quantity")) 26186 return parseQuantity(xpp); 26187 else if (xpp.getName().equals(prefix + "Period")) 26188 return parsePeriod(xpp); 26189 else if (xpp.getName().equals(prefix + "Duration")) 26190 return parseDuration(xpp); 26191 else if (xpp.getName().equals(prefix + "Range")) 26192 return parseRange(xpp); 26193 else if (xpp.getName().equals(prefix + "RelatedArtifact")) 26194 return parseRelatedArtifact(xpp); 26195 else if (xpp.getName().equals(prefix + "Annotation")) 26196 return parseAnnotation(xpp); 26197 else if (xpp.getName().equals(prefix + "ProductShelfLife")) 26198 return parseProductShelfLife(xpp); 26199 else if (xpp.getName().equals(prefix + "ContactDetail")) 26200 return parseContactDetail(xpp); 26201 else if (xpp.getName().equals(prefix + "UsageContext")) 26202 return parseUsageContext(xpp); 26203 else if (xpp.getName().equals(prefix + "Expression")) 26204 return parseExpression(xpp); 26205 else if (xpp.getName().equals(prefix + "Signature")) 26206 return parseSignature(xpp); 26207 else if (xpp.getName().equals(prefix + "Timing")) 26208 return parseTiming(xpp); 26209 else if (xpp.getName().equals(prefix + "ProdCharacteristic")) 26210 return parseProdCharacteristic(xpp); 26211 else if (xpp.getName().equals(prefix + "CodeableConcept")) 26212 return parseCodeableConcept(xpp); 26213 else if (xpp.getName().equals(prefix + "ParameterDefinition")) 26214 return parseParameterDefinition(xpp); 26215 else if (xpp.getName().equals(prefix + "Date")) 26216 return parseDate(xpp); 26217 else if (xpp.getName().equals(prefix + "DateTime")) 26218 return parseDateTime(xpp); 26219 else if (xpp.getName().equals(prefix + "Code")) 26220 return parseCode(xpp); 26221 else if (xpp.getName().equals(prefix + "String")) 26222 return parseString(xpp); 26223 else if (xpp.getName().equals(prefix + "Integer")) 26224 return parseInteger(xpp); 26225 else if (xpp.getName().equals(prefix + "Oid")) 26226 return parseOid(xpp); 26227 else if (xpp.getName().equals(prefix + "Canonical")) 26228 return parseCanonical(xpp); 26229 else if (xpp.getName().equals(prefix + "Uri")) 26230 return parseUri(xpp); 26231 else if (xpp.getName().equals(prefix + "Uuid")) 26232 return parseUuid(xpp); 26233 else if (xpp.getName().equals(prefix + "Url")) 26234 return parseUrl(xpp); 26235 else if (xpp.getName().equals(prefix + "Instant")) 26236 return parseInstant(xpp); 26237 else if (xpp.getName().equals(prefix + "Boolean")) 26238 return parseBoolean(xpp); 26239 else if (xpp.getName().equals(prefix + "Base64Binary")) 26240 return parseBase64Binary(xpp); 26241 else if (xpp.getName().equals(prefix + "UnsignedInt")) 26242 return parseUnsignedInt(xpp); 26243 else if (xpp.getName().equals(prefix + "Markdown")) 26244 return parseMarkdown(xpp); 26245 else if (xpp.getName().equals(prefix + "Time")) 26246 return parseTime(xpp); 26247 else if (xpp.getName().equals(prefix + "Id")) 26248 return parseId(xpp); 26249 else if (xpp.getName().equals(prefix + "PositiveInt")) 26250 return parsePositiveInt(xpp); 26251 else if (xpp.getName().equals(prefix + "Decimal")) 26252 return parseDecimal(xpp); 26253 throw new FHIRFormatError("Unknown type " + xpp.getName()); 26254 } 26255 26256 protected Type parseType(XmlPullParser xpp, String type) throws XmlPullParserException, IOException, FHIRFormatError { 26257 if (type.equals("date")) 26258 return parseDate(xpp); 26259 else if (type.equals("dateTime")) 26260 return parseDateTime(xpp); 26261 else if (type.equals("code")) 26262 return parseCode(xpp); 26263 else if (type.equals("string")) 26264 return parseString(xpp); 26265 else if (type.equals("integer")) 26266 return parseInteger(xpp); 26267 else if (type.equals("oid")) 26268 return parseOid(xpp); 26269 else if (type.equals("canonical")) 26270 return parseCanonical(xpp); 26271 else if (type.equals("uri")) 26272 return parseUri(xpp); 26273 else if (type.equals("uuid")) 26274 return parseUuid(xpp); 26275 else if (type.equals("url")) 26276 return parseUrl(xpp); 26277 else if (type.equals("instant")) 26278 return parseInstant(xpp); 26279 else if (type.equals("boolean")) 26280 return parseBoolean(xpp); 26281 else if (type.equals("base64Binary")) 26282 return parseBase64Binary(xpp); 26283 else if (type.equals("unsignedInt")) 26284 return parseUnsignedInt(xpp); 26285 else if (type.equals("markdown")) 26286 return parseMarkdown(xpp); 26287 else if (type.equals("time")) 26288 return parseTime(xpp); 26289 else if (type.equals("id")) 26290 return parseId(xpp); 26291 else if (type.equals("positiveInt")) 26292 return parsePositiveInt(xpp); 26293 else if (type.equals("decimal")) 26294 return parseDecimal(xpp); 26295 else if (type.equals("Extension")) 26296 return parseExtension(xpp); 26297 else if (type.equals("Narrative")) 26298 return parseNarrative(xpp); 26299 else if (type.equals("Meta")) 26300 return parseMeta(xpp); 26301 else if (type.equals("Address")) 26302 return parseAddress(xpp); 26303 else if (type.equals("Contributor")) 26304 return parseContributor(xpp); 26305 else if (type.equals("Attachment")) 26306 return parseAttachment(xpp); 26307 else if (type.equals("Count")) 26308 return parseCount(xpp); 26309 else if (type.equals("DataRequirement")) 26310 return parseDataRequirement(xpp); 26311 else if (type.equals("Dosage")) 26312 return parseDosage(xpp); 26313 else if (type.equals("Money")) 26314 return parseMoney(xpp); 26315 else if (type.equals("HumanName")) 26316 return parseHumanName(xpp); 26317 else if (type.equals("ContactPoint")) 26318 return parseContactPoint(xpp); 26319 else if (type.equals("MarketingStatus")) 26320 return parseMarketingStatus(xpp); 26321 else if (type.equals("Identifier")) 26322 return parseIdentifier(xpp); 26323 else if (type.equals("SubstanceAmount")) 26324 return parseSubstanceAmount(xpp); 26325 else if (type.equals("Coding")) 26326 return parseCoding(xpp); 26327 else if (type.equals("SampledData")) 26328 return parseSampledData(xpp); 26329 else if (type.equals("Population")) 26330 return parsePopulation(xpp); 26331 else if (type.equals("Ratio")) 26332 return parseRatio(xpp); 26333 else if (type.equals("Distance")) 26334 return parseDistance(xpp); 26335 else if (type.equals("Age")) 26336 return parseAge(xpp); 26337 else if (type.equals("Reference")) 26338 return parseReference(xpp); 26339 else if (type.equals("TriggerDefinition")) 26340 return parseTriggerDefinition(xpp); 26341 else if (type.equals("Quantity")) 26342 return parseQuantity(xpp); 26343 else if (type.equals("Period")) 26344 return parsePeriod(xpp); 26345 else if (type.equals("Duration")) 26346 return parseDuration(xpp); 26347 else if (type.equals("Range")) 26348 return parseRange(xpp); 26349 else if (type.equals("RelatedArtifact")) 26350 return parseRelatedArtifact(xpp); 26351 else if (type.equals("Annotation")) 26352 return parseAnnotation(xpp); 26353 else if (type.equals("ProductShelfLife")) 26354 return parseProductShelfLife(xpp); 26355 else if (type.equals("ContactDetail")) 26356 return parseContactDetail(xpp); 26357 else if (type.equals("UsageContext")) 26358 return parseUsageContext(xpp); 26359 else if (type.equals("Expression")) 26360 return parseExpression(xpp); 26361 else if (type.equals("Signature")) 26362 return parseSignature(xpp); 26363 else if (type.equals("Timing")) 26364 return parseTiming(xpp); 26365 else if (type.equals("ProdCharacteristic")) 26366 return parseProdCharacteristic(xpp); 26367 else if (type.equals("CodeableConcept")) 26368 return parseCodeableConcept(xpp); 26369 else if (type.equals("ParameterDefinition")) 26370 return parseParameterDefinition(xpp); 26371 throw new FHIRFormatError("Unknown type " + type); 26372 } 26373 26374 public Base parseFragment(XmlPullParser xpp, String type) 26375 throws XmlPullParserException, IOException, FHIRFormatError { 26376 if (type.equals("Extension")) 26377 return parseExtension(xpp); 26378 else if (type.equals("Narrative")) 26379 return parseNarrative(xpp); 26380 else if (type.equals("Meta")) 26381 return parseMeta(xpp); 26382 else if (type.equals("Address")) 26383 return parseAddress(xpp); 26384 else if (type.equals("Contributor")) 26385 return parseContributor(xpp); 26386 else if (type.equals("Attachment")) 26387 return parseAttachment(xpp); 26388 else if (type.equals("Count")) 26389 return parseCount(xpp); 26390 else if (type.equals("DataRequirement")) 26391 return parseDataRequirement(xpp); 26392 else if (type.equals("Dosage")) 26393 return parseDosage(xpp); 26394 else if (type.equals("Money")) 26395 return parseMoney(xpp); 26396 else if (type.equals("HumanName")) 26397 return parseHumanName(xpp); 26398 else if (type.equals("ContactPoint")) 26399 return parseContactPoint(xpp); 26400 else if (type.equals("MarketingStatus")) 26401 return parseMarketingStatus(xpp); 26402 else if (type.equals("Identifier")) 26403 return parseIdentifier(xpp); 26404 else if (type.equals("SubstanceAmount")) 26405 return parseSubstanceAmount(xpp); 26406 else if (type.equals("Coding")) 26407 return parseCoding(xpp); 26408 else if (type.equals("SampledData")) 26409 return parseSampledData(xpp); 26410 else if (type.equals("Population")) 26411 return parsePopulation(xpp); 26412 else if (type.equals("Ratio")) 26413 return parseRatio(xpp); 26414 else if (type.equals("Distance")) 26415 return parseDistance(xpp); 26416 else if (type.equals("Age")) 26417 return parseAge(xpp); 26418 else if (type.equals("Reference")) 26419 return parseReference(xpp); 26420 else if (type.equals("TriggerDefinition")) 26421 return parseTriggerDefinition(xpp); 26422 else if (type.equals("Quantity")) 26423 return parseQuantity(xpp); 26424 else if (type.equals("Period")) 26425 return parsePeriod(xpp); 26426 else if (type.equals("Duration")) 26427 return parseDuration(xpp); 26428 else if (type.equals("Range")) 26429 return parseRange(xpp); 26430 else if (type.equals("RelatedArtifact")) 26431 return parseRelatedArtifact(xpp); 26432 else if (type.equals("Annotation")) 26433 return parseAnnotation(xpp); 26434 else if (type.equals("ProductShelfLife")) 26435 return parseProductShelfLife(xpp); 26436 else if (type.equals("ContactDetail")) 26437 return parseContactDetail(xpp); 26438 else if (type.equals("UsageContext")) 26439 return parseUsageContext(xpp); 26440 else if (type.equals("Expression")) 26441 return parseExpression(xpp); 26442 else if (type.equals("Signature")) 26443 return parseSignature(xpp); 26444 else if (type.equals("Timing")) 26445 return parseTiming(xpp); 26446 else if (type.equals("ProdCharacteristic")) 26447 return parseProdCharacteristic(xpp); 26448 else if (type.equals("CodeableConcept")) 26449 return parseCodeableConcept(xpp); 26450 else if (type.equals("ParameterDefinition")) 26451 return parseParameterDefinition(xpp); 26452 else if (type.equals("Parameters")) 26453 return parseParameters(xpp); 26454 else if (type.equals("Account")) 26455 return parseAccount(xpp); 26456 else if (type.equals("ActivityDefinition")) 26457 return parseActivityDefinition(xpp); 26458 else if (type.equals("AdverseEvent")) 26459 return parseAdverseEvent(xpp); 26460 else if (type.equals("AllergyIntolerance")) 26461 return parseAllergyIntolerance(xpp); 26462 else if (type.equals("Appointment")) 26463 return parseAppointment(xpp); 26464 else if (type.equals("AppointmentResponse")) 26465 return parseAppointmentResponse(xpp); 26466 else if (type.equals("AuditEvent")) 26467 return parseAuditEvent(xpp); 26468 else if (type.equals("Basic")) 26469 return parseBasic(xpp); 26470 else if (type.equals("Binary")) 26471 return parseBinary(xpp); 26472 else if (type.equals("BiologicallyDerivedProduct")) 26473 return parseBiologicallyDerivedProduct(xpp); 26474 else if (type.equals("BodyStructure")) 26475 return parseBodyStructure(xpp); 26476 else if (type.equals("Bundle")) 26477 return parseBundle(xpp); 26478 else if (type.equals("CapabilityStatement")) 26479 return parseCapabilityStatement(xpp); 26480 else if (type.equals("CarePlan")) 26481 return parseCarePlan(xpp); 26482 else if (type.equals("CareTeam")) 26483 return parseCareTeam(xpp); 26484 else if (type.equals("CatalogEntry")) 26485 return parseCatalogEntry(xpp); 26486 else if (type.equals("ChargeItem")) 26487 return parseChargeItem(xpp); 26488 else if (type.equals("ChargeItemDefinition")) 26489 return parseChargeItemDefinition(xpp); 26490 else if (type.equals("Claim")) 26491 return parseClaim(xpp); 26492 else if (type.equals("ClaimResponse")) 26493 return parseClaimResponse(xpp); 26494 else if (type.equals("ClinicalImpression")) 26495 return parseClinicalImpression(xpp); 26496 else if (type.equals("CodeSystem")) 26497 return parseCodeSystem(xpp); 26498 else if (type.equals("Communication")) 26499 return parseCommunication(xpp); 26500 else if (type.equals("CommunicationRequest")) 26501 return parseCommunicationRequest(xpp); 26502 else if (type.equals("CompartmentDefinition")) 26503 return parseCompartmentDefinition(xpp); 26504 else if (type.equals("Composition")) 26505 return parseComposition(xpp); 26506 else if (type.equals("ConceptMap")) 26507 return parseConceptMap(xpp); 26508 else if (type.equals("Condition")) 26509 return parseCondition(xpp); 26510 else if (type.equals("Consent")) 26511 return parseConsent(xpp); 26512 else if (type.equals("Contract")) 26513 return parseContract(xpp); 26514 else if (type.equals("Coverage")) 26515 return parseCoverage(xpp); 26516 else if (type.equals("CoverageEligibilityRequest")) 26517 return parseCoverageEligibilityRequest(xpp); 26518 else if (type.equals("CoverageEligibilityResponse")) 26519 return parseCoverageEligibilityResponse(xpp); 26520 else if (type.equals("DetectedIssue")) 26521 return parseDetectedIssue(xpp); 26522 else if (type.equals("Device")) 26523 return parseDevice(xpp); 26524 else if (type.equals("DeviceDefinition")) 26525 return parseDeviceDefinition(xpp); 26526 else if (type.equals("DeviceMetric")) 26527 return parseDeviceMetric(xpp); 26528 else if (type.equals("DeviceRequest")) 26529 return parseDeviceRequest(xpp); 26530 else if (type.equals("DeviceUseStatement")) 26531 return parseDeviceUseStatement(xpp); 26532 else if (type.equals("DiagnosticReport")) 26533 return parseDiagnosticReport(xpp); 26534 else if (type.equals("DocumentManifest")) 26535 return parseDocumentManifest(xpp); 26536 else if (type.equals("DocumentReference")) 26537 return parseDocumentReference(xpp); 26538 else if (type.equals("EffectEvidenceSynthesis")) 26539 return parseEffectEvidenceSynthesis(xpp); 26540 else if (type.equals("Encounter")) 26541 return parseEncounter(xpp); 26542 else if (type.equals("Endpoint")) 26543 return parseEndpoint(xpp); 26544 else if (type.equals("EnrollmentRequest")) 26545 return parseEnrollmentRequest(xpp); 26546 else if (type.equals("EnrollmentResponse")) 26547 return parseEnrollmentResponse(xpp); 26548 else if (type.equals("EpisodeOfCare")) 26549 return parseEpisodeOfCare(xpp); 26550 else if (type.equals("EventDefinition")) 26551 return parseEventDefinition(xpp); 26552 else if (type.equals("Evidence")) 26553 return parseEvidence(xpp); 26554 else if (type.equals("EvidenceVariable")) 26555 return parseEvidenceVariable(xpp); 26556 else if (type.equals("ExampleScenario")) 26557 return parseExampleScenario(xpp); 26558 else if (type.equals("ExplanationOfBenefit")) 26559 return parseExplanationOfBenefit(xpp); 26560 else if (type.equals("FamilyMemberHistory")) 26561 return parseFamilyMemberHistory(xpp); 26562 else if (type.equals("Flag")) 26563 return parseFlag(xpp); 26564 else if (type.equals("Goal")) 26565 return parseGoal(xpp); 26566 else if (type.equals("GraphDefinition")) 26567 return parseGraphDefinition(xpp); 26568 else if (type.equals("Group")) 26569 return parseGroup(xpp); 26570 else if (type.equals("GuidanceResponse")) 26571 return parseGuidanceResponse(xpp); 26572 else if (type.equals("HealthcareService")) 26573 return parseHealthcareService(xpp); 26574 else if (type.equals("ImagingStudy")) 26575 return parseImagingStudy(xpp); 26576 else if (type.equals("Immunization")) 26577 return parseImmunization(xpp); 26578 else if (type.equals("ImmunizationEvaluation")) 26579 return parseImmunizationEvaluation(xpp); 26580 else if (type.equals("ImmunizationRecommendation")) 26581 return parseImmunizationRecommendation(xpp); 26582 else if (type.equals("ImplementationGuide")) 26583 return parseImplementationGuide(xpp); 26584 else if (type.equals("InsurancePlan")) 26585 return parseInsurancePlan(xpp); 26586 else if (type.equals("Invoice")) 26587 return parseInvoice(xpp); 26588 else if (type.equals("Library")) 26589 return parseLibrary(xpp); 26590 else if (type.equals("Linkage")) 26591 return parseLinkage(xpp); 26592 else if (type.equals("List")) 26593 return parseListResource(xpp); 26594 else if (type.equals("Location")) 26595 return parseLocation(xpp); 26596 else if (type.equals("Measure")) 26597 return parseMeasure(xpp); 26598 else if (type.equals("MeasureReport")) 26599 return parseMeasureReport(xpp); 26600 else if (type.equals("Media")) 26601 return parseMedia(xpp); 26602 else if (type.equals("Medication")) 26603 return parseMedication(xpp); 26604 else if (type.equals("MedicationAdministration")) 26605 return parseMedicationAdministration(xpp); 26606 else if (type.equals("MedicationDispense")) 26607 return parseMedicationDispense(xpp); 26608 else if (type.equals("MedicationKnowledge")) 26609 return parseMedicationKnowledge(xpp); 26610 else if (type.equals("MedicationRequest")) 26611 return parseMedicationRequest(xpp); 26612 else if (type.equals("MedicationStatement")) 26613 return parseMedicationStatement(xpp); 26614 else if (type.equals("MedicinalProduct")) 26615 return parseMedicinalProduct(xpp); 26616 else if (type.equals("MedicinalProductAuthorization")) 26617 return parseMedicinalProductAuthorization(xpp); 26618 else if (type.equals("MedicinalProductContraindication")) 26619 return parseMedicinalProductContraindication(xpp); 26620 else if (type.equals("MedicinalProductIndication")) 26621 return parseMedicinalProductIndication(xpp); 26622 else if (type.equals("MedicinalProductIngredient")) 26623 return parseMedicinalProductIngredient(xpp); 26624 else if (type.equals("MedicinalProductInteraction")) 26625 return parseMedicinalProductInteraction(xpp); 26626 else if (type.equals("MedicinalProductManufactured")) 26627 return parseMedicinalProductManufactured(xpp); 26628 else if (type.equals("MedicinalProductPackaged")) 26629 return parseMedicinalProductPackaged(xpp); 26630 else if (type.equals("MedicinalProductPharmaceutical")) 26631 return parseMedicinalProductPharmaceutical(xpp); 26632 else if (type.equals("MedicinalProductUndesirableEffect")) 26633 return parseMedicinalProductUndesirableEffect(xpp); 26634 else if (type.equals("MessageDefinition")) 26635 return parseMessageDefinition(xpp); 26636 else if (type.equals("MessageHeader")) 26637 return parseMessageHeader(xpp); 26638 else if (type.equals("MolecularSequence")) 26639 return parseMolecularSequence(xpp); 26640 else if (type.equals("NamingSystem")) 26641 return parseNamingSystem(xpp); 26642 else if (type.equals("NutritionOrder")) 26643 return parseNutritionOrder(xpp); 26644 else if (type.equals("Observation")) 26645 return parseObservation(xpp); 26646 else if (type.equals("ObservationDefinition")) 26647 return parseObservationDefinition(xpp); 26648 else if (type.equals("OperationDefinition")) 26649 return parseOperationDefinition(xpp); 26650 else if (type.equals("OperationOutcome")) 26651 return parseOperationOutcome(xpp); 26652 else if (type.equals("Organization")) 26653 return parseOrganization(xpp); 26654 else if (type.equals("OrganizationAffiliation")) 26655 return parseOrganizationAffiliation(xpp); 26656 else if (type.equals("Patient")) 26657 return parsePatient(xpp); 26658 else if (type.equals("PaymentNotice")) 26659 return parsePaymentNotice(xpp); 26660 else if (type.equals("PaymentReconciliation")) 26661 return parsePaymentReconciliation(xpp); 26662 else if (type.equals("Person")) 26663 return parsePerson(xpp); 26664 else if (type.equals("PlanDefinition")) 26665 return parsePlanDefinition(xpp); 26666 else if (type.equals("Practitioner")) 26667 return parsePractitioner(xpp); 26668 else if (type.equals("PractitionerRole")) 26669 return parsePractitionerRole(xpp); 26670 else if (type.equals("Procedure")) 26671 return parseProcedure(xpp); 26672 else if (type.equals("Provenance")) 26673 return parseProvenance(xpp); 26674 else if (type.equals("Questionnaire")) 26675 return parseQuestionnaire(xpp); 26676 else if (type.equals("QuestionnaireResponse")) 26677 return parseQuestionnaireResponse(xpp); 26678 else if (type.equals("RelatedPerson")) 26679 return parseRelatedPerson(xpp); 26680 else if (type.equals("RequestGroup")) 26681 return parseRequestGroup(xpp); 26682 else if (type.equals("ResearchDefinition")) 26683 return parseResearchDefinition(xpp); 26684 else if (type.equals("ResearchElementDefinition")) 26685 return parseResearchElementDefinition(xpp); 26686 else if (type.equals("ResearchStudy")) 26687 return parseResearchStudy(xpp); 26688 else if (type.equals("ResearchSubject")) 26689 return parseResearchSubject(xpp); 26690 else if (type.equals("RiskAssessment")) 26691 return parseRiskAssessment(xpp); 26692 else if (type.equals("RiskEvidenceSynthesis")) 26693 return parseRiskEvidenceSynthesis(xpp); 26694 else if (type.equals("Schedule")) 26695 return parseSchedule(xpp); 26696 else if (type.equals("SearchParameter")) 26697 return parseSearchParameter(xpp); 26698 else if (type.equals("ServiceRequest")) 26699 return parseServiceRequest(xpp); 26700 else if (type.equals("Slot")) 26701 return parseSlot(xpp); 26702 else if (type.equals("Specimen")) 26703 return parseSpecimen(xpp); 26704 else if (type.equals("SpecimenDefinition")) 26705 return parseSpecimenDefinition(xpp); 26706 else if (type.equals("StructureDefinition")) 26707 return parseStructureDefinition(xpp); 26708 else if (type.equals("StructureMap")) 26709 return parseStructureMap(xpp); 26710 else if (type.equals("Subscription")) 26711 return parseSubscription(xpp); 26712 else if (type.equals("Substance")) 26713 return parseSubstance(xpp); 26714 else if (type.equals("SubstanceNucleicAcid")) 26715 return parseSubstanceNucleicAcid(xpp); 26716 else if (type.equals("SubstancePolymer")) 26717 return parseSubstancePolymer(xpp); 26718 else if (type.equals("SubstanceProtein")) 26719 return parseSubstanceProtein(xpp); 26720 else if (type.equals("SubstanceReferenceInformation")) 26721 return parseSubstanceReferenceInformation(xpp); 26722 else if (type.equals("SubstanceSourceMaterial")) 26723 return parseSubstanceSourceMaterial(xpp); 26724 else if (type.equals("SubstanceSpecification")) 26725 return parseSubstanceSpecification(xpp); 26726 else if (type.equals("SupplyDelivery")) 26727 return parseSupplyDelivery(xpp); 26728 else if (type.equals("SupplyRequest")) 26729 return parseSupplyRequest(xpp); 26730 else if (type.equals("Task")) 26731 return parseTask(xpp); 26732 else if (type.equals("TerminologyCapabilities")) 26733 return parseTerminologyCapabilities(xpp); 26734 else if (type.equals("TestReport")) 26735 return parseTestReport(xpp); 26736 else if (type.equals("TestScript")) 26737 return parseTestScript(xpp); 26738 else if (type.equals("ValueSet")) 26739 return parseValueSet(xpp); 26740 else if (type.equals("VerificationResult")) 26741 return parseVerificationResult(xpp); 26742 else if (type.equals("VisionPrescription")) 26743 return parseVisionPrescription(xpp); 26744 else if (type.equals("date")) 26745 return parseDate(xpp); 26746 else if (type.equals("dateTime")) 26747 return parseDateTime(xpp); 26748 else if (type.equals("code")) 26749 return parseCode(xpp); 26750 else if (type.equals("string")) 26751 return parseString(xpp); 26752 else if (type.equals("integer")) 26753 return parseInteger(xpp); 26754 else if (type.equals("oid")) 26755 return parseOid(xpp); 26756 else if (type.equals("canonical")) 26757 return parseCanonical(xpp); 26758 else if (type.equals("uri")) 26759 return parseUri(xpp); 26760 else if (type.equals("uuid")) 26761 return parseUuid(xpp); 26762 else if (type.equals("url")) 26763 return parseUrl(xpp); 26764 else if (type.equals("instant")) 26765 return parseInstant(xpp); 26766 else if (type.equals("boolean")) 26767 return parseBoolean(xpp); 26768 else if (type.equals("base64Binary")) 26769 return parseBase64Binary(xpp); 26770 else if (type.equals("unsignedInt")) 26771 return parseUnsignedInt(xpp); 26772 else if (type.equals("markdown")) 26773 return parseMarkdown(xpp); 26774 else if (type.equals("time")) 26775 return parseTime(xpp); 26776 else if (type.equals("id")) 26777 return parseId(xpp); 26778 else if (type.equals("positiveInt")) 26779 return parsePositiveInt(xpp); 26780 else if (type.equals("decimal")) 26781 return parseDecimal(xpp); 26782 throw new FHIRFormatError("Unknown type " + type); 26783 } 26784 26785 private boolean nameIsTypeName(XmlPullParser xpp, String prefix) { 26786 if (xpp.getName().equals(prefix + "Meta")) 26787 return true; 26788 if (xpp.getName().equals(prefix + "Address")) 26789 return true; 26790 if (xpp.getName().equals(prefix + "Contributor")) 26791 return true; 26792 if (xpp.getName().equals(prefix + "Attachment")) 26793 return true; 26794 if (xpp.getName().equals(prefix + "Count")) 26795 return true; 26796 if (xpp.getName().equals(prefix + "DataRequirement")) 26797 return true; 26798 if (xpp.getName().equals(prefix + "Dosage")) 26799 return true; 26800 if (xpp.getName().equals(prefix + "Money")) 26801 return true; 26802 if (xpp.getName().equals(prefix + "HumanName")) 26803 return true; 26804 if (xpp.getName().equals(prefix + "ContactPoint")) 26805 return true; 26806 if (xpp.getName().equals(prefix + "MarketingStatus")) 26807 return true; 26808 if (xpp.getName().equals(prefix + "Identifier")) 26809 return true; 26810 if (xpp.getName().equals(prefix + "SubstanceAmount")) 26811 return true; 26812 if (xpp.getName().equals(prefix + "Coding")) 26813 return true; 26814 if (xpp.getName().equals(prefix + "SampledData")) 26815 return true; 26816 if (xpp.getName().equals(prefix + "Population")) 26817 return true; 26818 if (xpp.getName().equals(prefix + "Ratio")) 26819 return true; 26820 if (xpp.getName().equals(prefix + "Distance")) 26821 return true; 26822 if (xpp.getName().equals(prefix + "Age")) 26823 return true; 26824 if (xpp.getName().equals(prefix + "Reference")) 26825 return true; 26826 if (xpp.getName().equals(prefix + "TriggerDefinition")) 26827 return true; 26828 if (xpp.getName().equals(prefix + "Quantity")) 26829 return true; 26830 if (xpp.getName().equals(prefix + "Period")) 26831 return true; 26832 if (xpp.getName().equals(prefix + "Duration")) 26833 return true; 26834 if (xpp.getName().equals(prefix + "Range")) 26835 return true; 26836 if (xpp.getName().equals(prefix + "RelatedArtifact")) 26837 return true; 26838 if (xpp.getName().equals(prefix + "Annotation")) 26839 return true; 26840 if (xpp.getName().equals(prefix + "ProductShelfLife")) 26841 return true; 26842 if (xpp.getName().equals(prefix + "ContactDetail")) 26843 return true; 26844 if (xpp.getName().equals(prefix + "UsageContext")) 26845 return true; 26846 if (xpp.getName().equals(prefix + "Expression")) 26847 return true; 26848 if (xpp.getName().equals(prefix + "Signature")) 26849 return true; 26850 if (xpp.getName().equals(prefix + "Timing")) 26851 return true; 26852 if (xpp.getName().equals(prefix + "ProdCharacteristic")) 26853 return true; 26854 if (xpp.getName().equals(prefix + "CodeableConcept")) 26855 return true; 26856 if (xpp.getName().equals(prefix + "ParameterDefinition")) 26857 return true; 26858 if (xpp.getName().equals(prefix + "Parameters")) 26859 return true; 26860 if (xpp.getName().equals(prefix + "Account")) 26861 return true; 26862 if (xpp.getName().equals(prefix + "ActivityDefinition")) 26863 return true; 26864 if (xpp.getName().equals(prefix + "AdverseEvent")) 26865 return true; 26866 if (xpp.getName().equals(prefix + "AllergyIntolerance")) 26867 return true; 26868 if (xpp.getName().equals(prefix + "Appointment")) 26869 return true; 26870 if (xpp.getName().equals(prefix + "AppointmentResponse")) 26871 return true; 26872 if (xpp.getName().equals(prefix + "AuditEvent")) 26873 return true; 26874 if (xpp.getName().equals(prefix + "Basic")) 26875 return true; 26876 if (xpp.getName().equals(prefix + "Binary")) 26877 return true; 26878 if (xpp.getName().equals(prefix + "BiologicallyDerivedProduct")) 26879 return true; 26880 if (xpp.getName().equals(prefix + "BodyStructure")) 26881 return true; 26882 if (xpp.getName().equals(prefix + "Bundle")) 26883 return true; 26884 if (xpp.getName().equals(prefix + "CapabilityStatement")) 26885 return true; 26886 if (xpp.getName().equals(prefix + "CarePlan")) 26887 return true; 26888 if (xpp.getName().equals(prefix + "CareTeam")) 26889 return true; 26890 if (xpp.getName().equals(prefix + "CatalogEntry")) 26891 return true; 26892 if (xpp.getName().equals(prefix + "ChargeItem")) 26893 return true; 26894 if (xpp.getName().equals(prefix + "ChargeItemDefinition")) 26895 return true; 26896 if (xpp.getName().equals(prefix + "Claim")) 26897 return true; 26898 if (xpp.getName().equals(prefix + "ClaimResponse")) 26899 return true; 26900 if (xpp.getName().equals(prefix + "ClinicalImpression")) 26901 return true; 26902 if (xpp.getName().equals(prefix + "CodeSystem")) 26903 return true; 26904 if (xpp.getName().equals(prefix + "Communication")) 26905 return true; 26906 if (xpp.getName().equals(prefix + "CommunicationRequest")) 26907 return true; 26908 if (xpp.getName().equals(prefix + "CompartmentDefinition")) 26909 return true; 26910 if (xpp.getName().equals(prefix + "Composition")) 26911 return true; 26912 if (xpp.getName().equals(prefix + "ConceptMap")) 26913 return true; 26914 if (xpp.getName().equals(prefix + "Condition")) 26915 return true; 26916 if (xpp.getName().equals(prefix + "Consent")) 26917 return true; 26918 if (xpp.getName().equals(prefix + "Contract")) 26919 return true; 26920 if (xpp.getName().equals(prefix + "Coverage")) 26921 return true; 26922 if (xpp.getName().equals(prefix + "CoverageEligibilityRequest")) 26923 return true; 26924 if (xpp.getName().equals(prefix + "CoverageEligibilityResponse")) 26925 return true; 26926 if (xpp.getName().equals(prefix + "DetectedIssue")) 26927 return true; 26928 if (xpp.getName().equals(prefix + "Device")) 26929 return true; 26930 if (xpp.getName().equals(prefix + "DeviceDefinition")) 26931 return true; 26932 if (xpp.getName().equals(prefix + "DeviceMetric")) 26933 return true; 26934 if (xpp.getName().equals(prefix + "DeviceRequest")) 26935 return true; 26936 if (xpp.getName().equals(prefix + "DeviceUseStatement")) 26937 return true; 26938 if (xpp.getName().equals(prefix + "DiagnosticReport")) 26939 return true; 26940 if (xpp.getName().equals(prefix + "DocumentManifest")) 26941 return true; 26942 if (xpp.getName().equals(prefix + "DocumentReference")) 26943 return true; 26944 if (xpp.getName().equals(prefix + "EffectEvidenceSynthesis")) 26945 return true; 26946 if (xpp.getName().equals(prefix + "Encounter")) 26947 return true; 26948 if (xpp.getName().equals(prefix + "Endpoint")) 26949 return true; 26950 if (xpp.getName().equals(prefix + "EnrollmentRequest")) 26951 return true; 26952 if (xpp.getName().equals(prefix + "EnrollmentResponse")) 26953 return true; 26954 if (xpp.getName().equals(prefix + "EpisodeOfCare")) 26955 return true; 26956 if (xpp.getName().equals(prefix + "EventDefinition")) 26957 return true; 26958 if (xpp.getName().equals(prefix + "Evidence")) 26959 return true; 26960 if (xpp.getName().equals(prefix + "EvidenceVariable")) 26961 return true; 26962 if (xpp.getName().equals(prefix + "ExampleScenario")) 26963 return true; 26964 if (xpp.getName().equals(prefix + "ExplanationOfBenefit")) 26965 return true; 26966 if (xpp.getName().equals(prefix + "FamilyMemberHistory")) 26967 return true; 26968 if (xpp.getName().equals(prefix + "Flag")) 26969 return true; 26970 if (xpp.getName().equals(prefix + "Goal")) 26971 return true; 26972 if (xpp.getName().equals(prefix + "GraphDefinition")) 26973 return true; 26974 if (xpp.getName().equals(prefix + "Group")) 26975 return true; 26976 if (xpp.getName().equals(prefix + "GuidanceResponse")) 26977 return true; 26978 if (xpp.getName().equals(prefix + "HealthcareService")) 26979 return true; 26980 if (xpp.getName().equals(prefix + "ImagingStudy")) 26981 return true; 26982 if (xpp.getName().equals(prefix + "Immunization")) 26983 return true; 26984 if (xpp.getName().equals(prefix + "ImmunizationEvaluation")) 26985 return true; 26986 if (xpp.getName().equals(prefix + "ImmunizationRecommendation")) 26987 return true; 26988 if (xpp.getName().equals(prefix + "ImplementationGuide")) 26989 return true; 26990 if (xpp.getName().equals(prefix + "InsurancePlan")) 26991 return true; 26992 if (xpp.getName().equals(prefix + "Invoice")) 26993 return true; 26994 if (xpp.getName().equals(prefix + "Library")) 26995 return true; 26996 if (xpp.getName().equals(prefix + "Linkage")) 26997 return true; 26998 if (xpp.getName().equals(prefix + "List")) 26999 return true; 27000 if (xpp.getName().equals(prefix + "Location")) 27001 return true; 27002 if (xpp.getName().equals(prefix + "Measure")) 27003 return true; 27004 if (xpp.getName().equals(prefix + "MeasureReport")) 27005 return true; 27006 if (xpp.getName().equals(prefix + "Media")) 27007 return true; 27008 if (xpp.getName().equals(prefix + "Medication")) 27009 return true; 27010 if (xpp.getName().equals(prefix + "MedicationAdministration")) 27011 return true; 27012 if (xpp.getName().equals(prefix + "MedicationDispense")) 27013 return true; 27014 if (xpp.getName().equals(prefix + "MedicationKnowledge")) 27015 return true; 27016 if (xpp.getName().equals(prefix + "MedicationRequest")) 27017 return true; 27018 if (xpp.getName().equals(prefix + "MedicationStatement")) 27019 return true; 27020 if (xpp.getName().equals(prefix + "MedicinalProduct")) 27021 return true; 27022 if (xpp.getName().equals(prefix + "MedicinalProductAuthorization")) 27023 return true; 27024 if (xpp.getName().equals(prefix + "MedicinalProductContraindication")) 27025 return true; 27026 if (xpp.getName().equals(prefix + "MedicinalProductIndication")) 27027 return true; 27028 if (xpp.getName().equals(prefix + "MedicinalProductIngredient")) 27029 return true; 27030 if (xpp.getName().equals(prefix + "MedicinalProductInteraction")) 27031 return true; 27032 if (xpp.getName().equals(prefix + "MedicinalProductManufactured")) 27033 return true; 27034 if (xpp.getName().equals(prefix + "MedicinalProductPackaged")) 27035 return true; 27036 if (xpp.getName().equals(prefix + "MedicinalProductPharmaceutical")) 27037 return true; 27038 if (xpp.getName().equals(prefix + "MedicinalProductUndesirableEffect")) 27039 return true; 27040 if (xpp.getName().equals(prefix + "MessageDefinition")) 27041 return true; 27042 if (xpp.getName().equals(prefix + "MessageHeader")) 27043 return true; 27044 if (xpp.getName().equals(prefix + "MolecularSequence")) 27045 return true; 27046 if (xpp.getName().equals(prefix + "NamingSystem")) 27047 return true; 27048 if (xpp.getName().equals(prefix + "NutritionOrder")) 27049 return true; 27050 if (xpp.getName().equals(prefix + "Observation")) 27051 return true; 27052 if (xpp.getName().equals(prefix + "ObservationDefinition")) 27053 return true; 27054 if (xpp.getName().equals(prefix + "OperationDefinition")) 27055 return true; 27056 if (xpp.getName().equals(prefix + "OperationOutcome")) 27057 return true; 27058 if (xpp.getName().equals(prefix + "Organization")) 27059 return true; 27060 if (xpp.getName().equals(prefix + "OrganizationAffiliation")) 27061 return true; 27062 if (xpp.getName().equals(prefix + "Patient")) 27063 return true; 27064 if (xpp.getName().equals(prefix + "PaymentNotice")) 27065 return true; 27066 if (xpp.getName().equals(prefix + "PaymentReconciliation")) 27067 return true; 27068 if (xpp.getName().equals(prefix + "Person")) 27069 return true; 27070 if (xpp.getName().equals(prefix + "PlanDefinition")) 27071 return true; 27072 if (xpp.getName().equals(prefix + "Practitioner")) 27073 return true; 27074 if (xpp.getName().equals(prefix + "PractitionerRole")) 27075 return true; 27076 if (xpp.getName().equals(prefix + "Procedure")) 27077 return true; 27078 if (xpp.getName().equals(prefix + "Provenance")) 27079 return true; 27080 if (xpp.getName().equals(prefix + "Questionnaire")) 27081 return true; 27082 if (xpp.getName().equals(prefix + "QuestionnaireResponse")) 27083 return true; 27084 if (xpp.getName().equals(prefix + "RelatedPerson")) 27085 return true; 27086 if (xpp.getName().equals(prefix + "RequestGroup")) 27087 return true; 27088 if (xpp.getName().equals(prefix + "ResearchDefinition")) 27089 return true; 27090 if (xpp.getName().equals(prefix + "ResearchElementDefinition")) 27091 return true; 27092 if (xpp.getName().equals(prefix + "ResearchStudy")) 27093 return true; 27094 if (xpp.getName().equals(prefix + "ResearchSubject")) 27095 return true; 27096 if (xpp.getName().equals(prefix + "RiskAssessment")) 27097 return true; 27098 if (xpp.getName().equals(prefix + "RiskEvidenceSynthesis")) 27099 return true; 27100 if (xpp.getName().equals(prefix + "Schedule")) 27101 return true; 27102 if (xpp.getName().equals(prefix + "SearchParameter")) 27103 return true; 27104 if (xpp.getName().equals(prefix + "ServiceRequest")) 27105 return true; 27106 if (xpp.getName().equals(prefix + "Slot")) 27107 return true; 27108 if (xpp.getName().equals(prefix + "Specimen")) 27109 return true; 27110 if (xpp.getName().equals(prefix + "SpecimenDefinition")) 27111 return true; 27112 if (xpp.getName().equals(prefix + "StructureDefinition")) 27113 return true; 27114 if (xpp.getName().equals(prefix + "StructureMap")) 27115 return true; 27116 if (xpp.getName().equals(prefix + "Subscription")) 27117 return true; 27118 if (xpp.getName().equals(prefix + "Substance")) 27119 return true; 27120 if (xpp.getName().equals(prefix + "SubstanceNucleicAcid")) 27121 return true; 27122 if (xpp.getName().equals(prefix + "SubstancePolymer")) 27123 return true; 27124 if (xpp.getName().equals(prefix + "SubstanceProtein")) 27125 return true; 27126 if (xpp.getName().equals(prefix + "SubstanceReferenceInformation")) 27127 return true; 27128 if (xpp.getName().equals(prefix + "SubstanceSourceMaterial")) 27129 return true; 27130 if (xpp.getName().equals(prefix + "SubstanceSpecification")) 27131 return true; 27132 if (xpp.getName().equals(prefix + "SupplyDelivery")) 27133 return true; 27134 if (xpp.getName().equals(prefix + "SupplyRequest")) 27135 return true; 27136 if (xpp.getName().equals(prefix + "Task")) 27137 return true; 27138 if (xpp.getName().equals(prefix + "TerminologyCapabilities")) 27139 return true; 27140 if (xpp.getName().equals(prefix + "TestReport")) 27141 return true; 27142 if (xpp.getName().equals(prefix + "TestScript")) 27143 return true; 27144 if (xpp.getName().equals(prefix + "ValueSet")) 27145 return true; 27146 if (xpp.getName().equals(prefix + "VerificationResult")) 27147 return true; 27148 if (xpp.getName().equals(prefix + "VisionPrescription")) 27149 return true; 27150 if (xpp.getName().equals(prefix + "Date")) 27151 return true; 27152 if (xpp.getName().equals(prefix + "DateTime")) 27153 return true; 27154 if (xpp.getName().equals(prefix + "Code")) 27155 return true; 27156 if (xpp.getName().equals(prefix + "String")) 27157 return true; 27158 if (xpp.getName().equals(prefix + "Integer")) 27159 return true; 27160 if (xpp.getName().equals(prefix + "Oid")) 27161 return true; 27162 if (xpp.getName().equals(prefix + "Canonical")) 27163 return true; 27164 if (xpp.getName().equals(prefix + "Uri")) 27165 return true; 27166 if (xpp.getName().equals(prefix + "Uuid")) 27167 return true; 27168 if (xpp.getName().equals(prefix + "Url")) 27169 return true; 27170 if (xpp.getName().equals(prefix + "Instant")) 27171 return true; 27172 if (xpp.getName().equals(prefix + "Boolean")) 27173 return true; 27174 if (xpp.getName().equals(prefix + "Base64Binary")) 27175 return true; 27176 if (xpp.getName().equals(prefix + "UnsignedInt")) 27177 return true; 27178 if (xpp.getName().equals(prefix + "Markdown")) 27179 return true; 27180 if (xpp.getName().equals(prefix + "Time")) 27181 return true; 27182 if (xpp.getName().equals(prefix + "Id")) 27183 return true; 27184 if (xpp.getName().equals(prefix + "PositiveInt")) 27185 return true; 27186 if (xpp.getName().equals(prefix + "Decimal")) 27187 return true; 27188 return false; 27189 } 27190 27191 @Override 27192 protected Type parseAnyType(XmlPullParser xpp, String type) 27193 throws XmlPullParserException, IOException, FHIRFormatError { 27194 if (type.equals("ElementDefinition")) 27195 return parseElementDefinition(xpp); 27196 else if (type.equals("DataRequirement")) 27197 return parseDataRequirement(xpp); 27198 else 27199 return parseType(xpp, type); 27200 } 27201 27202 protected void composeElementElements(Element element) throws IOException { 27203 for (Extension e : element.getExtension()) { 27204 composeExtension("extension", e); 27205 } 27206 } 27207 27208 protected void composeBackboneElementElements(BackboneElement element) throws IOException { 27209 composeElementElements(element); 27210 for (Extension e : element.getModifierExtension()) { 27211 composeExtension("modifierExtension", e); 27212 } 27213 } 27214 27215 protected void composeBackboneElementElements(BackboneType element) throws IOException { 27216 composeElementElements(element); 27217 for (Extension e : element.getModifierExtension()) { 27218 composeExtension("modifierExtension", e); 27219 } 27220 } 27221 27222 protected <E extends Enum<E>> void composeEnumeration(String name, Enumeration<E> value, EnumFactory e) 27223 throws IOException { 27224 if (value != null 27225 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) { 27226 composeElementAttributes(value); 27227 if (value.getValue() != null) 27228 xml.attribute("value", e.toCode(value.getValue())); 27229 27230 xml.enter(FHIR_NS, name); 27231 composeElementElements(value); 27232 composeElementClose(value); 27233 xml.exit(FHIR_NS, name); 27234 } 27235 } 27236 27237 protected void composeDate(String name, DateType value) throws IOException { 27238 if (value != null 27239 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// date 27240 composeElementAttributes(value); 27241 if (value.asStringValue() != null) 27242 xml.attribute("value", value.asStringValue()); 27243 27244 xml.enter(FHIR_NS, name); 27245 composeElementElements(value); 27246 composeElementClose(value); 27247 xml.exit(FHIR_NS, name); 27248 } 27249 } 27250 27251 protected void composeDateTime(String name, DateTimeType value) throws IOException { 27252 if (value != null 27253 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// dateTime 27254 composeElementAttributes(value); 27255 if (value.asStringValue() != null) 27256 xml.attribute("value", value.asStringValue()); 27257 27258 xml.enter(FHIR_NS, name); 27259 composeElementElements(value); 27260 composeElementClose(value); 27261 xml.exit(FHIR_NS, name); 27262 } 27263 } 27264 27265 protected void composeCode(String name, CodeType value) throws IOException { 27266 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27267 || !Utilities.noString(value.getValue()))) {// code 27268 composeElementAttributes(value); 27269 if (value.asStringValue() != null) 27270 xml.attribute("value", value.asStringValue()); 27271 27272 xml.enter(FHIR_NS, name); 27273 composeElementElements(value); 27274 composeElementClose(value); 27275 xml.exit(FHIR_NS, name); 27276 } 27277 } 27278 27279 protected void composeString(String name, StringType value) throws IOException { 27280 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27281 || !Utilities.noString(value.getValue()))) {// string 27282 composeElementAttributes(value); 27283 if (value.asStringValue() != null) 27284 xml.attribute("value", value.asStringValue()); 27285 27286 xml.enter(FHIR_NS, name); 27287 composeElementElements(value); 27288 composeElementClose(value); 27289 xml.exit(FHIR_NS, name); 27290 } 27291 } 27292 27293 protected void composeInteger(String name, IntegerType value) throws IOException { 27294 if (value != null) { // integer 27295 composeElementAttributes(value); 27296 if (value.asStringValue() != null) 27297 xml.attribute("value", value.asStringValue()); 27298 27299 xml.enter(FHIR_NS, name); 27300 composeElementElements(value); 27301 composeElementClose(value); 27302 xml.exit(FHIR_NS, name); 27303 } 27304 } 27305 27306 protected void composeOid(String name, OidType value) throws IOException { 27307 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27308 || !Utilities.noString(value.getValue()))) {// oid 27309 composeElementAttributes(value); 27310 if (value.asStringValue() != null) 27311 xml.attribute("value", value.asStringValue()); 27312 27313 xml.enter(FHIR_NS, name); 27314 composeElementElements(value); 27315 composeElementClose(value); 27316 xml.exit(FHIR_NS, name); 27317 } 27318 } 27319 27320 protected void composeCanonical(String name, CanonicalType value) throws IOException { 27321 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27322 || !Utilities.noString(value.getValue()))) {// canonical 27323 composeElementAttributes(value); 27324 if (value.asStringValue() != null) 27325 xml.attribute("value", value.asStringValue()); 27326 27327 xml.enter(FHIR_NS, name); 27328 composeElementElements(value); 27329 composeElementClose(value); 27330 xml.exit(FHIR_NS, name); 27331 } 27332 } 27333 27334 protected void composeUri(String name, UriType value) throws IOException { 27335 if (value != null 27336 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// uri 27337 composeElementAttributes(value); 27338 if (value.asStringValue() != null) 27339 xml.attribute("value", value.asStringValue()); 27340 27341 xml.enter(FHIR_NS, name); 27342 composeElementElements(value); 27343 composeElementClose(value); 27344 xml.exit(FHIR_NS, name); 27345 } 27346 } 27347 27348 protected void composeUuid(String name, UuidType value) throws IOException { 27349 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27350 || !Utilities.noString(value.getValue()))) {// uuid 27351 composeElementAttributes(value); 27352 if (value.asStringValue() != null) 27353 xml.attribute("value", value.asStringValue()); 27354 27355 xml.enter(FHIR_NS, name); 27356 composeElementElements(value); 27357 composeElementClose(value); 27358 xml.exit(FHIR_NS, name); 27359 } 27360 } 27361 27362 protected void composeUrl(String name, UrlType value) throws IOException { 27363 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27364 || !Utilities.noString(value.getValue()))) {// url 27365 composeElementAttributes(value); 27366 if (value.asStringValue() != null) 27367 xml.attribute("value", value.asStringValue()); 27368 27369 xml.enter(FHIR_NS, name); 27370 composeElementElements(value); 27371 composeElementClose(value); 27372 xml.exit(FHIR_NS, name); 27373 } 27374 } 27375 27376 protected void composeInstant(String name, InstantType value) throws IOException { 27377 if (value != null 27378 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// instant 27379 composeElementAttributes(value); 27380 if (value.asStringValue() != null) 27381 xml.attribute("value", value.asStringValue()); 27382 27383 xml.enter(FHIR_NS, name); 27384 composeElementElements(value); 27385 composeElementClose(value); 27386 xml.exit(FHIR_NS, name); 27387 } 27388 } 27389 27390 protected void composeBoolean(String name, BooleanType value) throws IOException { 27391 if (value != null) { // boolean 27392 composeElementAttributes(value); 27393 if (value.asStringValue() != null) 27394 xml.attribute("value", value.asStringValue()); 27395 27396 xml.enter(FHIR_NS, name); 27397 composeElementElements(value); 27398 composeElementClose(value); 27399 xml.exit(FHIR_NS, name); 27400 } 27401 } 27402 27403 protected void composeBase64Binary(String name, Base64BinaryType value) throws IOException { 27404 if (value != null 27405 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// base64Binary 27406 composeElementAttributes(value); 27407 if (value.asStringValue() != null) 27408 xml.attribute("value", value.asStringValue()); 27409 27410 xml.enter(FHIR_NS, name); 27411 composeElementElements(value); 27412 composeElementClose(value); 27413 xml.exit(FHIR_NS, name); 27414 } 27415 } 27416 27417 protected void composeUnsignedInt(String name, UnsignedIntType value) throws IOException { 27418 if (value != null) { // unsignedInt 27419 composeElementAttributes(value); 27420 if (value.asStringValue() != null) 27421 xml.attribute("value", value.asStringValue()); 27422 27423 xml.enter(FHIR_NS, name); 27424 composeElementElements(value); 27425 composeElementClose(value); 27426 xml.exit(FHIR_NS, name); 27427 } 27428 } 27429 27430 protected void composeMarkdown(String name, MarkdownType value) throws IOException { 27431 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27432 || !Utilities.noString(value.getValue()))) {// markdown 27433 composeElementAttributes(value); 27434 if (value.asStringValue() != null) 27435 xml.attribute("value", value.asStringValue()); 27436 27437 xml.enter(FHIR_NS, name); 27438 composeElementElements(value); 27439 composeElementClose(value); 27440 xml.exit(FHIR_NS, name); 27441 } 27442 } 27443 27444 protected void composeTime(String name, TimeType value) throws IOException { 27445 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27446 || !Utilities.noString(value.getValue()))) {// time 27447 composeElementAttributes(value); 27448 if (value.asStringValue() != null) 27449 xml.attribute("value", value.asStringValue()); 27450 27451 xml.enter(FHIR_NS, name); 27452 composeElementElements(value); 27453 composeElementClose(value); 27454 xml.exit(FHIR_NS, name); 27455 } 27456 } 27457 27458 protected void composeId(String name, IdType value) throws IOException { 27459 if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) 27460 || !Utilities.noString(value.getValue()))) {// id 27461 composeElementAttributes(value); 27462 if (value.asStringValue() != null) 27463 xml.attribute("value", value.asStringValue()); 27464 27465 xml.enter(FHIR_NS, name); 27466 composeElementElements(value); 27467 composeElementClose(value); 27468 xml.exit(FHIR_NS, name); 27469 } 27470 } 27471 27472 protected void composePositiveInt(String name, PositiveIntType value) throws IOException { 27473 if (value != null) { // positiveInt 27474 composeElementAttributes(value); 27475 if (value.asStringValue() != null) 27476 xml.attribute("value", value.asStringValue()); 27477 27478 xml.enter(FHIR_NS, name); 27479 composeElementElements(value); 27480 composeElementClose(value); 27481 xml.exit(FHIR_NS, name); 27482 } 27483 } 27484 27485 protected void composeDecimal(String name, DecimalType value) throws IOException { 27486 if (value != null 27487 && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || value.getValue() != null)) {// decimal 27488 composeElementAttributes(value); 27489 if (value.asStringValue() != null) 27490 xml.attribute("value", value.asStringValue()); 27491 27492 xml.enter(FHIR_NS, name); 27493 composeElementElements(value); 27494 composeElementClose(value); 27495 xml.exit(FHIR_NS, name); 27496 } 27497 } 27498 27499 protected void composeExtension(String name, Extension element) throws IOException { 27500 if (element != null) { 27501 composeElementAttributes(element); 27502 if (element.hasUrlElement()) 27503 xml.attribute("url", element.getUrlElement().getValue()); 27504 xml.enter(FHIR_NS, name); 27505 composeExtensionElements(element); 27506 composeElementClose(element); 27507 xml.exit(FHIR_NS, name); 27508 } 27509 } 27510 27511 protected void composeExtensionElements(Extension element) throws IOException { 27512 composeElementElements(element); 27513 if (element.hasValue()) { 27514 composeType("value", element.getValue()); 27515 } 27516 } 27517 27518 protected void composeNarrative(String name, Narrative element) throws IOException { 27519 if (element != null) { 27520 composeElementAttributes(element); 27521 xml.enter(FHIR_NS, name); 27522 composeNarrativeElements(element); 27523 composeElementClose(element); 27524 xml.exit(FHIR_NS, name); 27525 } 27526 } 27527 27528 protected void composeNarrativeElements(Narrative element) throws IOException { 27529 composeElementElements(element); 27530 if (element.hasStatusElement()) 27531 composeEnumeration("status", element.getStatusElement(), new Narrative.NarrativeStatusEnumFactory()); 27532 if (element.hasDiv()) { 27533 composeXhtml("div", element.getDiv()); 27534 } 27535 } 27536 27537 protected void composeCount(String name, Count element) throws IOException { 27538 if (element != null) { 27539 composeTypeAttributes(element); 27540 xml.enter(FHIR_NS, name); 27541 composeCountElements(element); 27542 composeElementClose(element); 27543 xml.exit(FHIR_NS, name); 27544 } 27545 } 27546 27547 protected void composeCountElements(Count element) throws IOException { 27548 composeQuantityElements(element); 27549 } 27550 27551 protected void composeDosage(String name, Dosage element) throws IOException { 27552 if (element != null) { 27553 composeTypeAttributes(element); 27554 xml.enter(FHIR_NS, name); 27555 composeDosageElements(element); 27556 composeElementClose(element); 27557 xml.exit(FHIR_NS, name); 27558 } 27559 } 27560 27561 protected void composeDosageElements(Dosage element) throws IOException { 27562 composeBackboneElementElements(element); 27563 if (element.hasSequenceElement()) { 27564 composeInteger("sequence", element.getSequenceElement()); 27565 } 27566 if (element.hasTextElement()) { 27567 composeString("text", element.getTextElement()); 27568 } 27569 if (element.hasAdditionalInstruction()) { 27570 for (CodeableConcept e : element.getAdditionalInstruction()) 27571 composeCodeableConcept("additionalInstruction", e); 27572 } 27573 if (element.hasPatientInstructionElement()) { 27574 composeString("patientInstruction", element.getPatientInstructionElement()); 27575 } 27576 if (element.hasTiming()) { 27577 composeTiming("timing", element.getTiming()); 27578 } 27579 if (element.hasAsNeeded()) { 27580 composeType("asNeeded", element.getAsNeeded()); 27581 } 27582 if (element.hasSite()) { 27583 composeCodeableConcept("site", element.getSite()); 27584 } 27585 if (element.hasRoute()) { 27586 composeCodeableConcept("route", element.getRoute()); 27587 } 27588 if (element.hasMethod()) { 27589 composeCodeableConcept("method", element.getMethod()); 27590 } 27591 if (element.hasDoseAndRate()) { 27592 for (Dosage.DosageDoseAndRateComponent e : element.getDoseAndRate()) 27593 composeDosageDosageDoseAndRateComponent("doseAndRate", e); 27594 } 27595 if (element.hasMaxDosePerPeriod()) { 27596 composeRatio("maxDosePerPeriod", element.getMaxDosePerPeriod()); 27597 } 27598 if (element.hasMaxDosePerAdministration()) { 27599 composeQuantity("maxDosePerAdministration", element.getMaxDosePerAdministration()); 27600 } 27601 if (element.hasMaxDosePerLifetime()) { 27602 composeQuantity("maxDosePerLifetime", element.getMaxDosePerLifetime()); 27603 } 27604 } 27605 27606 protected void composeDosageDosageDoseAndRateComponent(String name, Dosage.DosageDoseAndRateComponent element) 27607 throws IOException { 27608 if (element != null) { 27609 composeElementAttributes(element); 27610 xml.enter(FHIR_NS, name); 27611 composeDosageDosageDoseAndRateComponentElements(element); 27612 composeElementClose(element); 27613 xml.exit(FHIR_NS, name); 27614 } 27615 } 27616 27617 protected void composeDosageDosageDoseAndRateComponentElements(Dosage.DosageDoseAndRateComponent element) 27618 throws IOException { 27619 composeElementElements(element); 27620 if (element.hasType()) { 27621 composeCodeableConcept("type", element.getType()); 27622 } 27623 if (element.hasDose()) { 27624 composeType("dose", element.getDose()); 27625 } 27626 if (element.hasRate()) { 27627 composeType("rate", element.getRate()); 27628 } 27629 } 27630 27631 protected void composeMarketingStatus(String name, MarketingStatus element) throws IOException { 27632 if (element != null) { 27633 composeTypeAttributes(element); 27634 xml.enter(FHIR_NS, name); 27635 composeMarketingStatusElements(element); 27636 composeElementClose(element); 27637 xml.exit(FHIR_NS, name); 27638 } 27639 } 27640 27641 protected void composeMarketingStatusElements(MarketingStatus element) throws IOException { 27642 composeBackboneElementElements(element); 27643 if (element.hasCountry()) { 27644 composeCodeableConcept("country", element.getCountry()); 27645 } 27646 if (element.hasJurisdiction()) { 27647 composeCodeableConcept("jurisdiction", element.getJurisdiction()); 27648 } 27649 if (element.hasStatus()) { 27650 composeCodeableConcept("status", element.getStatus()); 27651 } 27652 if (element.hasDateRange()) { 27653 composePeriod("dateRange", element.getDateRange()); 27654 } 27655 if (element.hasRestoreDateElement()) { 27656 composeDateTime("restoreDate", element.getRestoreDateElement()); 27657 } 27658 } 27659 27660 protected void composeSubstanceAmount(String name, SubstanceAmount element) throws IOException { 27661 if (element != null) { 27662 composeTypeAttributes(element); 27663 xml.enter(FHIR_NS, name); 27664 composeSubstanceAmountElements(element); 27665 composeElementClose(element); 27666 xml.exit(FHIR_NS, name); 27667 } 27668 } 27669 27670 protected void composeSubstanceAmountElements(SubstanceAmount element) throws IOException { 27671 composeBackboneElementElements(element); 27672 if (element.hasAmount()) { 27673 composeType("amount", element.getAmount()); 27674 } 27675 if (element.hasAmountType()) { 27676 composeCodeableConcept("amountType", element.getAmountType()); 27677 } 27678 if (element.hasAmountTextElement()) { 27679 composeString("amountText", element.getAmountTextElement()); 27680 } 27681 if (element.hasReferenceRange()) { 27682 composeSubstanceAmountSubstanceAmountReferenceRangeComponent("referenceRange", element.getReferenceRange()); 27683 } 27684 } 27685 27686 protected void composeSubstanceAmountSubstanceAmountReferenceRangeComponent(String name, 27687 SubstanceAmount.SubstanceAmountReferenceRangeComponent element) throws IOException { 27688 if (element != null) { 27689 composeElementAttributes(element); 27690 xml.enter(FHIR_NS, name); 27691 composeSubstanceAmountSubstanceAmountReferenceRangeComponentElements(element); 27692 composeElementClose(element); 27693 xml.exit(FHIR_NS, name); 27694 } 27695 } 27696 27697 protected void composeSubstanceAmountSubstanceAmountReferenceRangeComponentElements( 27698 SubstanceAmount.SubstanceAmountReferenceRangeComponent element) throws IOException { 27699 composeElementElements(element); 27700 if (element.hasLowLimit()) { 27701 composeQuantity("lowLimit", element.getLowLimit()); 27702 } 27703 if (element.hasHighLimit()) { 27704 composeQuantity("highLimit", element.getHighLimit()); 27705 } 27706 } 27707 27708 protected void composePopulation(String name, Population element) throws IOException { 27709 if (element != null) { 27710 composeTypeAttributes(element); 27711 xml.enter(FHIR_NS, name); 27712 composePopulationElements(element); 27713 composeElementClose(element); 27714 xml.exit(FHIR_NS, name); 27715 } 27716 } 27717 27718 protected void composePopulationElements(Population element) throws IOException { 27719 composeBackboneElementElements(element); 27720 if (element.hasAge()) { 27721 composeType("age", element.getAge()); 27722 } 27723 if (element.hasGender()) { 27724 composeCodeableConcept("gender", element.getGender()); 27725 } 27726 if (element.hasRace()) { 27727 composeCodeableConcept("race", element.getRace()); 27728 } 27729 if (element.hasPhysiologicalCondition()) { 27730 composeCodeableConcept("physiologicalCondition", element.getPhysiologicalCondition()); 27731 } 27732 } 27733 27734 protected void composeDistance(String name, Distance element) throws IOException { 27735 if (element != null) { 27736 composeTypeAttributes(element); 27737 xml.enter(FHIR_NS, name); 27738 composeDistanceElements(element); 27739 composeElementClose(element); 27740 xml.exit(FHIR_NS, name); 27741 } 27742 } 27743 27744 protected void composeDistanceElements(Distance element) throws IOException { 27745 composeQuantityElements(element); 27746 } 27747 27748 protected void composeAge(String name, Age element) throws IOException { 27749 if (element != null) { 27750 composeTypeAttributes(element); 27751 xml.enter(FHIR_NS, name); 27752 composeAgeElements(element); 27753 composeElementClose(element); 27754 xml.exit(FHIR_NS, name); 27755 } 27756 } 27757 27758 protected void composeAgeElements(Age element) throws IOException { 27759 composeQuantityElements(element); 27760 } 27761 27762 protected void composeDuration(String name, Duration element) throws IOException { 27763 if (element != null) { 27764 composeTypeAttributes(element); 27765 xml.enter(FHIR_NS, name); 27766 composeDurationElements(element); 27767 composeElementClose(element); 27768 xml.exit(FHIR_NS, name); 27769 } 27770 } 27771 27772 protected void composeDurationElements(Duration element) throws IOException { 27773 composeQuantityElements(element); 27774 } 27775 27776 protected void composeProductShelfLife(String name, ProductShelfLife element) throws IOException { 27777 if (element != null) { 27778 composeTypeAttributes(element); 27779 xml.enter(FHIR_NS, name); 27780 composeProductShelfLifeElements(element); 27781 composeElementClose(element); 27782 xml.exit(FHIR_NS, name); 27783 } 27784 } 27785 27786 protected void composeProductShelfLifeElements(ProductShelfLife element) throws IOException { 27787 composeBackboneElementElements(element); 27788 if (element.hasIdentifier()) { 27789 composeIdentifier("identifier", element.getIdentifier()); 27790 } 27791 if (element.hasType()) { 27792 composeCodeableConcept("type", element.getType()); 27793 } 27794 if (element.hasPeriod()) { 27795 composeQuantity("period", element.getPeriod()); 27796 } 27797 if (element.hasSpecialPrecautionsForStorage()) { 27798 for (CodeableConcept e : element.getSpecialPrecautionsForStorage()) 27799 composeCodeableConcept("specialPrecautionsForStorage", e); 27800 } 27801 } 27802 27803 protected void composeTiming(String name, Timing element) throws IOException { 27804 if (element != null) { 27805 composeTypeAttributes(element); 27806 xml.enter(FHIR_NS, name); 27807 composeTimingElements(element); 27808 composeElementClose(element); 27809 xml.exit(FHIR_NS, name); 27810 } 27811 } 27812 27813 protected void composeTimingElements(Timing element) throws IOException { 27814 composeBackboneElementElements(element); 27815 if (element.hasEvent()) { 27816 for (DateTimeType e : element.getEvent()) 27817 composeDateTime("event", e); 27818 } 27819 if (element.hasRepeat()) { 27820 composeTimingTimingRepeatComponent("repeat", element.getRepeat()); 27821 } 27822 if (element.hasCode()) { 27823 composeCodeableConcept("code", element.getCode()); 27824 } 27825 } 27826 27827 protected void composeTimingTimingRepeatComponent(String name, Timing.TimingRepeatComponent element) 27828 throws IOException { 27829 if (element != null) { 27830 composeElementAttributes(element); 27831 xml.enter(FHIR_NS, name); 27832 composeTimingTimingRepeatComponentElements(element); 27833 composeElementClose(element); 27834 xml.exit(FHIR_NS, name); 27835 } 27836 } 27837 27838 protected void composeTimingTimingRepeatComponentElements(Timing.TimingRepeatComponent element) throws IOException { 27839 composeElementElements(element); 27840 if (element.hasBounds()) { 27841 composeType("bounds", element.getBounds()); 27842 } 27843 if (element.hasCountElement()) { 27844 composePositiveInt("count", element.getCountElement()); 27845 } 27846 if (element.hasCountMaxElement()) { 27847 composePositiveInt("countMax", element.getCountMaxElement()); 27848 } 27849 if (element.hasDurationElement()) { 27850 composeDecimal("duration", element.getDurationElement()); 27851 } 27852 if (element.hasDurationMaxElement()) { 27853 composeDecimal("durationMax", element.getDurationMaxElement()); 27854 } 27855 if (element.hasDurationUnitElement()) 27856 composeEnumeration("durationUnit", element.getDurationUnitElement(), new Timing.UnitsOfTimeEnumFactory()); 27857 if (element.hasFrequencyElement()) { 27858 composePositiveInt("frequency", element.getFrequencyElement()); 27859 } 27860 if (element.hasFrequencyMaxElement()) { 27861 composePositiveInt("frequencyMax", element.getFrequencyMaxElement()); 27862 } 27863 if (element.hasPeriodElement()) { 27864 composeDecimal("period", element.getPeriodElement()); 27865 } 27866 if (element.hasPeriodMaxElement()) { 27867 composeDecimal("periodMax", element.getPeriodMaxElement()); 27868 } 27869 if (element.hasPeriodUnitElement()) 27870 composeEnumeration("periodUnit", element.getPeriodUnitElement(), new Timing.UnitsOfTimeEnumFactory()); 27871 if (element.hasDayOfWeek()) 27872 for (Enumeration<Timing.DayOfWeek> e : element.getDayOfWeek()) 27873 composeEnumeration("dayOfWeek", e, new Timing.DayOfWeekEnumFactory()); 27874 if (element.hasTimeOfDay()) { 27875 for (TimeType e : element.getTimeOfDay()) 27876 composeTime("timeOfDay", e); 27877 } 27878 if (element.hasWhen()) 27879 for (Enumeration<Timing.EventTiming> e : element.getWhen()) 27880 composeEnumeration("when", e, new Timing.EventTimingEnumFactory()); 27881 if (element.hasOffsetElement()) { 27882 composeUnsignedInt("offset", element.getOffsetElement()); 27883 } 27884 } 27885 27886 protected void composeProdCharacteristic(String name, ProdCharacteristic element) throws IOException { 27887 if (element != null) { 27888 composeTypeAttributes(element); 27889 xml.enter(FHIR_NS, name); 27890 composeProdCharacteristicElements(element); 27891 composeElementClose(element); 27892 xml.exit(FHIR_NS, name); 27893 } 27894 } 27895 27896 protected void composeProdCharacteristicElements(ProdCharacteristic element) throws IOException { 27897 composeBackboneElementElements(element); 27898 if (element.hasHeight()) { 27899 composeQuantity("height", element.getHeight()); 27900 } 27901 if (element.hasWidth()) { 27902 composeQuantity("width", element.getWidth()); 27903 } 27904 if (element.hasDepth()) { 27905 composeQuantity("depth", element.getDepth()); 27906 } 27907 if (element.hasWeight()) { 27908 composeQuantity("weight", element.getWeight()); 27909 } 27910 if (element.hasNominalVolume()) { 27911 composeQuantity("nominalVolume", element.getNominalVolume()); 27912 } 27913 if (element.hasExternalDiameter()) { 27914 composeQuantity("externalDiameter", element.getExternalDiameter()); 27915 } 27916 if (element.hasShapeElement()) { 27917 composeString("shape", element.getShapeElement()); 27918 } 27919 if (element.hasColor()) { 27920 for (StringType e : element.getColor()) 27921 composeString("color", e); 27922 } 27923 if (element.hasImprint()) { 27924 for (StringType e : element.getImprint()) 27925 composeString("imprint", e); 27926 } 27927 if (element.hasImage()) { 27928 for (Attachment e : element.getImage()) 27929 composeAttachment("image", e); 27930 } 27931 if (element.hasScoring()) { 27932 composeCodeableConcept("scoring", element.getScoring()); 27933 } 27934 } 27935 27936 protected void composeMeta(String name, Meta element) throws IOException { 27937 if (element != null) { 27938 composeTypeAttributes(element); 27939 xml.enter(FHIR_NS, name); 27940 composeMetaElements(element); 27941 composeElementClose(element); 27942 xml.exit(FHIR_NS, name); 27943 } 27944 } 27945 27946 protected void composeMetaElements(Meta element) throws IOException { 27947 composeElementElements(element); 27948 if (element.hasVersionIdElement()) { 27949 composeId("versionId", element.getVersionIdElement()); 27950 } 27951 if (element.hasLastUpdatedElement()) { 27952 composeInstant("lastUpdated", element.getLastUpdatedElement()); 27953 } 27954 if (element.hasSourceElement()) { 27955 composeUri("source", element.getSourceElement()); 27956 } 27957 if (element.hasProfile()) { 27958 for (CanonicalType e : element.getProfile()) 27959 composeCanonical("profile", e); 27960 } 27961 if (element.hasSecurity()) { 27962 for (Coding e : element.getSecurity()) 27963 composeCoding("security", e); 27964 } 27965 if (element.hasTag()) { 27966 for (Coding e : element.getTag()) 27967 composeCoding("tag", e); 27968 } 27969 } 27970 27971 protected void composeAddress(String name, Address element) throws IOException { 27972 if (element != null) { 27973 composeTypeAttributes(element); 27974 xml.enter(FHIR_NS, name); 27975 composeAddressElements(element); 27976 composeElementClose(element); 27977 xml.exit(FHIR_NS, name); 27978 } 27979 } 27980 27981 protected void composeAddressElements(Address element) throws IOException { 27982 composeElementElements(element); 27983 if (element.hasUseElement()) 27984 composeEnumeration("use", element.getUseElement(), new Address.AddressUseEnumFactory()); 27985 if (element.hasTypeElement()) 27986 composeEnumeration("type", element.getTypeElement(), new Address.AddressTypeEnumFactory()); 27987 if (element.hasTextElement()) { 27988 composeString("text", element.getTextElement()); 27989 } 27990 if (element.hasLine()) { 27991 for (StringType e : element.getLine()) 27992 composeString("line", e); 27993 } 27994 if (element.hasCityElement()) { 27995 composeString("city", element.getCityElement()); 27996 } 27997 if (element.hasDistrictElement()) { 27998 composeString("district", element.getDistrictElement()); 27999 } 28000 if (element.hasStateElement()) { 28001 composeString("state", element.getStateElement()); 28002 } 28003 if (element.hasPostalCodeElement()) { 28004 composeString("postalCode", element.getPostalCodeElement()); 28005 } 28006 if (element.hasCountryElement()) { 28007 composeString("country", element.getCountryElement()); 28008 } 28009 if (element.hasPeriod()) { 28010 composePeriod("period", element.getPeriod()); 28011 } 28012 } 28013 28014 protected void composeContributor(String name, Contributor element) throws IOException { 28015 if (element != null) { 28016 composeTypeAttributes(element); 28017 xml.enter(FHIR_NS, name); 28018 composeContributorElements(element); 28019 composeElementClose(element); 28020 xml.exit(FHIR_NS, name); 28021 } 28022 } 28023 28024 protected void composeContributorElements(Contributor element) throws IOException { 28025 composeElementElements(element); 28026 if (element.hasTypeElement()) 28027 composeEnumeration("type", element.getTypeElement(), new Contributor.ContributorTypeEnumFactory()); 28028 if (element.hasNameElement()) { 28029 composeString("name", element.getNameElement()); 28030 } 28031 if (element.hasContact()) { 28032 for (ContactDetail e : element.getContact()) 28033 composeContactDetail("contact", e); 28034 } 28035 } 28036 28037 protected void composeAttachment(String name, Attachment element) throws IOException { 28038 if (element != null) { 28039 composeTypeAttributes(element); 28040 xml.enter(FHIR_NS, name); 28041 composeAttachmentElements(element); 28042 composeElementClose(element); 28043 xml.exit(FHIR_NS, name); 28044 } 28045 } 28046 28047 protected void composeAttachmentElements(Attachment element) throws IOException { 28048 composeElementElements(element); 28049 if (element.hasContentTypeElement()) { 28050 composeCode("contentType", element.getContentTypeElement()); 28051 } 28052 if (element.hasLanguageElement()) { 28053 composeCode("language", element.getLanguageElement()); 28054 } 28055 if (element.hasDataElement()) { 28056 composeBase64Binary("data", element.getDataElement()); 28057 } 28058 if (element.hasUrlElement()) { 28059 composeUrl("url", element.getUrlElement()); 28060 } 28061 if (element.hasSizeElement()) { 28062 composeUnsignedInt("size", element.getSizeElement()); 28063 } 28064 if (element.hasHashElement()) { 28065 composeBase64Binary("hash", element.getHashElement()); 28066 } 28067 if (element.hasTitleElement()) { 28068 composeString("title", element.getTitleElement()); 28069 } 28070 if (element.hasCreationElement()) { 28071 composeDateTime("creation", element.getCreationElement()); 28072 } 28073 } 28074 28075 protected void composeDataRequirement(String name, DataRequirement element) throws IOException { 28076 if (element != null) { 28077 composeTypeAttributes(element); 28078 xml.enter(FHIR_NS, name); 28079 composeDataRequirementElements(element); 28080 composeElementClose(element); 28081 xml.exit(FHIR_NS, name); 28082 } 28083 } 28084 28085 protected void composeDataRequirementElements(DataRequirement element) throws IOException { 28086 composeElementElements(element); 28087 if (element.hasTypeElement()) { 28088 composeCode("type", element.getTypeElement()); 28089 } 28090 if (element.hasProfile()) { 28091 for (CanonicalType e : element.getProfile()) 28092 composeCanonical("profile", e); 28093 } 28094 if (element.hasSubject()) { 28095 composeType("subject", element.getSubject()); 28096 } 28097 if (element.hasMustSupport()) { 28098 for (StringType e : element.getMustSupport()) 28099 composeString("mustSupport", e); 28100 } 28101 if (element.hasCodeFilter()) { 28102 for (DataRequirement.DataRequirementCodeFilterComponent e : element.getCodeFilter()) 28103 composeDataRequirementDataRequirementCodeFilterComponent("codeFilter", e); 28104 } 28105 if (element.hasDateFilter()) { 28106 for (DataRequirement.DataRequirementDateFilterComponent e : element.getDateFilter()) 28107 composeDataRequirementDataRequirementDateFilterComponent("dateFilter", e); 28108 } 28109 if (element.hasLimitElement()) { 28110 composePositiveInt("limit", element.getLimitElement()); 28111 } 28112 if (element.hasSort()) { 28113 for (DataRequirement.DataRequirementSortComponent e : element.getSort()) 28114 composeDataRequirementDataRequirementSortComponent("sort", e); 28115 } 28116 } 28117 28118 protected void composeDataRequirementDataRequirementCodeFilterComponent(String name, 28119 DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { 28120 if (element != null) { 28121 composeElementAttributes(element); 28122 xml.enter(FHIR_NS, name); 28123 composeDataRequirementDataRequirementCodeFilterComponentElements(element); 28124 composeElementClose(element); 28125 xml.exit(FHIR_NS, name); 28126 } 28127 } 28128 28129 protected void composeDataRequirementDataRequirementCodeFilterComponentElements( 28130 DataRequirement.DataRequirementCodeFilterComponent element) throws IOException { 28131 composeElementElements(element); 28132 if (element.hasPathElement()) { 28133 composeString("path", element.getPathElement()); 28134 } 28135 if (element.hasSearchParamElement()) { 28136 composeString("searchParam", element.getSearchParamElement()); 28137 } 28138 if (element.hasValueSetElement()) { 28139 composeCanonical("valueSet", element.getValueSetElement()); 28140 } 28141 if (element.hasCode()) { 28142 for (Coding e : element.getCode()) 28143 composeCoding("code", e); 28144 } 28145 } 28146 28147 protected void composeDataRequirementDataRequirementDateFilterComponent(String name, 28148 DataRequirement.DataRequirementDateFilterComponent element) throws IOException { 28149 if (element != null) { 28150 composeElementAttributes(element); 28151 xml.enter(FHIR_NS, name); 28152 composeDataRequirementDataRequirementDateFilterComponentElements(element); 28153 composeElementClose(element); 28154 xml.exit(FHIR_NS, name); 28155 } 28156 } 28157 28158 protected void composeDataRequirementDataRequirementDateFilterComponentElements( 28159 DataRequirement.DataRequirementDateFilterComponent element) throws IOException { 28160 composeElementElements(element); 28161 if (element.hasPathElement()) { 28162 composeString("path", element.getPathElement()); 28163 } 28164 if (element.hasSearchParamElement()) { 28165 composeString("searchParam", element.getSearchParamElement()); 28166 } 28167 if (element.hasValue()) { 28168 composeType("value", element.getValue()); 28169 } 28170 } 28171 28172 protected void composeDataRequirementDataRequirementSortComponent(String name, 28173 DataRequirement.DataRequirementSortComponent element) throws IOException { 28174 if (element != null) { 28175 composeElementAttributes(element); 28176 xml.enter(FHIR_NS, name); 28177 composeDataRequirementDataRequirementSortComponentElements(element); 28178 composeElementClose(element); 28179 xml.exit(FHIR_NS, name); 28180 } 28181 } 28182 28183 protected void composeDataRequirementDataRequirementSortComponentElements( 28184 DataRequirement.DataRequirementSortComponent element) throws IOException { 28185 composeElementElements(element); 28186 if (element.hasPathElement()) { 28187 composeString("path", element.getPathElement()); 28188 } 28189 if (element.hasDirectionElement()) 28190 composeEnumeration("direction", element.getDirectionElement(), new DataRequirement.SortDirectionEnumFactory()); 28191 } 28192 28193 protected void composeMoney(String name, Money element) throws IOException { 28194 if (element != null) { 28195 composeTypeAttributes(element); 28196 xml.enter(FHIR_NS, name); 28197 composeMoneyElements(element); 28198 composeElementClose(element); 28199 xml.exit(FHIR_NS, name); 28200 } 28201 } 28202 28203 protected void composeMoneyElements(Money element) throws IOException { 28204 composeElementElements(element); 28205 if (element.hasValueElement()) { 28206 composeDecimal("value", element.getValueElement()); 28207 } 28208 if (element.hasCurrencyElement()) { 28209 composeCode("currency", element.getCurrencyElement()); 28210 } 28211 } 28212 28213 protected void composeHumanName(String name, HumanName element) throws IOException { 28214 if (element != null) { 28215 composeTypeAttributes(element); 28216 xml.enter(FHIR_NS, name); 28217 composeHumanNameElements(element); 28218 composeElementClose(element); 28219 xml.exit(FHIR_NS, name); 28220 } 28221 } 28222 28223 protected void composeHumanNameElements(HumanName element) throws IOException { 28224 composeElementElements(element); 28225 if (element.hasUseElement()) 28226 composeEnumeration("use", element.getUseElement(), new HumanName.NameUseEnumFactory()); 28227 if (element.hasTextElement()) { 28228 composeString("text", element.getTextElement()); 28229 } 28230 if (element.hasFamilyElement()) { 28231 composeString("family", element.getFamilyElement()); 28232 } 28233 if (element.hasGiven()) { 28234 for (StringType e : element.getGiven()) 28235 composeString("given", e); 28236 } 28237 if (element.hasPrefix()) { 28238 for (StringType e : element.getPrefix()) 28239 composeString("prefix", e); 28240 } 28241 if (element.hasSuffix()) { 28242 for (StringType e : element.getSuffix()) 28243 composeString("suffix", e); 28244 } 28245 if (element.hasPeriod()) { 28246 composePeriod("period", element.getPeriod()); 28247 } 28248 } 28249 28250 protected void composeContactPoint(String name, ContactPoint element) throws IOException { 28251 if (element != null) { 28252 composeTypeAttributes(element); 28253 xml.enter(FHIR_NS, name); 28254 composeContactPointElements(element); 28255 composeElementClose(element); 28256 xml.exit(FHIR_NS, name); 28257 } 28258 } 28259 28260 protected void composeContactPointElements(ContactPoint element) throws IOException { 28261 composeElementElements(element); 28262 if (element.hasSystemElement()) 28263 composeEnumeration("system", element.getSystemElement(), new ContactPoint.ContactPointSystemEnumFactory()); 28264 if (element.hasValueElement()) { 28265 composeString("value", element.getValueElement()); 28266 } 28267 if (element.hasUseElement()) 28268 composeEnumeration("use", element.getUseElement(), new ContactPoint.ContactPointUseEnumFactory()); 28269 if (element.hasRankElement()) { 28270 composePositiveInt("rank", element.getRankElement()); 28271 } 28272 if (element.hasPeriod()) { 28273 composePeriod("period", element.getPeriod()); 28274 } 28275 } 28276 28277 protected void composeIdentifier(String name, Identifier element) throws IOException { 28278 if (element != null) { 28279 composeTypeAttributes(element); 28280 xml.enter(FHIR_NS, name); 28281 composeIdentifierElements(element); 28282 composeElementClose(element); 28283 xml.exit(FHIR_NS, name); 28284 } 28285 } 28286 28287 protected void composeIdentifierElements(Identifier element) throws IOException { 28288 composeElementElements(element); 28289 if (element.hasUseElement()) 28290 composeEnumeration("use", element.getUseElement(), new Identifier.IdentifierUseEnumFactory()); 28291 if (element.hasType()) { 28292 composeCodeableConcept("type", element.getType()); 28293 } 28294 if (element.hasSystemElement()) { 28295 composeUri("system", element.getSystemElement()); 28296 } 28297 if (element.hasValueElement()) { 28298 composeString("value", element.getValueElement()); 28299 } 28300 if (element.hasPeriod()) { 28301 composePeriod("period", element.getPeriod()); 28302 } 28303 if (element.hasAssigner()) { 28304 composeReference("assigner", element.getAssigner()); 28305 } 28306 } 28307 28308 protected void composeCoding(String name, Coding element) throws IOException { 28309 if (element != null) { 28310 composeTypeAttributes(element); 28311 xml.enter(FHIR_NS, name); 28312 composeCodingElements(element); 28313 composeElementClose(element); 28314 xml.exit(FHIR_NS, name); 28315 } 28316 } 28317 28318 protected void composeCodingElements(Coding element) throws IOException { 28319 composeElementElements(element); 28320 if (element.hasSystemElement()) { 28321 composeUri("system", element.getSystemElement()); 28322 } 28323 if (element.hasVersionElement()) { 28324 composeString("version", element.getVersionElement()); 28325 } 28326 if (element.hasCodeElement()) { 28327 composeCode("code", element.getCodeElement()); 28328 } 28329 if (element.hasDisplayElement()) { 28330 composeString("display", element.getDisplayElement()); 28331 } 28332 if (element.hasUserSelectedElement()) { 28333 composeBoolean("userSelected", element.getUserSelectedElement()); 28334 } 28335 } 28336 28337 protected void composeSampledData(String name, SampledData element) throws IOException { 28338 if (element != null) { 28339 composeTypeAttributes(element); 28340 xml.enter(FHIR_NS, name); 28341 composeSampledDataElements(element); 28342 composeElementClose(element); 28343 xml.exit(FHIR_NS, name); 28344 } 28345 } 28346 28347 protected void composeSampledDataElements(SampledData element) throws IOException { 28348 composeElementElements(element); 28349 if (element.hasOrigin()) { 28350 composeQuantity("origin", element.getOrigin()); 28351 } 28352 if (element.hasPeriodElement()) { 28353 composeDecimal("period", element.getPeriodElement()); 28354 } 28355 if (element.hasFactorElement()) { 28356 composeDecimal("factor", element.getFactorElement()); 28357 } 28358 if (element.hasLowerLimitElement()) { 28359 composeDecimal("lowerLimit", element.getLowerLimitElement()); 28360 } 28361 if (element.hasUpperLimitElement()) { 28362 composeDecimal("upperLimit", element.getUpperLimitElement()); 28363 } 28364 if (element.hasDimensionsElement()) { 28365 composePositiveInt("dimensions", element.getDimensionsElement()); 28366 } 28367 if (element.hasDataElement()) { 28368 composeString("data", element.getDataElement()); 28369 } 28370 } 28371 28372 protected void composeRatio(String name, Ratio element) throws IOException { 28373 if (element != null) { 28374 composeTypeAttributes(element); 28375 xml.enter(FHIR_NS, name); 28376 composeRatioElements(element); 28377 composeElementClose(element); 28378 xml.exit(FHIR_NS, name); 28379 } 28380 } 28381 28382 protected void composeRatioElements(Ratio element) throws IOException { 28383 composeElementElements(element); 28384 if (element.hasNumerator()) { 28385 composeQuantity("numerator", element.getNumerator()); 28386 } 28387 if (element.hasDenominator()) { 28388 composeQuantity("denominator", element.getDenominator()); 28389 } 28390 } 28391 28392 protected void composeReference(String name, Reference element) throws IOException { 28393 if (element != null) { 28394 composeTypeAttributes(element); 28395 xml.enter(FHIR_NS, name); 28396 composeReferenceElements(element); 28397 composeElementClose(element); 28398 xml.exit(FHIR_NS, name); 28399 } 28400 } 28401 28402 protected void composeReferenceElements(Reference element) throws IOException { 28403 composeElementElements(element); 28404 if (element.hasReferenceElement()) { 28405 composeString("reference", element.getReferenceElement()); 28406 } 28407 if (element.hasTypeElement()) { 28408 composeUri("type", element.getTypeElement()); 28409 } 28410 if (element.hasIdentifier()) { 28411 composeIdentifier("identifier", element.getIdentifier()); 28412 } 28413 if (element.hasDisplayElement()) { 28414 composeString("display", element.getDisplayElement()); 28415 } 28416 } 28417 28418 protected void composeTriggerDefinition(String name, TriggerDefinition element) throws IOException { 28419 if (element != null) { 28420 composeTypeAttributes(element); 28421 xml.enter(FHIR_NS, name); 28422 composeTriggerDefinitionElements(element); 28423 composeElementClose(element); 28424 xml.exit(FHIR_NS, name); 28425 } 28426 } 28427 28428 protected void composeTriggerDefinitionElements(TriggerDefinition element) throws IOException { 28429 composeElementElements(element); 28430 if (element.hasTypeElement()) 28431 composeEnumeration("type", element.getTypeElement(), new TriggerDefinition.TriggerTypeEnumFactory()); 28432 if (element.hasNameElement()) { 28433 composeString("name", element.getNameElement()); 28434 } 28435 if (element.hasTiming()) { 28436 composeType("timing", element.getTiming()); 28437 } 28438 if (element.hasData()) { 28439 for (DataRequirement e : element.getData()) 28440 composeDataRequirement("data", e); 28441 } 28442 if (element.hasCondition()) { 28443 composeExpression("condition", element.getCondition()); 28444 } 28445 } 28446 28447 protected void composeQuantity(String name, Quantity element) throws IOException { 28448 if (element != null) { 28449 composeTypeAttributes(element); 28450 xml.enter(FHIR_NS, name); 28451 composeQuantityElements(element); 28452 composeElementClose(element); 28453 xml.exit(FHIR_NS, name); 28454 } 28455 } 28456 28457 protected void composeQuantityElements(Quantity element) throws IOException { 28458 composeElementElements(element); 28459 if (element.hasValueElement()) { 28460 composeDecimal("value", element.getValueElement()); 28461 } 28462 if (element.hasComparatorElement()) 28463 composeEnumeration("comparator", element.getComparatorElement(), new Quantity.QuantityComparatorEnumFactory()); 28464 if (element.hasUnitElement()) { 28465 composeString("unit", element.getUnitElement()); 28466 } 28467 if (element.hasSystemElement()) { 28468 composeUri("system", element.getSystemElement()); 28469 } 28470 if (element.hasCodeElement()) { 28471 composeCode("code", element.getCodeElement()); 28472 } 28473 } 28474 28475 protected void composePeriod(String name, Period element) throws IOException { 28476 if (element != null) { 28477 composeTypeAttributes(element); 28478 xml.enter(FHIR_NS, name); 28479 composePeriodElements(element); 28480 composeElementClose(element); 28481 xml.exit(FHIR_NS, name); 28482 } 28483 } 28484 28485 protected void composePeriodElements(Period element) throws IOException { 28486 composeElementElements(element); 28487 if (element.hasStartElement()) { 28488 composeDateTime("start", element.getStartElement()); 28489 } 28490 if (element.hasEndElement()) { 28491 composeDateTime("end", element.getEndElement()); 28492 } 28493 } 28494 28495 protected void composeRange(String name, Range element) throws IOException { 28496 if (element != null) { 28497 composeTypeAttributes(element); 28498 xml.enter(FHIR_NS, name); 28499 composeRangeElements(element); 28500 composeElementClose(element); 28501 xml.exit(FHIR_NS, name); 28502 } 28503 } 28504 28505 protected void composeRangeElements(Range element) throws IOException { 28506 composeElementElements(element); 28507 if (element.hasLow()) { 28508 composeQuantity("low", element.getLow()); 28509 } 28510 if (element.hasHigh()) { 28511 composeQuantity("high", element.getHigh()); 28512 } 28513 } 28514 28515 protected void composeRelatedArtifact(String name, RelatedArtifact element) throws IOException { 28516 if (element != null) { 28517 composeTypeAttributes(element); 28518 xml.enter(FHIR_NS, name); 28519 composeRelatedArtifactElements(element); 28520 composeElementClose(element); 28521 xml.exit(FHIR_NS, name); 28522 } 28523 } 28524 28525 protected void composeRelatedArtifactElements(RelatedArtifact element) throws IOException { 28526 composeElementElements(element); 28527 if (element.hasTypeElement()) 28528 composeEnumeration("type", element.getTypeElement(), new RelatedArtifact.RelatedArtifactTypeEnumFactory()); 28529 if (element.hasLabelElement()) { 28530 composeString("label", element.getLabelElement()); 28531 } 28532 if (element.hasDisplayElement()) { 28533 composeString("display", element.getDisplayElement()); 28534 } 28535 if (element.hasCitationElement()) { 28536 composeMarkdown("citation", element.getCitationElement()); 28537 } 28538 if (element.hasUrlElement()) { 28539 composeUrl("url", element.getUrlElement()); 28540 } 28541 if (element.hasDocument()) { 28542 composeAttachment("document", element.getDocument()); 28543 } 28544 if (element.hasResourceElement()) { 28545 composeCanonical("resource", element.getResourceElement()); 28546 } 28547 } 28548 28549 protected void composeAnnotation(String name, Annotation element) throws IOException { 28550 if (element != null) { 28551 composeTypeAttributes(element); 28552 xml.enter(FHIR_NS, name); 28553 composeAnnotationElements(element); 28554 composeElementClose(element); 28555 xml.exit(FHIR_NS, name); 28556 } 28557 } 28558 28559 protected void composeAnnotationElements(Annotation element) throws IOException { 28560 composeElementElements(element); 28561 if (element.hasAuthor()) { 28562 composeType("author", element.getAuthor()); 28563 } 28564 if (element.hasTimeElement()) { 28565 composeDateTime("time", element.getTimeElement()); 28566 } 28567 if (element.hasTextElement()) { 28568 composeMarkdown("text", element.getTextElement()); 28569 } 28570 } 28571 28572 protected void composeContactDetail(String name, ContactDetail element) throws IOException { 28573 if (element != null) { 28574 composeTypeAttributes(element); 28575 xml.enter(FHIR_NS, name); 28576 composeContactDetailElements(element); 28577 composeElementClose(element); 28578 xml.exit(FHIR_NS, name); 28579 } 28580 } 28581 28582 protected void composeContactDetailElements(ContactDetail element) throws IOException { 28583 composeElementElements(element); 28584 if (element.hasNameElement()) { 28585 composeString("name", element.getNameElement()); 28586 } 28587 if (element.hasTelecom()) { 28588 for (ContactPoint e : element.getTelecom()) 28589 composeContactPoint("telecom", e); 28590 } 28591 } 28592 28593 protected void composeUsageContext(String name, UsageContext element) throws IOException { 28594 if (element != null) { 28595 composeTypeAttributes(element); 28596 xml.enter(FHIR_NS, name); 28597 composeUsageContextElements(element); 28598 composeElementClose(element); 28599 xml.exit(FHIR_NS, name); 28600 } 28601 } 28602 28603 protected void composeUsageContextElements(UsageContext element) throws IOException { 28604 composeElementElements(element); 28605 if (element.hasCode()) { 28606 composeCoding("code", element.getCode()); 28607 } 28608 if (element.hasValue()) { 28609 composeType("value", element.getValue()); 28610 } 28611 } 28612 28613 protected void composeExpression(String name, Expression element) throws IOException { 28614 if (element != null) { 28615 composeTypeAttributes(element); 28616 xml.enter(FHIR_NS, name); 28617 composeExpressionElements(element); 28618 composeElementClose(element); 28619 xml.exit(FHIR_NS, name); 28620 } 28621 } 28622 28623 protected void composeExpressionElements(Expression element) throws IOException { 28624 composeElementElements(element); 28625 if (element.hasDescriptionElement()) { 28626 composeString("description", element.getDescriptionElement()); 28627 } 28628 if (element.hasNameElement()) { 28629 composeId("name", element.getNameElement()); 28630 } 28631 if (element.hasLanguageElement()) 28632 composeCode("language", element.getLanguageElement()); 28633 if (element.hasExpressionElement()) { 28634 composeString("expression", element.getExpressionElement()); 28635 } 28636 if (element.hasReferenceElement()) { 28637 composeUri("reference", element.getReferenceElement()); 28638 } 28639 } 28640 28641 protected void composeSignature(String name, Signature element) throws IOException { 28642 if (element != null) { 28643 composeTypeAttributes(element); 28644 xml.enter(FHIR_NS, name); 28645 composeSignatureElements(element); 28646 composeElementClose(element); 28647 xml.exit(FHIR_NS, name); 28648 } 28649 } 28650 28651 protected void composeSignatureElements(Signature element) throws IOException { 28652 composeElementElements(element); 28653 if (element.hasType()) { 28654 for (Coding e : element.getType()) 28655 composeCoding("type", e); 28656 } 28657 if (element.hasWhenElement()) { 28658 composeInstant("when", element.getWhenElement()); 28659 } 28660 if (element.hasWho()) { 28661 composeReference("who", element.getWho()); 28662 } 28663 if (element.hasOnBehalfOf()) { 28664 composeReference("onBehalfOf", element.getOnBehalfOf()); 28665 } 28666 if (element.hasTargetFormatElement()) { 28667 composeCode("targetFormat", element.getTargetFormatElement()); 28668 } 28669 if (element.hasSigFormatElement()) { 28670 composeCode("sigFormat", element.getSigFormatElement()); 28671 } 28672 if (element.hasDataElement()) { 28673 composeBase64Binary("data", element.getDataElement()); 28674 } 28675 } 28676 28677 protected void composeCodeableConcept(String name, CodeableConcept element) throws IOException { 28678 if (element != null) { 28679 composeTypeAttributes(element); 28680 xml.enter(FHIR_NS, name); 28681 composeCodeableConceptElements(element); 28682 composeElementClose(element); 28683 xml.exit(FHIR_NS, name); 28684 } 28685 } 28686 28687 protected void composeCodeableConceptElements(CodeableConcept element) throws IOException { 28688 composeElementElements(element); 28689 if (element.hasCoding()) { 28690 for (Coding e : element.getCoding()) 28691 composeCoding("coding", e); 28692 } 28693 if (element.hasTextElement()) { 28694 composeString("text", element.getTextElement()); 28695 } 28696 } 28697 28698 protected void composeParameterDefinition(String name, ParameterDefinition element) throws IOException { 28699 if (element != null) { 28700 composeTypeAttributes(element); 28701 xml.enter(FHIR_NS, name); 28702 composeParameterDefinitionElements(element); 28703 composeElementClose(element); 28704 xml.exit(FHIR_NS, name); 28705 } 28706 } 28707 28708 protected void composeParameterDefinitionElements(ParameterDefinition element) throws IOException { 28709 composeElementElements(element); 28710 if (element.hasNameElement()) { 28711 composeCode("name", element.getNameElement()); 28712 } 28713 if (element.hasUseElement()) 28714 composeEnumeration("use", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory()); 28715 if (element.hasMinElement()) { 28716 composeInteger("min", element.getMinElement()); 28717 } 28718 if (element.hasMaxElement()) { 28719 composeString("max", element.getMaxElement()); 28720 } 28721 if (element.hasDocumentationElement()) { 28722 composeString("documentation", element.getDocumentationElement()); 28723 } 28724 if (element.hasTypeElement()) { 28725 composeCode("type", element.getTypeElement()); 28726 } 28727 if (element.hasProfileElement()) { 28728 composeCanonical("profile", element.getProfileElement()); 28729 } 28730 } 28731 28732 protected void composeElementDefinition(String name, ElementDefinition element) throws IOException { 28733 if (element != null) { 28734 composeElementAttributes(element); 28735 xml.enter(FHIR_NS, name); 28736 composeElementDefinitionElements(element); 28737 composeElementClose(element); 28738 xml.exit(FHIR_NS, name); 28739 } 28740 } 28741 28742 protected void composeElementDefinitionElements(ElementDefinition element) throws IOException { 28743 composeBackboneElementElements(element); 28744 if (element.hasPathElement()) { 28745 composeString("path", element.getPathElement()); 28746 } 28747 if (element.hasRepresentation()) 28748 for (Enumeration<ElementDefinition.PropertyRepresentation> e : element.getRepresentation()) 28749 composeEnumeration("representation", e, new ElementDefinition.PropertyRepresentationEnumFactory()); 28750 if (element.hasSliceNameElement()) { 28751 composeString("sliceName", element.getSliceNameElement()); 28752 } 28753 if (element.hasSliceIsConstrainingElement()) { 28754 composeBoolean("sliceIsConstraining", element.getSliceIsConstrainingElement()); 28755 } 28756 if (element.hasLabelElement()) { 28757 composeString("label", element.getLabelElement()); 28758 } 28759 if (element.hasCode()) { 28760 for (Coding e : element.getCode()) 28761 composeCoding("code", e); 28762 } 28763 if (element.hasSlicing()) { 28764 composeElementDefinitionElementDefinitionSlicingComponent("slicing", element.getSlicing()); 28765 } 28766 if (element.hasShortElement()) { 28767 composeString("short", element.getShortElement()); 28768 } 28769 if (element.hasDefinitionElement()) { 28770 composeMarkdown("definition", element.getDefinitionElement()); 28771 } 28772 if (element.hasCommentElement()) { 28773 composeMarkdown("comment", element.getCommentElement()); 28774 } 28775 if (element.hasRequirementsElement()) { 28776 composeMarkdown("requirements", element.getRequirementsElement()); 28777 } 28778 if (element.hasAlias()) { 28779 for (StringType e : element.getAlias()) 28780 composeString("alias", e); 28781 } 28782 if (element.hasMinElement()) { 28783 composeUnsignedInt("min", element.getMinElement()); 28784 } 28785 if (element.hasMaxElement()) { 28786 composeString("max", element.getMaxElement()); 28787 } 28788 if (element.hasBase()) { 28789 composeElementDefinitionElementDefinitionBaseComponent("base", element.getBase()); 28790 } 28791 if (element.hasContentReferenceElement()) { 28792 composeUri("contentReference", element.getContentReferenceElement()); 28793 } 28794 if (element.hasType()) { 28795 for (ElementDefinition.TypeRefComponent e : element.getType()) 28796 composeElementDefinitionTypeRefComponent("type", e); 28797 } 28798 if (element.hasDefaultValue()) { 28799 composeType("defaultValue", element.getDefaultValue()); 28800 } 28801 if (element.hasMeaningWhenMissingElement()) { 28802 composeMarkdown("meaningWhenMissing", element.getMeaningWhenMissingElement()); 28803 } 28804 if (element.hasOrderMeaningElement()) { 28805 composeString("orderMeaning", element.getOrderMeaningElement()); 28806 } 28807 if (element.hasFixed()) { 28808 composeType("fixed", element.getFixed()); 28809 } 28810 if (element.hasPattern()) { 28811 composeType("pattern", element.getPattern()); 28812 } 28813 if (element.hasExample()) { 28814 for (ElementDefinition.ElementDefinitionExampleComponent e : element.getExample()) 28815 composeElementDefinitionElementDefinitionExampleComponent("example", e); 28816 } 28817 if (element.hasMinValue()) { 28818 composeType("minValue", element.getMinValue()); 28819 } 28820 if (element.hasMaxValue()) { 28821 composeType("maxValue", element.getMaxValue()); 28822 } 28823 if (element.hasMaxLengthElement()) { 28824 composeInteger("maxLength", element.getMaxLengthElement()); 28825 } 28826 if (element.hasCondition()) { 28827 for (IdType e : element.getCondition()) 28828 composeId("condition", e); 28829 } 28830 if (element.hasConstraint()) { 28831 for (ElementDefinition.ElementDefinitionConstraintComponent e : element.getConstraint()) 28832 composeElementDefinitionElementDefinitionConstraintComponent("constraint", e); 28833 } 28834 if (element.hasMustSupportElement()) { 28835 composeBoolean("mustSupport", element.getMustSupportElement()); 28836 } 28837 if (element.hasIsModifierElement()) { 28838 composeBoolean("isModifier", element.getIsModifierElement()); 28839 } 28840 if (element.hasIsModifierReasonElement()) { 28841 composeString("isModifierReason", element.getIsModifierReasonElement()); 28842 } 28843 if (element.hasIsSummaryElement()) { 28844 composeBoolean("isSummary", element.getIsSummaryElement()); 28845 } 28846 if (element.hasBinding()) { 28847 composeElementDefinitionElementDefinitionBindingComponent("binding", element.getBinding()); 28848 } 28849 if (element.hasMapping()) { 28850 for (ElementDefinition.ElementDefinitionMappingComponent e : element.getMapping()) 28851 composeElementDefinitionElementDefinitionMappingComponent("mapping", e); 28852 } 28853 } 28854 28855 protected void composeElementDefinitionElementDefinitionSlicingComponent(String name, 28856 ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { 28857 if (element != null) { 28858 composeElementAttributes(element); 28859 xml.enter(FHIR_NS, name); 28860 composeElementDefinitionElementDefinitionSlicingComponentElements(element); 28861 composeElementClose(element); 28862 xml.exit(FHIR_NS, name); 28863 } 28864 } 28865 28866 protected void composeElementDefinitionElementDefinitionSlicingComponentElements( 28867 ElementDefinition.ElementDefinitionSlicingComponent element) throws IOException { 28868 composeElementElements(element); 28869 if (element.hasDiscriminator()) { 28870 for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent e : element.getDiscriminator()) 28871 composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent("discriminator", e); 28872 } 28873 if (element.hasDescriptionElement()) { 28874 composeString("description", element.getDescriptionElement()); 28875 } 28876 if (element.hasOrderedElement()) { 28877 composeBoolean("ordered", element.getOrderedElement()); 28878 } 28879 if (element.hasRulesElement()) 28880 composeEnumeration("rules", element.getRulesElement(), new ElementDefinition.SlicingRulesEnumFactory()); 28881 } 28882 28883 protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponent(String name, 28884 ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { 28885 if (element != null) { 28886 composeElementAttributes(element); 28887 xml.enter(FHIR_NS, name); 28888 composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements(element); 28889 composeElementClose(element); 28890 xml.exit(FHIR_NS, name); 28891 } 28892 } 28893 28894 protected void composeElementDefinitionElementDefinitionSlicingDiscriminatorComponentElements( 28895 ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent element) throws IOException { 28896 composeElementElements(element); 28897 if (element.hasTypeElement()) 28898 composeEnumeration("type", element.getTypeElement(), new ElementDefinition.DiscriminatorTypeEnumFactory()); 28899 if (element.hasPathElement()) { 28900 composeString("path", element.getPathElement()); 28901 } 28902 } 28903 28904 protected void composeElementDefinitionElementDefinitionBaseComponent(String name, 28905 ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { 28906 if (element != null) { 28907 composeElementAttributes(element); 28908 xml.enter(FHIR_NS, name); 28909 composeElementDefinitionElementDefinitionBaseComponentElements(element); 28910 composeElementClose(element); 28911 xml.exit(FHIR_NS, name); 28912 } 28913 } 28914 28915 protected void composeElementDefinitionElementDefinitionBaseComponentElements( 28916 ElementDefinition.ElementDefinitionBaseComponent element) throws IOException { 28917 composeElementElements(element); 28918 if (element.hasPathElement()) { 28919 composeString("path", element.getPathElement()); 28920 } 28921 if (element.hasMinElement()) { 28922 composeUnsignedInt("min", element.getMinElement()); 28923 } 28924 if (element.hasMaxElement()) { 28925 composeString("max", element.getMaxElement()); 28926 } 28927 } 28928 28929 protected void composeElementDefinitionTypeRefComponent(String name, ElementDefinition.TypeRefComponent element) 28930 throws IOException { 28931 if (element != null) { 28932 composeElementAttributes(element); 28933 xml.enter(FHIR_NS, name); 28934 composeElementDefinitionTypeRefComponentElements(element); 28935 composeElementClose(element); 28936 xml.exit(FHIR_NS, name); 28937 } 28938 } 28939 28940 protected void composeElementDefinitionTypeRefComponentElements(ElementDefinition.TypeRefComponent element) 28941 throws IOException { 28942 composeElementElements(element); 28943 if (element.hasCodeElement()) { 28944 composeUri("code", element.getCodeElement()); 28945 } 28946 if (element.hasProfile()) { 28947 for (CanonicalType e : element.getProfile()) 28948 composeCanonical("profile", e); 28949 } 28950 if (element.hasTargetProfile()) { 28951 for (CanonicalType e : element.getTargetProfile()) 28952 composeCanonical("targetProfile", e); 28953 } 28954 if (element.hasAggregation()) 28955 for (Enumeration<ElementDefinition.AggregationMode> e : element.getAggregation()) 28956 composeEnumeration("aggregation", e, new ElementDefinition.AggregationModeEnumFactory()); 28957 if (element.hasVersioningElement()) 28958 composeEnumeration("versioning", element.getVersioningElement(), 28959 new ElementDefinition.ReferenceVersionRulesEnumFactory()); 28960 } 28961 28962 protected void composeElementDefinitionElementDefinitionExampleComponent(String name, 28963 ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { 28964 if (element != null) { 28965 composeElementAttributes(element); 28966 xml.enter(FHIR_NS, name); 28967 composeElementDefinitionElementDefinitionExampleComponentElements(element); 28968 composeElementClose(element); 28969 xml.exit(FHIR_NS, name); 28970 } 28971 } 28972 28973 protected void composeElementDefinitionElementDefinitionExampleComponentElements( 28974 ElementDefinition.ElementDefinitionExampleComponent element) throws IOException { 28975 composeElementElements(element); 28976 if (element.hasLabelElement()) { 28977 composeString("label", element.getLabelElement()); 28978 } 28979 if (element.hasValue()) { 28980 composeType("value", element.getValue()); 28981 } 28982 } 28983 28984 protected void composeElementDefinitionElementDefinitionConstraintComponent(String name, 28985 ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { 28986 if (element != null) { 28987 composeElementAttributes(element); 28988 xml.enter(FHIR_NS, name); 28989 composeElementDefinitionElementDefinitionConstraintComponentElements(element); 28990 composeElementClose(element); 28991 xml.exit(FHIR_NS, name); 28992 } 28993 } 28994 28995 protected void composeElementDefinitionElementDefinitionConstraintComponentElements( 28996 ElementDefinition.ElementDefinitionConstraintComponent element) throws IOException { 28997 composeElementElements(element); 28998 if (element.hasKeyElement()) { 28999 composeId("key", element.getKeyElement()); 29000 } 29001 if (element.hasRequirementsElement()) { 29002 composeString("requirements", element.getRequirementsElement()); 29003 } 29004 if (element.hasSeverityElement()) 29005 composeEnumeration("severity", element.getSeverityElement(), 29006 new ElementDefinition.ConstraintSeverityEnumFactory()); 29007 if (element.hasHumanElement()) { 29008 composeString("human", element.getHumanElement()); 29009 } 29010 if (element.hasExpressionElement()) { 29011 composeString("expression", element.getExpressionElement()); 29012 } 29013 if (element.hasXpathElement()) { 29014 composeString("xpath", element.getXpathElement()); 29015 } 29016 if (element.hasSourceElement()) { 29017 composeCanonical("source", element.getSourceElement()); 29018 } 29019 } 29020 29021 protected void composeElementDefinitionElementDefinitionBindingComponent(String name, 29022 ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { 29023 if (element != null) { 29024 composeElementAttributes(element); 29025 xml.enter(FHIR_NS, name); 29026 composeElementDefinitionElementDefinitionBindingComponentElements(element); 29027 composeElementClose(element); 29028 xml.exit(FHIR_NS, name); 29029 } 29030 } 29031 29032 protected void composeElementDefinitionElementDefinitionBindingComponentElements( 29033 ElementDefinition.ElementDefinitionBindingComponent element) throws IOException { 29034 composeElementElements(element); 29035 if (element.hasStrengthElement()) 29036 composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); 29037 if (element.hasDescriptionElement()) { 29038 composeString("description", element.getDescriptionElement()); 29039 } 29040 if (element.hasValueSetElement()) { 29041 composeCanonical("valueSet", element.getValueSetElement()); 29042 } 29043 } 29044 29045 protected void composeElementDefinitionElementDefinitionMappingComponent(String name, 29046 ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { 29047 if (element != null) { 29048 composeElementAttributes(element); 29049 xml.enter(FHIR_NS, name); 29050 composeElementDefinitionElementDefinitionMappingComponentElements(element); 29051 composeElementClose(element); 29052 xml.exit(FHIR_NS, name); 29053 } 29054 } 29055 29056 protected void composeElementDefinitionElementDefinitionMappingComponentElements( 29057 ElementDefinition.ElementDefinitionMappingComponent element) throws IOException { 29058 composeElementElements(element); 29059 if (element.hasIdentityElement()) { 29060 composeId("identity", element.getIdentityElement()); 29061 } 29062 if (element.hasLanguageElement()) { 29063 composeCode("language", element.getLanguageElement()); 29064 } 29065 if (element.hasMapElement()) { 29066 composeString("map", element.getMapElement()); 29067 } 29068 if (element.hasCommentElement()) { 29069 composeString("comment", element.getCommentElement()); 29070 } 29071 } 29072 29073 protected void composeDomainResourceAttributes(DomainResource element) throws IOException { 29074 composeResourceAttributes(element); 29075 } 29076 29077 protected void composeDomainResourceElements(DomainResource element) throws IOException { 29078 composeResourceElements(element); 29079 if (element.hasText()) { 29080 composeNarrative("text", element.getText()); 29081 } 29082 if (element.hasContained()) { 29083 for (Resource e : element.getContained()) { 29084 xml.enter(FHIR_NS, "contained"); 29085 composeResource(e); 29086 xml.exit(FHIR_NS, "contained"); 29087 } 29088 } 29089 if (element.hasExtension()) 29090 for (Extension e : element.getExtension()) 29091 composeExtension("extension", e); 29092 if (element.hasModifierExtension()) { 29093 for (Extension e : element.getModifierExtension()) 29094 composeExtension("modifierExtension", e); 29095 } 29096 } 29097 29098 protected void composeParameters(String name, Parameters element) throws IOException { 29099 if (element != null) { 29100 composeResourceAttributes(element); 29101 xml.enter(FHIR_NS, name); 29102 composeParametersElements(element); 29103 composeElementClose(element); 29104 xml.exit(FHIR_NS, name); 29105 } 29106 } 29107 29108 protected void composeParametersElements(Parameters element) throws IOException { 29109 composeResourceElements(element); 29110 if (element.hasParameter()) { 29111 for (Parameters.ParametersParameterComponent e : element.getParameter()) 29112 composeParametersParametersParameterComponent("parameter", e); 29113 } 29114 } 29115 29116 protected void composeParametersParametersParameterComponent(String name, 29117 Parameters.ParametersParameterComponent element) throws IOException { 29118 if (element != null) { 29119 composeElementAttributes(element); 29120 xml.enter(FHIR_NS, name); 29121 composeParametersParametersParameterComponentElements(element); 29122 composeElementClose(element); 29123 xml.exit(FHIR_NS, name); 29124 } 29125 } 29126 29127 protected void composeParametersParametersParameterComponentElements(Parameters.ParametersParameterComponent element) 29128 throws IOException { 29129 composeBackboneElementElements(element); 29130 if (element.hasNameElement()) { 29131 composeString("name", element.getNameElement()); 29132 } 29133 if (element.hasValue()) { 29134 composeType("value", element.getValue()); 29135 } 29136 if (element.hasResource()) { 29137 xml.enter(FHIR_NS, "resource"); 29138 composeResource(element.getResource()); 29139 xml.exit(FHIR_NS, "resource"); 29140 } 29141 if (element.hasPart()) { 29142 for (Parameters.ParametersParameterComponent e : element.getPart()) 29143 composeParametersParametersParameterComponent("part", e); 29144 } 29145 } 29146 29147 protected void composeResourceAttributes(Resource element) throws IOException { 29148 if (style != OutputStyle.CANONICAL) 29149 for (String comment : element.getFormatCommentsPre()) 29150 xml.comment(comment, getOutputStyle() == OutputStyle.PRETTY); 29151 } 29152 29153 protected void composeResourceElements(Resource element) throws IOException { 29154 if (element.hasIdElement()) { 29155 composeId("id", element.getIdElement()); 29156 } 29157 if (element.hasMeta()) { 29158 composeMeta("meta", element.getMeta()); 29159 } 29160 if (element.hasImplicitRulesElement()) { 29161 composeUri("implicitRules", element.getImplicitRulesElement()); 29162 } 29163 if (element.hasLanguageElement()) { 29164 composeCode("language", element.getLanguageElement()); 29165 } 29166 } 29167 29168 protected void composeAccount(String name, Account element) throws IOException { 29169 if (element != null) { 29170 composeDomainResourceAttributes(element); 29171 xml.enter(FHIR_NS, name); 29172 composeAccountElements(element); 29173 composeElementClose(element); 29174 xml.exit(FHIR_NS, name); 29175 } 29176 } 29177 29178 protected void composeAccountElements(Account element) throws IOException { 29179 composeDomainResourceElements(element); 29180 if (element.hasIdentifier()) { 29181 for (Identifier e : element.getIdentifier()) 29182 composeIdentifier("identifier", e); 29183 } 29184 if (element.hasStatusElement()) 29185 composeEnumeration("status", element.getStatusElement(), new Account.AccountStatusEnumFactory()); 29186 if (element.hasType()) { 29187 composeCodeableConcept("type", element.getType()); 29188 } 29189 if (element.hasNameElement()) { 29190 composeString("name", element.getNameElement()); 29191 } 29192 if (element.hasSubject()) { 29193 for (Reference e : element.getSubject()) 29194 composeReference("subject", e); 29195 } 29196 if (element.hasServicePeriod()) { 29197 composePeriod("servicePeriod", element.getServicePeriod()); 29198 } 29199 if (element.hasCoverage()) { 29200 for (Account.CoverageComponent e : element.getCoverage()) 29201 composeAccountCoverageComponent("coverage", e); 29202 } 29203 if (element.hasOwner()) { 29204 composeReference("owner", element.getOwner()); 29205 } 29206 if (element.hasDescriptionElement()) { 29207 composeString("description", element.getDescriptionElement()); 29208 } 29209 if (element.hasGuarantor()) { 29210 for (Account.GuarantorComponent e : element.getGuarantor()) 29211 composeAccountGuarantorComponent("guarantor", e); 29212 } 29213 if (element.hasPartOf()) { 29214 composeReference("partOf", element.getPartOf()); 29215 } 29216 } 29217 29218 protected void composeAccountCoverageComponent(String name, Account.CoverageComponent element) throws IOException { 29219 if (element != null) { 29220 composeElementAttributes(element); 29221 xml.enter(FHIR_NS, name); 29222 composeAccountCoverageComponentElements(element); 29223 composeElementClose(element); 29224 xml.exit(FHIR_NS, name); 29225 } 29226 } 29227 29228 protected void composeAccountCoverageComponentElements(Account.CoverageComponent element) throws IOException { 29229 composeBackboneElementElements(element); 29230 if (element.hasCoverage()) { 29231 composeReference("coverage", element.getCoverage()); 29232 } 29233 if (element.hasPriorityElement()) { 29234 composePositiveInt("priority", element.getPriorityElement()); 29235 } 29236 } 29237 29238 protected void composeAccountGuarantorComponent(String name, Account.GuarantorComponent element) throws IOException { 29239 if (element != null) { 29240 composeElementAttributes(element); 29241 xml.enter(FHIR_NS, name); 29242 composeAccountGuarantorComponentElements(element); 29243 composeElementClose(element); 29244 xml.exit(FHIR_NS, name); 29245 } 29246 } 29247 29248 protected void composeAccountGuarantorComponentElements(Account.GuarantorComponent element) throws IOException { 29249 composeBackboneElementElements(element); 29250 if (element.hasParty()) { 29251 composeReference("party", element.getParty()); 29252 } 29253 if (element.hasOnHoldElement()) { 29254 composeBoolean("onHold", element.getOnHoldElement()); 29255 } 29256 if (element.hasPeriod()) { 29257 composePeriod("period", element.getPeriod()); 29258 } 29259 } 29260 29261 protected void composeActivityDefinition(String name, ActivityDefinition element) throws IOException { 29262 if (element != null) { 29263 composeDomainResourceAttributes(element); 29264 xml.enter(FHIR_NS, name); 29265 composeActivityDefinitionElements(element); 29266 composeElementClose(element); 29267 xml.exit(FHIR_NS, name); 29268 } 29269 } 29270 29271 protected void composeActivityDefinitionElements(ActivityDefinition element) throws IOException { 29272 composeDomainResourceElements(element); 29273 if (element.hasUrlElement()) { 29274 composeUri("url", element.getUrlElement()); 29275 } 29276 if (element.hasIdentifier()) { 29277 for (Identifier e : element.getIdentifier()) 29278 composeIdentifier("identifier", e); 29279 } 29280 if (element.hasVersionElement()) { 29281 composeString("version", element.getVersionElement()); 29282 } 29283 if (element.hasNameElement()) { 29284 composeString("name", element.getNameElement()); 29285 } 29286 if (element.hasTitleElement()) { 29287 composeString("title", element.getTitleElement()); 29288 } 29289 if (element.hasSubtitleElement()) { 29290 composeString("subtitle", element.getSubtitleElement()); 29291 } 29292 if (element.hasStatusElement()) 29293 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 29294 if (element.hasExperimentalElement()) { 29295 composeBoolean("experimental", element.getExperimentalElement()); 29296 } 29297 if (element.hasSubject()) { 29298 composeType("subject", element.getSubject()); 29299 } 29300 if (element.hasDateElement()) { 29301 composeDateTime("date", element.getDateElement()); 29302 } 29303 if (element.hasPublisherElement()) { 29304 composeString("publisher", element.getPublisherElement()); 29305 } 29306 if (element.hasContact()) { 29307 for (ContactDetail e : element.getContact()) 29308 composeContactDetail("contact", e); 29309 } 29310 if (element.hasDescriptionElement()) { 29311 composeMarkdown("description", element.getDescriptionElement()); 29312 } 29313 if (element.hasUseContext()) { 29314 for (UsageContext e : element.getUseContext()) 29315 composeUsageContext("useContext", e); 29316 } 29317 if (element.hasJurisdiction()) { 29318 for (CodeableConcept e : element.getJurisdiction()) 29319 composeCodeableConcept("jurisdiction", e); 29320 } 29321 if (element.hasPurposeElement()) { 29322 composeMarkdown("purpose", element.getPurposeElement()); 29323 } 29324 if (element.hasUsageElement()) { 29325 composeString("usage", element.getUsageElement()); 29326 } 29327 if (element.hasCopyrightElement()) { 29328 composeMarkdown("copyright", element.getCopyrightElement()); 29329 } 29330 if (element.hasApprovalDateElement()) { 29331 composeDate("approvalDate", element.getApprovalDateElement()); 29332 } 29333 if (element.hasLastReviewDateElement()) { 29334 composeDate("lastReviewDate", element.getLastReviewDateElement()); 29335 } 29336 if (element.hasEffectivePeriod()) { 29337 composePeriod("effectivePeriod", element.getEffectivePeriod()); 29338 } 29339 if (element.hasTopic()) { 29340 for (CodeableConcept e : element.getTopic()) 29341 composeCodeableConcept("topic", e); 29342 } 29343 if (element.hasAuthor()) { 29344 for (ContactDetail e : element.getAuthor()) 29345 composeContactDetail("author", e); 29346 } 29347 if (element.hasEditor()) { 29348 for (ContactDetail e : element.getEditor()) 29349 composeContactDetail("editor", e); 29350 } 29351 if (element.hasReviewer()) { 29352 for (ContactDetail e : element.getReviewer()) 29353 composeContactDetail("reviewer", e); 29354 } 29355 if (element.hasEndorser()) { 29356 for (ContactDetail e : element.getEndorser()) 29357 composeContactDetail("endorser", e); 29358 } 29359 if (element.hasRelatedArtifact()) { 29360 for (RelatedArtifact e : element.getRelatedArtifact()) 29361 composeRelatedArtifact("relatedArtifact", e); 29362 } 29363 if (element.hasLibrary()) { 29364 for (CanonicalType e : element.getLibrary()) 29365 composeCanonical("library", e); 29366 } 29367 if (element.hasKindElement()) 29368 composeEnumeration("kind", element.getKindElement(), new ActivityDefinition.ActivityDefinitionKindEnumFactory()); 29369 if (element.hasProfileElement()) { 29370 composeCanonical("profile", element.getProfileElement()); 29371 } 29372 if (element.hasCode()) { 29373 composeCodeableConcept("code", element.getCode()); 29374 } 29375 if (element.hasIntentElement()) 29376 composeEnumeration("intent", element.getIntentElement(), new ActivityDefinition.RequestIntentEnumFactory()); 29377 if (element.hasPriorityElement()) 29378 composeEnumeration("priority", element.getPriorityElement(), new ActivityDefinition.RequestPriorityEnumFactory()); 29379 if (element.hasDoNotPerformElement()) { 29380 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 29381 } 29382 if (element.hasTiming()) { 29383 composeType("timing", element.getTiming()); 29384 } 29385 if (element.hasLocation()) { 29386 composeReference("location", element.getLocation()); 29387 } 29388 if (element.hasParticipant()) { 29389 for (ActivityDefinition.ActivityDefinitionParticipantComponent e : element.getParticipant()) 29390 composeActivityDefinitionActivityDefinitionParticipantComponent("participant", e); 29391 } 29392 if (element.hasProduct()) { 29393 composeType("product", element.getProduct()); 29394 } 29395 if (element.hasQuantity()) { 29396 composeQuantity("quantity", element.getQuantity()); 29397 } 29398 if (element.hasDosage()) { 29399 for (Dosage e : element.getDosage()) 29400 composeDosage("dosage", e); 29401 } 29402 if (element.hasBodySite()) { 29403 for (CodeableConcept e : element.getBodySite()) 29404 composeCodeableConcept("bodySite", e); 29405 } 29406 if (element.hasSpecimenRequirement()) { 29407 for (Reference e : element.getSpecimenRequirement()) 29408 composeReference("specimenRequirement", e); 29409 } 29410 if (element.hasObservationRequirement()) { 29411 for (Reference e : element.getObservationRequirement()) 29412 composeReference("observationRequirement", e); 29413 } 29414 if (element.hasObservationResultRequirement()) { 29415 for (Reference e : element.getObservationResultRequirement()) 29416 composeReference("observationResultRequirement", e); 29417 } 29418 if (element.hasTransformElement()) { 29419 composeCanonical("transform", element.getTransformElement()); 29420 } 29421 if (element.hasDynamicValue()) { 29422 for (ActivityDefinition.ActivityDefinitionDynamicValueComponent e : element.getDynamicValue()) 29423 composeActivityDefinitionActivityDefinitionDynamicValueComponent("dynamicValue", e); 29424 } 29425 } 29426 29427 protected void composeActivityDefinitionActivityDefinitionParticipantComponent(String name, 29428 ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { 29429 if (element != null) { 29430 composeElementAttributes(element); 29431 xml.enter(FHIR_NS, name); 29432 composeActivityDefinitionActivityDefinitionParticipantComponentElements(element); 29433 composeElementClose(element); 29434 xml.exit(FHIR_NS, name); 29435 } 29436 } 29437 29438 protected void composeActivityDefinitionActivityDefinitionParticipantComponentElements( 29439 ActivityDefinition.ActivityDefinitionParticipantComponent element) throws IOException { 29440 composeBackboneElementElements(element); 29441 if (element.hasTypeElement()) 29442 composeEnumeration("type", element.getTypeElement(), new ActivityDefinition.ActivityParticipantTypeEnumFactory()); 29443 if (element.hasRole()) { 29444 composeCodeableConcept("role", element.getRole()); 29445 } 29446 } 29447 29448 protected void composeActivityDefinitionActivityDefinitionDynamicValueComponent(String name, 29449 ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { 29450 if (element != null) { 29451 composeElementAttributes(element); 29452 xml.enter(FHIR_NS, name); 29453 composeActivityDefinitionActivityDefinitionDynamicValueComponentElements(element); 29454 composeElementClose(element); 29455 xml.exit(FHIR_NS, name); 29456 } 29457 } 29458 29459 protected void composeActivityDefinitionActivityDefinitionDynamicValueComponentElements( 29460 ActivityDefinition.ActivityDefinitionDynamicValueComponent element) throws IOException { 29461 composeBackboneElementElements(element); 29462 if (element.hasPathElement()) { 29463 composeString("path", element.getPathElement()); 29464 } 29465 if (element.hasExpression()) { 29466 composeExpression("expression", element.getExpression()); 29467 } 29468 } 29469 29470 protected void composeAdverseEvent(String name, AdverseEvent element) throws IOException { 29471 if (element != null) { 29472 composeDomainResourceAttributes(element); 29473 xml.enter(FHIR_NS, name); 29474 composeAdverseEventElements(element); 29475 composeElementClose(element); 29476 xml.exit(FHIR_NS, name); 29477 } 29478 } 29479 29480 protected void composeAdverseEventElements(AdverseEvent element) throws IOException { 29481 composeDomainResourceElements(element); 29482 if (element.hasIdentifier()) { 29483 composeIdentifier("identifier", element.getIdentifier()); 29484 } 29485 if (element.hasActualityElement()) 29486 composeEnumeration("actuality", element.getActualityElement(), 29487 new AdverseEvent.AdverseEventActualityEnumFactory()); 29488 if (element.hasCategory()) { 29489 for (CodeableConcept e : element.getCategory()) 29490 composeCodeableConcept("category", e); 29491 } 29492 if (element.hasEvent()) { 29493 composeCodeableConcept("event", element.getEvent()); 29494 } 29495 if (element.hasSubject()) { 29496 composeReference("subject", element.getSubject()); 29497 } 29498 if (element.hasEncounter()) { 29499 composeReference("encounter", element.getEncounter()); 29500 } 29501 if (element.hasDateElement()) { 29502 composeDateTime("date", element.getDateElement()); 29503 } 29504 if (element.hasDetectedElement()) { 29505 composeDateTime("detected", element.getDetectedElement()); 29506 } 29507 if (element.hasRecordedDateElement()) { 29508 composeDateTime("recordedDate", element.getRecordedDateElement()); 29509 } 29510 if (element.hasResultingCondition()) { 29511 for (Reference e : element.getResultingCondition()) 29512 composeReference("resultingCondition", e); 29513 } 29514 if (element.hasLocation()) { 29515 composeReference("location", element.getLocation()); 29516 } 29517 if (element.hasSeriousness()) { 29518 composeCodeableConcept("seriousness", element.getSeriousness()); 29519 } 29520 if (element.hasSeverity()) { 29521 composeCodeableConcept("severity", element.getSeverity()); 29522 } 29523 if (element.hasOutcome()) { 29524 composeCodeableConcept("outcome", element.getOutcome()); 29525 } 29526 if (element.hasRecorder()) { 29527 composeReference("recorder", element.getRecorder()); 29528 } 29529 if (element.hasContributor()) { 29530 for (Reference e : element.getContributor()) 29531 composeReference("contributor", e); 29532 } 29533 if (element.hasSuspectEntity()) { 29534 for (AdverseEvent.AdverseEventSuspectEntityComponent e : element.getSuspectEntity()) 29535 composeAdverseEventAdverseEventSuspectEntityComponent("suspectEntity", e); 29536 } 29537 if (element.hasSubjectMedicalHistory()) { 29538 for (Reference e : element.getSubjectMedicalHistory()) 29539 composeReference("subjectMedicalHistory", e); 29540 } 29541 if (element.hasReferenceDocument()) { 29542 for (Reference e : element.getReferenceDocument()) 29543 composeReference("referenceDocument", e); 29544 } 29545 if (element.hasStudy()) { 29546 for (Reference e : element.getStudy()) 29547 composeReference("study", e); 29548 } 29549 } 29550 29551 protected void composeAdverseEventAdverseEventSuspectEntityComponent(String name, 29552 AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { 29553 if (element != null) { 29554 composeElementAttributes(element); 29555 xml.enter(FHIR_NS, name); 29556 composeAdverseEventAdverseEventSuspectEntityComponentElements(element); 29557 composeElementClose(element); 29558 xml.exit(FHIR_NS, name); 29559 } 29560 } 29561 29562 protected void composeAdverseEventAdverseEventSuspectEntityComponentElements( 29563 AdverseEvent.AdverseEventSuspectEntityComponent element) throws IOException { 29564 composeBackboneElementElements(element); 29565 if (element.hasInstance()) { 29566 composeReference("instance", element.getInstance()); 29567 } 29568 if (element.hasCausality()) { 29569 for (AdverseEvent.AdverseEventSuspectEntityCausalityComponent e : element.getCausality()) 29570 composeAdverseEventAdverseEventSuspectEntityCausalityComponent("causality", e); 29571 } 29572 } 29573 29574 protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponent(String name, 29575 AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { 29576 if (element != null) { 29577 composeElementAttributes(element); 29578 xml.enter(FHIR_NS, name); 29579 composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements(element); 29580 composeElementClose(element); 29581 xml.exit(FHIR_NS, name); 29582 } 29583 } 29584 29585 protected void composeAdverseEventAdverseEventSuspectEntityCausalityComponentElements( 29586 AdverseEvent.AdverseEventSuspectEntityCausalityComponent element) throws IOException { 29587 composeBackboneElementElements(element); 29588 if (element.hasAssessment()) { 29589 composeCodeableConcept("assessment", element.getAssessment()); 29590 } 29591 if (element.hasProductRelatednessElement()) { 29592 composeString("productRelatedness", element.getProductRelatednessElement()); 29593 } 29594 if (element.hasAuthor()) { 29595 composeReference("author", element.getAuthor()); 29596 } 29597 if (element.hasMethod()) { 29598 composeCodeableConcept("method", element.getMethod()); 29599 } 29600 } 29601 29602 protected void composeAllergyIntolerance(String name, AllergyIntolerance element) throws IOException { 29603 if (element != null) { 29604 composeDomainResourceAttributes(element); 29605 xml.enter(FHIR_NS, name); 29606 composeAllergyIntoleranceElements(element); 29607 composeElementClose(element); 29608 xml.exit(FHIR_NS, name); 29609 } 29610 } 29611 29612 protected void composeAllergyIntoleranceElements(AllergyIntolerance element) throws IOException { 29613 composeDomainResourceElements(element); 29614 if (element.hasIdentifier()) { 29615 for (Identifier e : element.getIdentifier()) 29616 composeIdentifier("identifier", e); 29617 } 29618 if (element.hasClinicalStatus()) { 29619 composeCodeableConcept("clinicalStatus", element.getClinicalStatus()); 29620 } 29621 if (element.hasVerificationStatus()) { 29622 composeCodeableConcept("verificationStatus", element.getVerificationStatus()); 29623 } 29624 if (element.hasTypeElement()) 29625 composeEnumeration("type", element.getTypeElement(), new AllergyIntolerance.AllergyIntoleranceTypeEnumFactory()); 29626 if (element.hasCategory()) 29627 for (Enumeration<AllergyIntolerance.AllergyIntoleranceCategory> e : element.getCategory()) 29628 composeEnumeration("category", e, new AllergyIntolerance.AllergyIntoleranceCategoryEnumFactory()); 29629 if (element.hasCriticalityElement()) 29630 composeEnumeration("criticality", element.getCriticalityElement(), 29631 new AllergyIntolerance.AllergyIntoleranceCriticalityEnumFactory()); 29632 if (element.hasCode()) { 29633 composeCodeableConcept("code", element.getCode()); 29634 } 29635 if (element.hasPatient()) { 29636 composeReference("patient", element.getPatient()); 29637 } 29638 if (element.hasEncounter()) { 29639 composeReference("encounter", element.getEncounter()); 29640 } 29641 if (element.hasOnset()) { 29642 composeType("onset", element.getOnset()); 29643 } 29644 if (element.hasRecordedDateElement()) { 29645 composeDateTime("recordedDate", element.getRecordedDateElement()); 29646 } 29647 if (element.hasRecorder()) { 29648 composeReference("recorder", element.getRecorder()); 29649 } 29650 if (element.hasAsserter()) { 29651 composeReference("asserter", element.getAsserter()); 29652 } 29653 if (element.hasLastOccurrenceElement()) { 29654 composeDateTime("lastOccurrence", element.getLastOccurrenceElement()); 29655 } 29656 if (element.hasNote()) { 29657 for (Annotation e : element.getNote()) 29658 composeAnnotation("note", e); 29659 } 29660 if (element.hasReaction()) { 29661 for (AllergyIntolerance.AllergyIntoleranceReactionComponent e : element.getReaction()) 29662 composeAllergyIntoleranceAllergyIntoleranceReactionComponent("reaction", e); 29663 } 29664 } 29665 29666 protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponent(String name, 29667 AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { 29668 if (element != null) { 29669 composeElementAttributes(element); 29670 xml.enter(FHIR_NS, name); 29671 composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements(element); 29672 composeElementClose(element); 29673 xml.exit(FHIR_NS, name); 29674 } 29675 } 29676 29677 protected void composeAllergyIntoleranceAllergyIntoleranceReactionComponentElements( 29678 AllergyIntolerance.AllergyIntoleranceReactionComponent element) throws IOException { 29679 composeBackboneElementElements(element); 29680 if (element.hasSubstance()) { 29681 composeCodeableConcept("substance", element.getSubstance()); 29682 } 29683 if (element.hasManifestation()) { 29684 for (CodeableConcept e : element.getManifestation()) 29685 composeCodeableConcept("manifestation", e); 29686 } 29687 if (element.hasDescriptionElement()) { 29688 composeString("description", element.getDescriptionElement()); 29689 } 29690 if (element.hasOnsetElement()) { 29691 composeDateTime("onset", element.getOnsetElement()); 29692 } 29693 if (element.hasSeverityElement()) 29694 composeEnumeration("severity", element.getSeverityElement(), 29695 new AllergyIntolerance.AllergyIntoleranceSeverityEnumFactory()); 29696 if (element.hasExposureRoute()) { 29697 composeCodeableConcept("exposureRoute", element.getExposureRoute()); 29698 } 29699 if (element.hasNote()) { 29700 for (Annotation e : element.getNote()) 29701 composeAnnotation("note", e); 29702 } 29703 } 29704 29705 protected void composeAppointment(String name, Appointment element) throws IOException { 29706 if (element != null) { 29707 composeDomainResourceAttributes(element); 29708 xml.enter(FHIR_NS, name); 29709 composeAppointmentElements(element); 29710 composeElementClose(element); 29711 xml.exit(FHIR_NS, name); 29712 } 29713 } 29714 29715 protected void composeAppointmentElements(Appointment element) throws IOException { 29716 composeDomainResourceElements(element); 29717 if (element.hasIdentifier()) { 29718 for (Identifier e : element.getIdentifier()) 29719 composeIdentifier("identifier", e); 29720 } 29721 if (element.hasStatusElement()) 29722 composeEnumeration("status", element.getStatusElement(), new Appointment.AppointmentStatusEnumFactory()); 29723 if (element.hasCancelationReason()) { 29724 composeCodeableConcept("cancelationReason", element.getCancelationReason()); 29725 } 29726 if (element.hasServiceCategory()) { 29727 for (CodeableConcept e : element.getServiceCategory()) 29728 composeCodeableConcept("serviceCategory", e); 29729 } 29730 if (element.hasServiceType()) { 29731 for (CodeableConcept e : element.getServiceType()) 29732 composeCodeableConcept("serviceType", e); 29733 } 29734 if (element.hasSpecialty()) { 29735 for (CodeableConcept e : element.getSpecialty()) 29736 composeCodeableConcept("specialty", e); 29737 } 29738 if (element.hasAppointmentType()) { 29739 composeCodeableConcept("appointmentType", element.getAppointmentType()); 29740 } 29741 if (element.hasReasonCode()) { 29742 for (CodeableConcept e : element.getReasonCode()) 29743 composeCodeableConcept("reasonCode", e); 29744 } 29745 if (element.hasReasonReference()) { 29746 for (Reference e : element.getReasonReference()) 29747 composeReference("reasonReference", e); 29748 } 29749 if (element.hasPriorityElement()) { 29750 composeUnsignedInt("priority", element.getPriorityElement()); 29751 } 29752 if (element.hasDescriptionElement()) { 29753 composeString("description", element.getDescriptionElement()); 29754 } 29755 if (element.hasSupportingInformation()) { 29756 for (Reference e : element.getSupportingInformation()) 29757 composeReference("supportingInformation", e); 29758 } 29759 if (element.hasStartElement()) { 29760 composeInstant("start", element.getStartElement()); 29761 } 29762 if (element.hasEndElement()) { 29763 composeInstant("end", element.getEndElement()); 29764 } 29765 if (element.hasMinutesDurationElement()) { 29766 composePositiveInt("minutesDuration", element.getMinutesDurationElement()); 29767 } 29768 if (element.hasSlot()) { 29769 for (Reference e : element.getSlot()) 29770 composeReference("slot", e); 29771 } 29772 if (element.hasCreatedElement()) { 29773 composeDateTime("created", element.getCreatedElement()); 29774 } 29775 if (element.hasCommentElement()) { 29776 composeString("comment", element.getCommentElement()); 29777 } 29778 if (element.hasPatientInstructionElement()) { 29779 composeString("patientInstruction", element.getPatientInstructionElement()); 29780 } 29781 if (element.hasBasedOn()) { 29782 for (Reference e : element.getBasedOn()) 29783 composeReference("basedOn", e); 29784 } 29785 if (element.hasParticipant()) { 29786 for (Appointment.AppointmentParticipantComponent e : element.getParticipant()) 29787 composeAppointmentAppointmentParticipantComponent("participant", e); 29788 } 29789 if (element.hasRequestedPeriod()) { 29790 for (Period e : element.getRequestedPeriod()) 29791 composePeriod("requestedPeriod", e); 29792 } 29793 } 29794 29795 protected void composeAppointmentAppointmentParticipantComponent(String name, 29796 Appointment.AppointmentParticipantComponent element) throws IOException { 29797 if (element != null) { 29798 composeElementAttributes(element); 29799 xml.enter(FHIR_NS, name); 29800 composeAppointmentAppointmentParticipantComponentElements(element); 29801 composeElementClose(element); 29802 xml.exit(FHIR_NS, name); 29803 } 29804 } 29805 29806 protected void composeAppointmentAppointmentParticipantComponentElements( 29807 Appointment.AppointmentParticipantComponent element) throws IOException { 29808 composeBackboneElementElements(element); 29809 if (element.hasType()) { 29810 for (CodeableConcept e : element.getType()) 29811 composeCodeableConcept("type", e); 29812 } 29813 if (element.hasActor()) { 29814 composeReference("actor", element.getActor()); 29815 } 29816 if (element.hasRequiredElement()) 29817 composeEnumeration("required", element.getRequiredElement(), new Appointment.ParticipantRequiredEnumFactory()); 29818 if (element.hasStatusElement()) 29819 composeEnumeration("status", element.getStatusElement(), new Appointment.ParticipationStatusEnumFactory()); 29820 if (element.hasPeriod()) { 29821 composePeriod("period", element.getPeriod()); 29822 } 29823 } 29824 29825 protected void composeAppointmentResponse(String name, AppointmentResponse element) throws IOException { 29826 if (element != null) { 29827 composeDomainResourceAttributes(element); 29828 xml.enter(FHIR_NS, name); 29829 composeAppointmentResponseElements(element); 29830 composeElementClose(element); 29831 xml.exit(FHIR_NS, name); 29832 } 29833 } 29834 29835 protected void composeAppointmentResponseElements(AppointmentResponse element) throws IOException { 29836 composeDomainResourceElements(element); 29837 if (element.hasIdentifier()) { 29838 for (Identifier e : element.getIdentifier()) 29839 composeIdentifier("identifier", e); 29840 } 29841 if (element.hasAppointment()) { 29842 composeReference("appointment", element.getAppointment()); 29843 } 29844 if (element.hasStartElement()) { 29845 composeInstant("start", element.getStartElement()); 29846 } 29847 if (element.hasEndElement()) { 29848 composeInstant("end", element.getEndElement()); 29849 } 29850 if (element.hasParticipantType()) { 29851 for (CodeableConcept e : element.getParticipantType()) 29852 composeCodeableConcept("participantType", e); 29853 } 29854 if (element.hasActor()) { 29855 composeReference("actor", element.getActor()); 29856 } 29857 if (element.hasParticipantStatusElement()) 29858 composeEnumeration("participantStatus", element.getParticipantStatusElement(), 29859 new AppointmentResponse.ParticipantStatusEnumFactory()); 29860 if (element.hasCommentElement()) { 29861 composeString("comment", element.getCommentElement()); 29862 } 29863 } 29864 29865 protected void composeAuditEvent(String name, AuditEvent element) throws IOException { 29866 if (element != null) { 29867 composeDomainResourceAttributes(element); 29868 xml.enter(FHIR_NS, name); 29869 composeAuditEventElements(element); 29870 composeElementClose(element); 29871 xml.exit(FHIR_NS, name); 29872 } 29873 } 29874 29875 protected void composeAuditEventElements(AuditEvent element) throws IOException { 29876 composeDomainResourceElements(element); 29877 if (element.hasType()) { 29878 composeCoding("type", element.getType()); 29879 } 29880 if (element.hasSubtype()) { 29881 for (Coding e : element.getSubtype()) 29882 composeCoding("subtype", e); 29883 } 29884 if (element.hasActionElement()) 29885 composeEnumeration("action", element.getActionElement(), new AuditEvent.AuditEventActionEnumFactory()); 29886 if (element.hasPeriod()) { 29887 composePeriod("period", element.getPeriod()); 29888 } 29889 if (element.hasRecordedElement()) { 29890 composeInstant("recorded", element.getRecordedElement()); 29891 } 29892 if (element.hasOutcomeElement()) 29893 composeEnumeration("outcome", element.getOutcomeElement(), new AuditEvent.AuditEventOutcomeEnumFactory()); 29894 if (element.hasOutcomeDescElement()) { 29895 composeString("outcomeDesc", element.getOutcomeDescElement()); 29896 } 29897 if (element.hasPurposeOfEvent()) { 29898 for (CodeableConcept e : element.getPurposeOfEvent()) 29899 composeCodeableConcept("purposeOfEvent", e); 29900 } 29901 if (element.hasAgent()) { 29902 for (AuditEvent.AuditEventAgentComponent e : element.getAgent()) 29903 composeAuditEventAuditEventAgentComponent("agent", e); 29904 } 29905 if (element.hasSource()) { 29906 composeAuditEventAuditEventSourceComponent("source", element.getSource()); 29907 } 29908 if (element.hasEntity()) { 29909 for (AuditEvent.AuditEventEntityComponent e : element.getEntity()) 29910 composeAuditEventAuditEventEntityComponent("entity", e); 29911 } 29912 } 29913 29914 protected void composeAuditEventAuditEventAgentComponent(String name, AuditEvent.AuditEventAgentComponent element) 29915 throws IOException { 29916 if (element != null) { 29917 composeElementAttributes(element); 29918 xml.enter(FHIR_NS, name); 29919 composeAuditEventAuditEventAgentComponentElements(element); 29920 composeElementClose(element); 29921 xml.exit(FHIR_NS, name); 29922 } 29923 } 29924 29925 protected void composeAuditEventAuditEventAgentComponentElements(AuditEvent.AuditEventAgentComponent element) 29926 throws IOException { 29927 composeBackboneElementElements(element); 29928 if (element.hasType()) { 29929 composeCodeableConcept("type", element.getType()); 29930 } 29931 if (element.hasRole()) { 29932 for (CodeableConcept e : element.getRole()) 29933 composeCodeableConcept("role", e); 29934 } 29935 if (element.hasWho()) { 29936 composeReference("who", element.getWho()); 29937 } 29938 if (element.hasAltIdElement()) { 29939 composeString("altId", element.getAltIdElement()); 29940 } 29941 if (element.hasNameElement()) { 29942 composeString("name", element.getNameElement()); 29943 } 29944 if (element.hasRequestorElement()) { 29945 composeBoolean("requestor", element.getRequestorElement()); 29946 } 29947 if (element.hasLocation()) { 29948 composeReference("location", element.getLocation()); 29949 } 29950 if (element.hasPolicy()) { 29951 for (UriType e : element.getPolicy()) 29952 composeUri("policy", e); 29953 } 29954 if (element.hasMedia()) { 29955 composeCoding("media", element.getMedia()); 29956 } 29957 if (element.hasNetwork()) { 29958 composeAuditEventAuditEventAgentNetworkComponent("network", element.getNetwork()); 29959 } 29960 if (element.hasPurposeOfUse()) { 29961 for (CodeableConcept e : element.getPurposeOfUse()) 29962 composeCodeableConcept("purposeOfUse", e); 29963 } 29964 } 29965 29966 protected void composeAuditEventAuditEventAgentNetworkComponent(String name, 29967 AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { 29968 if (element != null) { 29969 composeElementAttributes(element); 29970 xml.enter(FHIR_NS, name); 29971 composeAuditEventAuditEventAgentNetworkComponentElements(element); 29972 composeElementClose(element); 29973 xml.exit(FHIR_NS, name); 29974 } 29975 } 29976 29977 protected void composeAuditEventAuditEventAgentNetworkComponentElements( 29978 AuditEvent.AuditEventAgentNetworkComponent element) throws IOException { 29979 composeBackboneElementElements(element); 29980 if (element.hasAddressElement()) { 29981 composeString("address", element.getAddressElement()); 29982 } 29983 if (element.hasTypeElement()) 29984 composeEnumeration("type", element.getTypeElement(), new AuditEvent.AuditEventAgentNetworkTypeEnumFactory()); 29985 } 29986 29987 protected void composeAuditEventAuditEventSourceComponent(String name, AuditEvent.AuditEventSourceComponent element) 29988 throws IOException { 29989 if (element != null) { 29990 composeElementAttributes(element); 29991 xml.enter(FHIR_NS, name); 29992 composeAuditEventAuditEventSourceComponentElements(element); 29993 composeElementClose(element); 29994 xml.exit(FHIR_NS, name); 29995 } 29996 } 29997 29998 protected void composeAuditEventAuditEventSourceComponentElements(AuditEvent.AuditEventSourceComponent element) 29999 throws IOException { 30000 composeBackboneElementElements(element); 30001 if (element.hasSiteElement()) { 30002 composeString("site", element.getSiteElement()); 30003 } 30004 if (element.hasObserver()) { 30005 composeReference("observer", element.getObserver()); 30006 } 30007 if (element.hasType()) { 30008 for (Coding e : element.getType()) 30009 composeCoding("type", e); 30010 } 30011 } 30012 30013 protected void composeAuditEventAuditEventEntityComponent(String name, AuditEvent.AuditEventEntityComponent element) 30014 throws IOException { 30015 if (element != null) { 30016 composeElementAttributes(element); 30017 xml.enter(FHIR_NS, name); 30018 composeAuditEventAuditEventEntityComponentElements(element); 30019 composeElementClose(element); 30020 xml.exit(FHIR_NS, name); 30021 } 30022 } 30023 30024 protected void composeAuditEventAuditEventEntityComponentElements(AuditEvent.AuditEventEntityComponent element) 30025 throws IOException { 30026 composeBackboneElementElements(element); 30027 if (element.hasWhat()) { 30028 composeReference("what", element.getWhat()); 30029 } 30030 if (element.hasType()) { 30031 composeCoding("type", element.getType()); 30032 } 30033 if (element.hasRole()) { 30034 composeCoding("role", element.getRole()); 30035 } 30036 if (element.hasLifecycle()) { 30037 composeCoding("lifecycle", element.getLifecycle()); 30038 } 30039 if (element.hasSecurityLabel()) { 30040 for (Coding e : element.getSecurityLabel()) 30041 composeCoding("securityLabel", e); 30042 } 30043 if (element.hasNameElement()) { 30044 composeString("name", element.getNameElement()); 30045 } 30046 if (element.hasDescriptionElement()) { 30047 composeString("description", element.getDescriptionElement()); 30048 } 30049 if (element.hasQueryElement()) { 30050 composeBase64Binary("query", element.getQueryElement()); 30051 } 30052 if (element.hasDetail()) { 30053 for (AuditEvent.AuditEventEntityDetailComponent e : element.getDetail()) 30054 composeAuditEventAuditEventEntityDetailComponent("detail", e); 30055 } 30056 } 30057 30058 protected void composeAuditEventAuditEventEntityDetailComponent(String name, 30059 AuditEvent.AuditEventEntityDetailComponent element) throws IOException { 30060 if (element != null) { 30061 composeElementAttributes(element); 30062 xml.enter(FHIR_NS, name); 30063 composeAuditEventAuditEventEntityDetailComponentElements(element); 30064 composeElementClose(element); 30065 xml.exit(FHIR_NS, name); 30066 } 30067 } 30068 30069 protected void composeAuditEventAuditEventEntityDetailComponentElements( 30070 AuditEvent.AuditEventEntityDetailComponent element) throws IOException { 30071 composeBackboneElementElements(element); 30072 if (element.hasTypeElement()) { 30073 composeString("type", element.getTypeElement()); 30074 } 30075 if (element.hasValue()) { 30076 composeType("value", element.getValue()); 30077 } 30078 } 30079 30080 protected void composeBasic(String name, Basic element) throws IOException { 30081 if (element != null) { 30082 composeDomainResourceAttributes(element); 30083 xml.enter(FHIR_NS, name); 30084 composeBasicElements(element); 30085 composeElementClose(element); 30086 xml.exit(FHIR_NS, name); 30087 } 30088 } 30089 30090 protected void composeBasicElements(Basic element) throws IOException { 30091 composeDomainResourceElements(element); 30092 if (element.hasIdentifier()) { 30093 for (Identifier e : element.getIdentifier()) 30094 composeIdentifier("identifier", e); 30095 } 30096 if (element.hasCode()) { 30097 composeCodeableConcept("code", element.getCode()); 30098 } 30099 if (element.hasSubject()) { 30100 composeReference("subject", element.getSubject()); 30101 } 30102 if (element.hasCreatedElement()) { 30103 composeDate("created", element.getCreatedElement()); 30104 } 30105 if (element.hasAuthor()) { 30106 composeReference("author", element.getAuthor()); 30107 } 30108 } 30109 30110 protected void composeBinary(String name, Binary element) throws IOException { 30111 if (element != null) { 30112 composeResourceAttributes(element); 30113 xml.enter(FHIR_NS, name); 30114 composeBinaryElements(element); 30115 composeElementClose(element); 30116 xml.exit(FHIR_NS, name); 30117 } 30118 } 30119 30120 protected void composeBinaryElements(Binary element) throws IOException { 30121 composeResourceElements(element); 30122 if (element.hasContentTypeElement()) { 30123 composeCode("contentType", element.getContentTypeElement()); 30124 } 30125 if (element.hasSecurityContext()) { 30126 composeReference("securityContext", element.getSecurityContext()); 30127 } 30128 if (element.hasDataElement()) { 30129 composeBase64Binary("data", element.getDataElement()); 30130 } 30131 } 30132 30133 protected void composeBiologicallyDerivedProduct(String name, BiologicallyDerivedProduct element) throws IOException { 30134 if (element != null) { 30135 composeDomainResourceAttributes(element); 30136 xml.enter(FHIR_NS, name); 30137 composeBiologicallyDerivedProductElements(element); 30138 composeElementClose(element); 30139 xml.exit(FHIR_NS, name); 30140 } 30141 } 30142 30143 protected void composeBiologicallyDerivedProductElements(BiologicallyDerivedProduct element) throws IOException { 30144 composeDomainResourceElements(element); 30145 if (element.hasIdentifier()) { 30146 for (Identifier e : element.getIdentifier()) 30147 composeIdentifier("identifier", e); 30148 } 30149 if (element.hasProductCategoryElement()) 30150 composeEnumeration("productCategory", element.getProductCategoryElement(), 30151 new BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory()); 30152 if (element.hasProductCode()) { 30153 composeCodeableConcept("productCode", element.getProductCode()); 30154 } 30155 if (element.hasStatusElement()) 30156 composeEnumeration("status", element.getStatusElement(), 30157 new BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory()); 30158 if (element.hasRequest()) { 30159 for (Reference e : element.getRequest()) 30160 composeReference("request", e); 30161 } 30162 if (element.hasQuantityElement()) { 30163 composeInteger("quantity", element.getQuantityElement()); 30164 } 30165 if (element.hasParent()) { 30166 for (Reference e : element.getParent()) 30167 composeReference("parent", e); 30168 } 30169 if (element.hasCollection()) { 30170 composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent("collection", 30171 element.getCollection()); 30172 } 30173 if (element.hasProcessing()) { 30174 for (BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent e : element.getProcessing()) 30175 composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent("processing", e); 30176 } 30177 if (element.hasManipulation()) { 30178 composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent("manipulation", 30179 element.getManipulation()); 30180 } 30181 if (element.hasStorage()) { 30182 for (BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent e : element.getStorage()) 30183 composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent("storage", e); 30184 } 30185 } 30186 30187 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponent(String name, 30188 BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException { 30189 if (element != null) { 30190 composeElementAttributes(element); 30191 xml.enter(FHIR_NS, name); 30192 composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentElements(element); 30193 composeElementClose(element); 30194 xml.exit(FHIR_NS, name); 30195 } 30196 } 30197 30198 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductCollectionComponentElements( 30199 BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent element) throws IOException { 30200 composeBackboneElementElements(element); 30201 if (element.hasCollector()) { 30202 composeReference("collector", element.getCollector()); 30203 } 30204 if (element.hasSource()) { 30205 composeReference("source", element.getSource()); 30206 } 30207 if (element.hasCollected()) { 30208 composeType("collected", element.getCollected()); 30209 } 30210 } 30211 30212 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponent(String name, 30213 BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent element) throws IOException { 30214 if (element != null) { 30215 composeElementAttributes(element); 30216 xml.enter(FHIR_NS, name); 30217 composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentElements(element); 30218 composeElementClose(element); 30219 xml.exit(FHIR_NS, name); 30220 } 30221 } 30222 30223 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductProcessingComponentElements( 30224 BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent element) throws IOException { 30225 composeBackboneElementElements(element); 30226 if (element.hasDescriptionElement()) { 30227 composeString("description", element.getDescriptionElement()); 30228 } 30229 if (element.hasProcedure()) { 30230 composeCodeableConcept("procedure", element.getProcedure()); 30231 } 30232 if (element.hasAdditive()) { 30233 composeReference("additive", element.getAdditive()); 30234 } 30235 if (element.hasTime()) { 30236 composeType("time", element.getTime()); 30237 } 30238 } 30239 30240 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponent(String name, 30241 BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent element) throws IOException { 30242 if (element != null) { 30243 composeElementAttributes(element); 30244 xml.enter(FHIR_NS, name); 30245 composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentElements(element); 30246 composeElementClose(element); 30247 xml.exit(FHIR_NS, name); 30248 } 30249 } 30250 30251 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductManipulationComponentElements( 30252 BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent element) throws IOException { 30253 composeBackboneElementElements(element); 30254 if (element.hasDescriptionElement()) { 30255 composeString("description", element.getDescriptionElement()); 30256 } 30257 if (element.hasTime()) { 30258 composeType("time", element.getTime()); 30259 } 30260 } 30261 30262 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponent(String name, 30263 BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent element) throws IOException { 30264 if (element != null) { 30265 composeElementAttributes(element); 30266 xml.enter(FHIR_NS, name); 30267 composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentElements(element); 30268 composeElementClose(element); 30269 xml.exit(FHIR_NS, name); 30270 } 30271 } 30272 30273 protected void composeBiologicallyDerivedProductBiologicallyDerivedProductStorageComponentElements( 30274 BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent element) throws IOException { 30275 composeBackboneElementElements(element); 30276 if (element.hasDescriptionElement()) { 30277 composeString("description", element.getDescriptionElement()); 30278 } 30279 if (element.hasTemperatureElement()) { 30280 composeDecimal("temperature", element.getTemperatureElement()); 30281 } 30282 if (element.hasScaleElement()) 30283 composeEnumeration("scale", element.getScaleElement(), 30284 new BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory()); 30285 if (element.hasDuration()) { 30286 composePeriod("duration", element.getDuration()); 30287 } 30288 } 30289 30290 protected void composeBodyStructure(String name, BodyStructure element) throws IOException { 30291 if (element != null) { 30292 composeDomainResourceAttributes(element); 30293 xml.enter(FHIR_NS, name); 30294 composeBodyStructureElements(element); 30295 composeElementClose(element); 30296 xml.exit(FHIR_NS, name); 30297 } 30298 } 30299 30300 protected void composeBodyStructureElements(BodyStructure element) throws IOException { 30301 composeDomainResourceElements(element); 30302 if (element.hasIdentifier()) { 30303 for (Identifier e : element.getIdentifier()) 30304 composeIdentifier("identifier", e); 30305 } 30306 if (element.hasActiveElement()) { 30307 composeBoolean("active", element.getActiveElement()); 30308 } 30309 if (element.hasMorphology()) { 30310 composeCodeableConcept("morphology", element.getMorphology()); 30311 } 30312 if (element.hasLocation()) { 30313 composeCodeableConcept("location", element.getLocation()); 30314 } 30315 if (element.hasLocationQualifier()) { 30316 for (CodeableConcept e : element.getLocationQualifier()) 30317 composeCodeableConcept("locationQualifier", e); 30318 } 30319 if (element.hasDescriptionElement()) { 30320 composeString("description", element.getDescriptionElement()); 30321 } 30322 if (element.hasImage()) { 30323 for (Attachment e : element.getImage()) 30324 composeAttachment("image", e); 30325 } 30326 if (element.hasPatient()) { 30327 composeReference("patient", element.getPatient()); 30328 } 30329 } 30330 30331 protected void composeBundle(String name, Bundle element) throws IOException { 30332 if (element != null) { 30333 composeResourceAttributes(element); 30334 xml.enter(FHIR_NS, name); 30335 composeBundleElements(element); 30336 composeElementClose(element); 30337 xml.exit(FHIR_NS, name); 30338 } 30339 } 30340 30341 protected void composeBundleElements(Bundle element) throws IOException { 30342 composeResourceElements(element); 30343 if (element.hasIdentifier()) { 30344 composeIdentifier("identifier", element.getIdentifier()); 30345 } 30346 if (element.hasTypeElement()) 30347 composeEnumeration("type", element.getTypeElement(), new Bundle.BundleTypeEnumFactory()); 30348 if (element.hasTimestampElement()) { 30349 composeInstant("timestamp", element.getTimestampElement()); 30350 } 30351 if (element.hasTotalElement()) { 30352 composeUnsignedInt("total", element.getTotalElement()); 30353 } 30354 if (element.hasLink()) { 30355 for (Bundle.BundleLinkComponent e : element.getLink()) 30356 composeBundleBundleLinkComponent("link", e); 30357 } 30358 if (element.hasEntry()) { 30359 for (Bundle.BundleEntryComponent e : element.getEntry()) 30360 composeBundleBundleEntryComponent("entry", e); 30361 } 30362 if (element.hasSignature()) { 30363 composeSignature("signature", element.getSignature()); 30364 } 30365 } 30366 30367 protected void composeBundleBundleLinkComponent(String name, Bundle.BundleLinkComponent element) throws IOException { 30368 if (element != null) { 30369 composeElementAttributes(element); 30370 xml.enter(FHIR_NS, name); 30371 composeBundleBundleLinkComponentElements(element); 30372 composeElementClose(element); 30373 xml.exit(FHIR_NS, name); 30374 } 30375 } 30376 30377 protected void composeBundleBundleLinkComponentElements(Bundle.BundleLinkComponent element) throws IOException { 30378 composeBackboneElementElements(element); 30379 if (element.hasRelationElement()) { 30380 composeString("relation", element.getRelationElement()); 30381 } 30382 if (element.hasUrlElement()) { 30383 composeUri("url", element.getUrlElement()); 30384 } 30385 } 30386 30387 protected void composeBundleBundleEntryComponent(String name, Bundle.BundleEntryComponent element) 30388 throws IOException { 30389 if (element != null) { 30390 composeElementAttributes(element); 30391 xml.enter(FHIR_NS, name); 30392 composeBundleBundleEntryComponentElements(element); 30393 composeElementClose(element); 30394 xml.exit(FHIR_NS, name); 30395 } 30396 } 30397 30398 protected void composeBundleBundleEntryComponentElements(Bundle.BundleEntryComponent element) throws IOException { 30399 composeBackboneElementElements(element); 30400 if (element.hasLink()) { 30401 for (Bundle.BundleLinkComponent e : element.getLink()) 30402 composeBundleBundleLinkComponent("link", e); 30403 } 30404 if (element.hasFullUrlElement()) { 30405 composeUri("fullUrl", element.getFullUrlElement()); 30406 } 30407 if (element.hasResource()) { 30408 xml.enter(FHIR_NS, "resource"); 30409 composeResource(element.getResource()); 30410 xml.exit(FHIR_NS, "resource"); 30411 } 30412 if (element.hasSearch()) { 30413 composeBundleBundleEntrySearchComponent("search", element.getSearch()); 30414 } 30415 if (element.hasRequest()) { 30416 composeBundleBundleEntryRequestComponent("request", element.getRequest()); 30417 } 30418 if (element.hasResponse()) { 30419 composeBundleBundleEntryResponseComponent("response", element.getResponse()); 30420 } 30421 } 30422 30423 protected void composeBundleBundleEntrySearchComponent(String name, Bundle.BundleEntrySearchComponent element) 30424 throws IOException { 30425 if (element != null) { 30426 composeElementAttributes(element); 30427 xml.enter(FHIR_NS, name); 30428 composeBundleBundleEntrySearchComponentElements(element); 30429 composeElementClose(element); 30430 xml.exit(FHIR_NS, name); 30431 } 30432 } 30433 30434 protected void composeBundleBundleEntrySearchComponentElements(Bundle.BundleEntrySearchComponent element) 30435 throws IOException { 30436 composeBackboneElementElements(element); 30437 if (element.hasModeElement()) 30438 composeEnumeration("mode", element.getModeElement(), new Bundle.SearchEntryModeEnumFactory()); 30439 if (element.hasScoreElement()) { 30440 composeDecimal("score", element.getScoreElement()); 30441 } 30442 } 30443 30444 protected void composeBundleBundleEntryRequestComponent(String name, Bundle.BundleEntryRequestComponent element) 30445 throws IOException { 30446 if (element != null) { 30447 composeElementAttributes(element); 30448 xml.enter(FHIR_NS, name); 30449 composeBundleBundleEntryRequestComponentElements(element); 30450 composeElementClose(element); 30451 xml.exit(FHIR_NS, name); 30452 } 30453 } 30454 30455 protected void composeBundleBundleEntryRequestComponentElements(Bundle.BundleEntryRequestComponent element) 30456 throws IOException { 30457 composeBackboneElementElements(element); 30458 if (element.hasMethodElement()) 30459 composeEnumeration("method", element.getMethodElement(), new Bundle.HTTPVerbEnumFactory()); 30460 if (element.hasUrlElement()) { 30461 composeUri("url", element.getUrlElement()); 30462 } 30463 if (element.hasIfNoneMatchElement()) { 30464 composeString("ifNoneMatch", element.getIfNoneMatchElement()); 30465 } 30466 if (element.hasIfModifiedSinceElement()) { 30467 composeInstant("ifModifiedSince", element.getIfModifiedSinceElement()); 30468 } 30469 if (element.hasIfMatchElement()) { 30470 composeString("ifMatch", element.getIfMatchElement()); 30471 } 30472 if (element.hasIfNoneExistElement()) { 30473 composeString("ifNoneExist", element.getIfNoneExistElement()); 30474 } 30475 } 30476 30477 protected void composeBundleBundleEntryResponseComponent(String name, Bundle.BundleEntryResponseComponent element) 30478 throws IOException { 30479 if (element != null) { 30480 composeElementAttributes(element); 30481 xml.enter(FHIR_NS, name); 30482 composeBundleBundleEntryResponseComponentElements(element); 30483 composeElementClose(element); 30484 xml.exit(FHIR_NS, name); 30485 } 30486 } 30487 30488 protected void composeBundleBundleEntryResponseComponentElements(Bundle.BundleEntryResponseComponent element) 30489 throws IOException { 30490 composeBackboneElementElements(element); 30491 if (element.hasStatusElement()) { 30492 composeString("status", element.getStatusElement()); 30493 } 30494 if (element.hasLocationElement()) { 30495 composeUri("location", element.getLocationElement()); 30496 } 30497 if (element.hasEtagElement()) { 30498 composeString("etag", element.getEtagElement()); 30499 } 30500 if (element.hasLastModifiedElement()) { 30501 composeInstant("lastModified", element.getLastModifiedElement()); 30502 } 30503 if (element.hasOutcome()) { 30504 xml.enter(FHIR_NS, "outcome"); 30505 composeResource(element.getOutcome()); 30506 xml.exit(FHIR_NS, "outcome"); 30507 } 30508 } 30509 30510 protected void composeCapabilityStatement(String name, CapabilityStatement element) throws IOException { 30511 if (element != null) { 30512 composeDomainResourceAttributes(element); 30513 xml.enter(FHIR_NS, name); 30514 composeCapabilityStatementElements(element); 30515 composeElementClose(element); 30516 xml.exit(FHIR_NS, name); 30517 } 30518 } 30519 30520 protected void composeCapabilityStatementElements(CapabilityStatement element) throws IOException { 30521 composeDomainResourceElements(element); 30522 if (element.hasUrlElement()) { 30523 composeUri("url", element.getUrlElement()); 30524 } 30525 if (element.hasVersionElement()) { 30526 composeString("version", element.getVersionElement()); 30527 } 30528 if (element.hasNameElement()) { 30529 composeString("name", element.getNameElement()); 30530 } 30531 if (element.hasTitleElement()) { 30532 composeString("title", element.getTitleElement()); 30533 } 30534 if (element.hasStatusElement()) 30535 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 30536 if (element.hasExperimentalElement()) { 30537 composeBoolean("experimental", element.getExperimentalElement()); 30538 } 30539 if (element.hasDateElement()) { 30540 composeDateTime("date", element.getDateElement()); 30541 } 30542 if (element.hasPublisherElement()) { 30543 composeString("publisher", element.getPublisherElement()); 30544 } 30545 if (element.hasContact()) { 30546 for (ContactDetail e : element.getContact()) 30547 composeContactDetail("contact", e); 30548 } 30549 if (element.hasDescriptionElement()) { 30550 composeMarkdown("description", element.getDescriptionElement()); 30551 } 30552 if (element.hasUseContext()) { 30553 for (UsageContext e : element.getUseContext()) 30554 composeUsageContext("useContext", e); 30555 } 30556 if (element.hasJurisdiction()) { 30557 for (CodeableConcept e : element.getJurisdiction()) 30558 composeCodeableConcept("jurisdiction", e); 30559 } 30560 if (element.hasPurposeElement()) { 30561 composeMarkdown("purpose", element.getPurposeElement()); 30562 } 30563 if (element.hasCopyrightElement()) { 30564 composeMarkdown("copyright", element.getCopyrightElement()); 30565 } 30566 if (element.hasKindElement()) 30567 composeEnumeration("kind", element.getKindElement(), 30568 new CapabilityStatement.CapabilityStatementKindEnumFactory()); 30569 if (element.hasInstantiates()) { 30570 for (CanonicalType e : element.getInstantiates()) 30571 composeCanonical("instantiates", e); 30572 } 30573 if (element.hasImports()) { 30574 for (CanonicalType e : element.getImports()) 30575 composeCanonical("imports", e); 30576 } 30577 if (element.hasSoftware()) { 30578 composeCapabilityStatementCapabilityStatementSoftwareComponent("software", element.getSoftware()); 30579 } 30580 if (element.hasImplementation()) { 30581 composeCapabilityStatementCapabilityStatementImplementationComponent("implementation", 30582 element.getImplementation()); 30583 } 30584 if (element.hasFhirVersionElement()) 30585 composeEnumeration("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory()); 30586 if (element.hasFormat()) { 30587 for (CodeType e : element.getFormat()) 30588 composeCode("format", e); 30589 } 30590 if (element.hasPatchFormat()) { 30591 for (CodeType e : element.getPatchFormat()) 30592 composeCode("patchFormat", e); 30593 } 30594 if (element.hasImplementationGuide()) { 30595 for (CanonicalType e : element.getImplementationGuide()) 30596 composeCanonical("implementationGuide", e); 30597 } 30598 if (element.hasRest()) { 30599 for (CapabilityStatement.CapabilityStatementRestComponent e : element.getRest()) 30600 composeCapabilityStatementCapabilityStatementRestComponent("rest", e); 30601 } 30602 if (element.hasMessaging()) { 30603 for (CapabilityStatement.CapabilityStatementMessagingComponent e : element.getMessaging()) 30604 composeCapabilityStatementCapabilityStatementMessagingComponent("messaging", e); 30605 } 30606 if (element.hasDocument()) { 30607 for (CapabilityStatement.CapabilityStatementDocumentComponent e : element.getDocument()) 30608 composeCapabilityStatementCapabilityStatementDocumentComponent("document", e); 30609 } 30610 } 30611 30612 protected void composeCapabilityStatementCapabilityStatementSoftwareComponent(String name, 30613 CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { 30614 if (element != null) { 30615 composeElementAttributes(element); 30616 xml.enter(FHIR_NS, name); 30617 composeCapabilityStatementCapabilityStatementSoftwareComponentElements(element); 30618 composeElementClose(element); 30619 xml.exit(FHIR_NS, name); 30620 } 30621 } 30622 30623 protected void composeCapabilityStatementCapabilityStatementSoftwareComponentElements( 30624 CapabilityStatement.CapabilityStatementSoftwareComponent element) throws IOException { 30625 composeBackboneElementElements(element); 30626 if (element.hasNameElement()) { 30627 composeString("name", element.getNameElement()); 30628 } 30629 if (element.hasVersionElement()) { 30630 composeString("version", element.getVersionElement()); 30631 } 30632 if (element.hasReleaseDateElement()) { 30633 composeDateTime("releaseDate", element.getReleaseDateElement()); 30634 } 30635 } 30636 30637 protected void composeCapabilityStatementCapabilityStatementImplementationComponent(String name, 30638 CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { 30639 if (element != null) { 30640 composeElementAttributes(element); 30641 xml.enter(FHIR_NS, name); 30642 composeCapabilityStatementCapabilityStatementImplementationComponentElements(element); 30643 composeElementClose(element); 30644 xml.exit(FHIR_NS, name); 30645 } 30646 } 30647 30648 protected void composeCapabilityStatementCapabilityStatementImplementationComponentElements( 30649 CapabilityStatement.CapabilityStatementImplementationComponent element) throws IOException { 30650 composeBackboneElementElements(element); 30651 if (element.hasDescriptionElement()) { 30652 composeString("description", element.getDescriptionElement()); 30653 } 30654 if (element.hasUrlElement()) { 30655 composeUrl("url", element.getUrlElement()); 30656 } 30657 if (element.hasCustodian()) { 30658 composeReference("custodian", element.getCustodian()); 30659 } 30660 } 30661 30662 protected void composeCapabilityStatementCapabilityStatementRestComponent(String name, 30663 CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { 30664 if (element != null) { 30665 composeElementAttributes(element); 30666 xml.enter(FHIR_NS, name); 30667 composeCapabilityStatementCapabilityStatementRestComponentElements(element); 30668 composeElementClose(element); 30669 xml.exit(FHIR_NS, name); 30670 } 30671 } 30672 30673 protected void composeCapabilityStatementCapabilityStatementRestComponentElements( 30674 CapabilityStatement.CapabilityStatementRestComponent element) throws IOException { 30675 composeBackboneElementElements(element); 30676 if (element.hasModeElement()) 30677 composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.RestfulCapabilityModeEnumFactory()); 30678 if (element.hasDocumentationElement()) { 30679 composeMarkdown("documentation", element.getDocumentationElement()); 30680 } 30681 if (element.hasSecurity()) { 30682 composeCapabilityStatementCapabilityStatementRestSecurityComponent("security", element.getSecurity()); 30683 } 30684 if (element.hasResource()) { 30685 for (CapabilityStatement.CapabilityStatementRestResourceComponent e : element.getResource()) 30686 composeCapabilityStatementCapabilityStatementRestResourceComponent("resource", e); 30687 } 30688 if (element.hasInteraction()) { 30689 for (CapabilityStatement.SystemInteractionComponent e : element.getInteraction()) 30690 composeCapabilityStatementSystemInteractionComponent("interaction", e); 30691 } 30692 if (element.hasSearchParam()) { 30693 for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) 30694 composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); 30695 } 30696 if (element.hasOperation()) { 30697 for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation()) 30698 composeCapabilityStatementCapabilityStatementRestResourceOperationComponent("operation", e); 30699 } 30700 if (element.hasCompartment()) { 30701 for (CanonicalType e : element.getCompartment()) 30702 composeCanonical("compartment", e); 30703 } 30704 } 30705 30706 protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(String name, 30707 CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { 30708 if (element != null) { 30709 composeElementAttributes(element); 30710 xml.enter(FHIR_NS, name); 30711 composeCapabilityStatementCapabilityStatementRestSecurityComponentElements(element); 30712 composeElementClose(element); 30713 xml.exit(FHIR_NS, name); 30714 } 30715 } 30716 30717 protected void composeCapabilityStatementCapabilityStatementRestSecurityComponentElements( 30718 CapabilityStatement.CapabilityStatementRestSecurityComponent element) throws IOException { 30719 composeBackboneElementElements(element); 30720 if (element.hasCorsElement()) { 30721 composeBoolean("cors", element.getCorsElement()); 30722 } 30723 if (element.hasService()) { 30724 for (CodeableConcept e : element.getService()) 30725 composeCodeableConcept("service", e); 30726 } 30727 if (element.hasDescriptionElement()) { 30728 composeMarkdown("description", element.getDescriptionElement()); 30729 } 30730 } 30731 30732 protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(String name, 30733 CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { 30734 if (element != null) { 30735 composeElementAttributes(element); 30736 xml.enter(FHIR_NS, name); 30737 composeCapabilityStatementCapabilityStatementRestResourceComponentElements(element); 30738 composeElementClose(element); 30739 xml.exit(FHIR_NS, name); 30740 } 30741 } 30742 30743 protected void composeCapabilityStatementCapabilityStatementRestResourceComponentElements( 30744 CapabilityStatement.CapabilityStatementRestResourceComponent element) throws IOException { 30745 composeBackboneElementElements(element); 30746 if (element.hasTypeElement()) { 30747 composeCode("type", element.getTypeElement()); 30748 } 30749 if (element.hasProfileElement()) { 30750 composeCanonical("profile", element.getProfileElement()); 30751 } 30752 if (element.hasSupportedProfile()) { 30753 for (CanonicalType e : element.getSupportedProfile()) 30754 composeCanonical("supportedProfile", e); 30755 } 30756 if (element.hasDocumentationElement()) { 30757 composeMarkdown("documentation", element.getDocumentationElement()); 30758 } 30759 if (element.hasInteraction()) { 30760 for (CapabilityStatement.ResourceInteractionComponent e : element.getInteraction()) 30761 composeCapabilityStatementResourceInteractionComponent("interaction", e); 30762 } 30763 if (element.hasVersioningElement()) 30764 composeEnumeration("versioning", element.getVersioningElement(), 30765 new CapabilityStatement.ResourceVersionPolicyEnumFactory()); 30766 if (element.hasReadHistoryElement()) { 30767 composeBoolean("readHistory", element.getReadHistoryElement()); 30768 } 30769 if (element.hasUpdateCreateElement()) { 30770 composeBoolean("updateCreate", element.getUpdateCreateElement()); 30771 } 30772 if (element.hasConditionalCreateElement()) { 30773 composeBoolean("conditionalCreate", element.getConditionalCreateElement()); 30774 } 30775 if (element.hasConditionalReadElement()) 30776 composeEnumeration("conditionalRead", element.getConditionalReadElement(), 30777 new CapabilityStatement.ConditionalReadStatusEnumFactory()); 30778 if (element.hasConditionalUpdateElement()) { 30779 composeBoolean("conditionalUpdate", element.getConditionalUpdateElement()); 30780 } 30781 if (element.hasConditionalDeleteElement()) 30782 composeEnumeration("conditionalDelete", element.getConditionalDeleteElement(), 30783 new CapabilityStatement.ConditionalDeleteStatusEnumFactory()); 30784 if (element.hasReferencePolicy()) 30785 for (Enumeration<CapabilityStatement.ReferenceHandlingPolicy> e : element.getReferencePolicy()) 30786 composeEnumeration("referencePolicy", e, new CapabilityStatement.ReferenceHandlingPolicyEnumFactory()); 30787 if (element.hasSearchInclude()) { 30788 for (StringType e : element.getSearchInclude()) 30789 composeString("searchInclude", e); 30790 } 30791 if (element.hasSearchRevInclude()) { 30792 for (StringType e : element.getSearchRevInclude()) 30793 composeString("searchRevInclude", e); 30794 } 30795 if (element.hasSearchParam()) { 30796 for (CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent e : element.getSearchParam()) 30797 composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent("searchParam", e); 30798 } 30799 if (element.hasOperation()) { 30800 for (CapabilityStatement.CapabilityStatementRestResourceOperationComponent e : element.getOperation()) 30801 composeCapabilityStatementCapabilityStatementRestResourceOperationComponent("operation", e); 30802 } 30803 } 30804 30805 protected void composeCapabilityStatementResourceInteractionComponent(String name, 30806 CapabilityStatement.ResourceInteractionComponent element) throws IOException { 30807 if (element != null) { 30808 composeElementAttributes(element); 30809 xml.enter(FHIR_NS, name); 30810 composeCapabilityStatementResourceInteractionComponentElements(element); 30811 composeElementClose(element); 30812 xml.exit(FHIR_NS, name); 30813 } 30814 } 30815 30816 protected void composeCapabilityStatementResourceInteractionComponentElements( 30817 CapabilityStatement.ResourceInteractionComponent element) throws IOException { 30818 composeBackboneElementElements(element); 30819 if (element.hasCodeElement()) 30820 composeEnumeration("code", element.getCodeElement(), new CapabilityStatement.TypeRestfulInteractionEnumFactory()); 30821 if (element.hasDocumentationElement()) { 30822 composeMarkdown("documentation", element.getDocumentationElement()); 30823 } 30824 } 30825 30826 protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(String name, 30827 CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { 30828 if (element != null) { 30829 composeElementAttributes(element); 30830 xml.enter(FHIR_NS, name); 30831 composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements(element); 30832 composeElementClose(element); 30833 xml.exit(FHIR_NS, name); 30834 } 30835 } 30836 30837 protected void composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponentElements( 30838 CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent element) throws IOException { 30839 composeBackboneElementElements(element); 30840 if (element.hasNameElement()) { 30841 composeString("name", element.getNameElement()); 30842 } 30843 if (element.hasDefinitionElement()) { 30844 composeCanonical("definition", element.getDefinitionElement()); 30845 } 30846 if (element.hasTypeElement()) 30847 composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); 30848 if (element.hasDocumentationElement()) { 30849 composeMarkdown("documentation", element.getDocumentationElement()); 30850 } 30851 } 30852 30853 protected void composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(String name, 30854 CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException { 30855 if (element != null) { 30856 composeElementAttributes(element); 30857 xml.enter(FHIR_NS, name); 30858 composeCapabilityStatementCapabilityStatementRestResourceOperationComponentElements(element); 30859 composeElementClose(element); 30860 xml.exit(FHIR_NS, name); 30861 } 30862 } 30863 30864 protected void composeCapabilityStatementCapabilityStatementRestResourceOperationComponentElements( 30865 CapabilityStatement.CapabilityStatementRestResourceOperationComponent element) throws IOException { 30866 composeBackboneElementElements(element); 30867 if (element.hasNameElement()) { 30868 composeString("name", element.getNameElement()); 30869 } 30870 if (element.hasDefinitionElement()) { 30871 composeCanonical("definition", element.getDefinitionElement()); 30872 } 30873 if (element.hasDocumentationElement()) { 30874 composeMarkdown("documentation", element.getDocumentationElement()); 30875 } 30876 } 30877 30878 protected void composeCapabilityStatementSystemInteractionComponent(String name, 30879 CapabilityStatement.SystemInteractionComponent element) throws IOException { 30880 if (element != null) { 30881 composeElementAttributes(element); 30882 xml.enter(FHIR_NS, name); 30883 composeCapabilityStatementSystemInteractionComponentElements(element); 30884 composeElementClose(element); 30885 xml.exit(FHIR_NS, name); 30886 } 30887 } 30888 30889 protected void composeCapabilityStatementSystemInteractionComponentElements( 30890 CapabilityStatement.SystemInteractionComponent element) throws IOException { 30891 composeBackboneElementElements(element); 30892 if (element.hasCodeElement()) 30893 composeEnumeration("code", element.getCodeElement(), 30894 new CapabilityStatement.SystemRestfulInteractionEnumFactory()); 30895 if (element.hasDocumentationElement()) { 30896 composeMarkdown("documentation", element.getDocumentationElement()); 30897 } 30898 } 30899 30900 protected void composeCapabilityStatementCapabilityStatementMessagingComponent(String name, 30901 CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { 30902 if (element != null) { 30903 composeElementAttributes(element); 30904 xml.enter(FHIR_NS, name); 30905 composeCapabilityStatementCapabilityStatementMessagingComponentElements(element); 30906 composeElementClose(element); 30907 xml.exit(FHIR_NS, name); 30908 } 30909 } 30910 30911 protected void composeCapabilityStatementCapabilityStatementMessagingComponentElements( 30912 CapabilityStatement.CapabilityStatementMessagingComponent element) throws IOException { 30913 composeBackboneElementElements(element); 30914 if (element.hasEndpoint()) { 30915 for (CapabilityStatement.CapabilityStatementMessagingEndpointComponent e : element.getEndpoint()) 30916 composeCapabilityStatementCapabilityStatementMessagingEndpointComponent("endpoint", e); 30917 } 30918 if (element.hasReliableCacheElement()) { 30919 composeUnsignedInt("reliableCache", element.getReliableCacheElement()); 30920 } 30921 if (element.hasDocumentationElement()) { 30922 composeMarkdown("documentation", element.getDocumentationElement()); 30923 } 30924 if (element.hasSupportedMessage()) { 30925 for (CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent e : element.getSupportedMessage()) 30926 composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent("supportedMessage", e); 30927 } 30928 } 30929 30930 protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponent(String name, 30931 CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { 30932 if (element != null) { 30933 composeElementAttributes(element); 30934 xml.enter(FHIR_NS, name); 30935 composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements(element); 30936 composeElementClose(element); 30937 xml.exit(FHIR_NS, name); 30938 } 30939 } 30940 30941 protected void composeCapabilityStatementCapabilityStatementMessagingEndpointComponentElements( 30942 CapabilityStatement.CapabilityStatementMessagingEndpointComponent element) throws IOException { 30943 composeBackboneElementElements(element); 30944 if (element.hasProtocol()) { 30945 composeCoding("protocol", element.getProtocol()); 30946 } 30947 if (element.hasAddressElement()) { 30948 composeUrl("address", element.getAddressElement()); 30949 } 30950 } 30951 30952 protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponent(String name, 30953 CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { 30954 if (element != null) { 30955 composeElementAttributes(element); 30956 xml.enter(FHIR_NS, name); 30957 composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements(element); 30958 composeElementClose(element); 30959 xml.exit(FHIR_NS, name); 30960 } 30961 } 30962 30963 protected void composeCapabilityStatementCapabilityStatementMessagingSupportedMessageComponentElements( 30964 CapabilityStatement.CapabilityStatementMessagingSupportedMessageComponent element) throws IOException { 30965 composeBackboneElementElements(element); 30966 if (element.hasModeElement()) 30967 composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.EventCapabilityModeEnumFactory()); 30968 if (element.hasDefinitionElement()) { 30969 composeCanonical("definition", element.getDefinitionElement()); 30970 } 30971 } 30972 30973 protected void composeCapabilityStatementCapabilityStatementDocumentComponent(String name, 30974 CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { 30975 if (element != null) { 30976 composeElementAttributes(element); 30977 xml.enter(FHIR_NS, name); 30978 composeCapabilityStatementCapabilityStatementDocumentComponentElements(element); 30979 composeElementClose(element); 30980 xml.exit(FHIR_NS, name); 30981 } 30982 } 30983 30984 protected void composeCapabilityStatementCapabilityStatementDocumentComponentElements( 30985 CapabilityStatement.CapabilityStatementDocumentComponent element) throws IOException { 30986 composeBackboneElementElements(element); 30987 if (element.hasModeElement()) 30988 composeEnumeration("mode", element.getModeElement(), new CapabilityStatement.DocumentModeEnumFactory()); 30989 if (element.hasDocumentationElement()) { 30990 composeMarkdown("documentation", element.getDocumentationElement()); 30991 } 30992 if (element.hasProfileElement()) { 30993 composeCanonical("profile", element.getProfileElement()); 30994 } 30995 } 30996 30997 protected void composeCarePlan(String name, CarePlan element) throws IOException { 30998 if (element != null) { 30999 composeDomainResourceAttributes(element); 31000 xml.enter(FHIR_NS, name); 31001 composeCarePlanElements(element); 31002 composeElementClose(element); 31003 xml.exit(FHIR_NS, name); 31004 } 31005 } 31006 31007 protected void composeCarePlanElements(CarePlan element) throws IOException { 31008 composeDomainResourceElements(element); 31009 if (element.hasIdentifier()) { 31010 for (Identifier e : element.getIdentifier()) 31011 composeIdentifier("identifier", e); 31012 } 31013 if (element.hasInstantiatesCanonical()) { 31014 for (CanonicalType e : element.getInstantiatesCanonical()) 31015 composeCanonical("instantiatesCanonical", e); 31016 } 31017 if (element.hasInstantiatesUri()) { 31018 for (UriType e : element.getInstantiatesUri()) 31019 composeUri("instantiatesUri", e); 31020 } 31021 if (element.hasBasedOn()) { 31022 for (Reference e : element.getBasedOn()) 31023 composeReference("basedOn", e); 31024 } 31025 if (element.hasReplaces()) { 31026 for (Reference e : element.getReplaces()) 31027 composeReference("replaces", e); 31028 } 31029 if (element.hasPartOf()) { 31030 for (Reference e : element.getPartOf()) 31031 composeReference("partOf", e); 31032 } 31033 if (element.hasStatusElement()) 31034 composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanStatusEnumFactory()); 31035 if (element.hasIntentElement()) 31036 composeEnumeration("intent", element.getIntentElement(), new CarePlan.CarePlanIntentEnumFactory()); 31037 if (element.hasCategory()) { 31038 for (CodeableConcept e : element.getCategory()) 31039 composeCodeableConcept("category", e); 31040 } 31041 if (element.hasTitleElement()) { 31042 composeString("title", element.getTitleElement()); 31043 } 31044 if (element.hasDescriptionElement()) { 31045 composeString("description", element.getDescriptionElement()); 31046 } 31047 if (element.hasSubject()) { 31048 composeReference("subject", element.getSubject()); 31049 } 31050 if (element.hasEncounter()) { 31051 composeReference("encounter", element.getEncounter()); 31052 } 31053 if (element.hasPeriod()) { 31054 composePeriod("period", element.getPeriod()); 31055 } 31056 if (element.hasCreatedElement()) { 31057 composeDateTime("created", element.getCreatedElement()); 31058 } 31059 if (element.hasAuthor()) { 31060 composeReference("author", element.getAuthor()); 31061 } 31062 if (element.hasContributor()) { 31063 for (Reference e : element.getContributor()) 31064 composeReference("contributor", e); 31065 } 31066 if (element.hasCareTeam()) { 31067 for (Reference e : element.getCareTeam()) 31068 composeReference("careTeam", e); 31069 } 31070 if (element.hasAddresses()) { 31071 for (Reference e : element.getAddresses()) 31072 composeReference("addresses", e); 31073 } 31074 if (element.hasSupportingInfo()) { 31075 for (Reference e : element.getSupportingInfo()) 31076 composeReference("supportingInfo", e); 31077 } 31078 if (element.hasGoal()) { 31079 for (Reference e : element.getGoal()) 31080 composeReference("goal", e); 31081 } 31082 if (element.hasActivity()) { 31083 for (CarePlan.CarePlanActivityComponent e : element.getActivity()) 31084 composeCarePlanCarePlanActivityComponent("activity", e); 31085 } 31086 if (element.hasNote()) { 31087 for (Annotation e : element.getNote()) 31088 composeAnnotation("note", e); 31089 } 31090 } 31091 31092 protected void composeCarePlanCarePlanActivityComponent(String name, CarePlan.CarePlanActivityComponent element) 31093 throws IOException { 31094 if (element != null) { 31095 composeElementAttributes(element); 31096 xml.enter(FHIR_NS, name); 31097 composeCarePlanCarePlanActivityComponentElements(element); 31098 composeElementClose(element); 31099 xml.exit(FHIR_NS, name); 31100 } 31101 } 31102 31103 protected void composeCarePlanCarePlanActivityComponentElements(CarePlan.CarePlanActivityComponent element) 31104 throws IOException { 31105 composeBackboneElementElements(element); 31106 if (element.hasOutcomeCodeableConcept()) { 31107 for (CodeableConcept e : element.getOutcomeCodeableConcept()) 31108 composeCodeableConcept("outcomeCodeableConcept", e); 31109 } 31110 if (element.hasOutcomeReference()) { 31111 for (Reference e : element.getOutcomeReference()) 31112 composeReference("outcomeReference", e); 31113 } 31114 if (element.hasProgress()) { 31115 for (Annotation e : element.getProgress()) 31116 composeAnnotation("progress", e); 31117 } 31118 if (element.hasReference()) { 31119 composeReference("reference", element.getReference()); 31120 } 31121 if (element.hasDetail()) { 31122 composeCarePlanCarePlanActivityDetailComponent("detail", element.getDetail()); 31123 } 31124 } 31125 31126 protected void composeCarePlanCarePlanActivityDetailComponent(String name, 31127 CarePlan.CarePlanActivityDetailComponent element) throws IOException { 31128 if (element != null) { 31129 composeElementAttributes(element); 31130 xml.enter(FHIR_NS, name); 31131 composeCarePlanCarePlanActivityDetailComponentElements(element); 31132 composeElementClose(element); 31133 xml.exit(FHIR_NS, name); 31134 } 31135 } 31136 31137 protected void composeCarePlanCarePlanActivityDetailComponentElements( 31138 CarePlan.CarePlanActivityDetailComponent element) throws IOException { 31139 composeBackboneElementElements(element); 31140 if (element.hasKindElement()) 31141 composeEnumeration("kind", element.getKindElement(), new CarePlan.CarePlanActivityKindEnumFactory()); 31142 if (element.hasInstantiatesCanonical()) { 31143 for (CanonicalType e : element.getInstantiatesCanonical()) 31144 composeCanonical("instantiatesCanonical", e); 31145 } 31146 if (element.hasInstantiatesUri()) { 31147 for (UriType e : element.getInstantiatesUri()) 31148 composeUri("instantiatesUri", e); 31149 } 31150 if (element.hasCode()) { 31151 composeCodeableConcept("code", element.getCode()); 31152 } 31153 if (element.hasReasonCode()) { 31154 for (CodeableConcept e : element.getReasonCode()) 31155 composeCodeableConcept("reasonCode", e); 31156 } 31157 if (element.hasReasonReference()) { 31158 for (Reference e : element.getReasonReference()) 31159 composeReference("reasonReference", e); 31160 } 31161 if (element.hasGoal()) { 31162 for (Reference e : element.getGoal()) 31163 composeReference("goal", e); 31164 } 31165 if (element.hasStatusElement()) 31166 composeEnumeration("status", element.getStatusElement(), new CarePlan.CarePlanActivityStatusEnumFactory()); 31167 if (element.hasStatusReason()) { 31168 composeCodeableConcept("statusReason", element.getStatusReason()); 31169 } 31170 if (element.hasDoNotPerformElement()) { 31171 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 31172 } 31173 if (element.hasScheduled()) { 31174 composeType("scheduled", element.getScheduled()); 31175 } 31176 if (element.hasLocation()) { 31177 composeReference("location", element.getLocation()); 31178 } 31179 if (element.hasPerformer()) { 31180 for (Reference e : element.getPerformer()) 31181 composeReference("performer", e); 31182 } 31183 if (element.hasProduct()) { 31184 composeType("product", element.getProduct()); 31185 } 31186 if (element.hasDailyAmount()) { 31187 composeQuantity("dailyAmount", element.getDailyAmount()); 31188 } 31189 if (element.hasQuantity()) { 31190 composeQuantity("quantity", element.getQuantity()); 31191 } 31192 if (element.hasDescriptionElement()) { 31193 composeString("description", element.getDescriptionElement()); 31194 } 31195 } 31196 31197 protected void composeCareTeam(String name, CareTeam element) throws IOException { 31198 if (element != null) { 31199 composeDomainResourceAttributes(element); 31200 xml.enter(FHIR_NS, name); 31201 composeCareTeamElements(element); 31202 composeElementClose(element); 31203 xml.exit(FHIR_NS, name); 31204 } 31205 } 31206 31207 protected void composeCareTeamElements(CareTeam element) throws IOException { 31208 composeDomainResourceElements(element); 31209 if (element.hasIdentifier()) { 31210 for (Identifier e : element.getIdentifier()) 31211 composeIdentifier("identifier", e); 31212 } 31213 if (element.hasStatusElement()) 31214 composeEnumeration("status", element.getStatusElement(), new CareTeam.CareTeamStatusEnumFactory()); 31215 if (element.hasCategory()) { 31216 for (CodeableConcept e : element.getCategory()) 31217 composeCodeableConcept("category", e); 31218 } 31219 if (element.hasNameElement()) { 31220 composeString("name", element.getNameElement()); 31221 } 31222 if (element.hasSubject()) { 31223 composeReference("subject", element.getSubject()); 31224 } 31225 if (element.hasEncounter()) { 31226 composeReference("encounter", element.getEncounter()); 31227 } 31228 if (element.hasPeriod()) { 31229 composePeriod("period", element.getPeriod()); 31230 } 31231 if (element.hasParticipant()) { 31232 for (CareTeam.CareTeamParticipantComponent e : element.getParticipant()) 31233 composeCareTeamCareTeamParticipantComponent("participant", e); 31234 } 31235 if (element.hasReasonCode()) { 31236 for (CodeableConcept e : element.getReasonCode()) 31237 composeCodeableConcept("reasonCode", e); 31238 } 31239 if (element.hasReasonReference()) { 31240 for (Reference e : element.getReasonReference()) 31241 composeReference("reasonReference", e); 31242 } 31243 if (element.hasManagingOrganization()) { 31244 for (Reference e : element.getManagingOrganization()) 31245 composeReference("managingOrganization", e); 31246 } 31247 if (element.hasTelecom()) { 31248 for (ContactPoint e : element.getTelecom()) 31249 composeContactPoint("telecom", e); 31250 } 31251 if (element.hasNote()) { 31252 for (Annotation e : element.getNote()) 31253 composeAnnotation("note", e); 31254 } 31255 } 31256 31257 protected void composeCareTeamCareTeamParticipantComponent(String name, CareTeam.CareTeamParticipantComponent element) 31258 throws IOException { 31259 if (element != null) { 31260 composeElementAttributes(element); 31261 xml.enter(FHIR_NS, name); 31262 composeCareTeamCareTeamParticipantComponentElements(element); 31263 composeElementClose(element); 31264 xml.exit(FHIR_NS, name); 31265 } 31266 } 31267 31268 protected void composeCareTeamCareTeamParticipantComponentElements(CareTeam.CareTeamParticipantComponent element) 31269 throws IOException { 31270 composeBackboneElementElements(element); 31271 if (element.hasRole()) { 31272 for (CodeableConcept e : element.getRole()) 31273 composeCodeableConcept("role", e); 31274 } 31275 if (element.hasMember()) { 31276 composeReference("member", element.getMember()); 31277 } 31278 if (element.hasOnBehalfOf()) { 31279 composeReference("onBehalfOf", element.getOnBehalfOf()); 31280 } 31281 if (element.hasPeriod()) { 31282 composePeriod("period", element.getPeriod()); 31283 } 31284 } 31285 31286 protected void composeCatalogEntry(String name, CatalogEntry element) throws IOException { 31287 if (element != null) { 31288 composeDomainResourceAttributes(element); 31289 xml.enter(FHIR_NS, name); 31290 composeCatalogEntryElements(element); 31291 composeElementClose(element); 31292 xml.exit(FHIR_NS, name); 31293 } 31294 } 31295 31296 protected void composeCatalogEntryElements(CatalogEntry element) throws IOException { 31297 composeDomainResourceElements(element); 31298 if (element.hasIdentifier()) { 31299 for (Identifier e : element.getIdentifier()) 31300 composeIdentifier("identifier", e); 31301 } 31302 if (element.hasType()) { 31303 composeCodeableConcept("type", element.getType()); 31304 } 31305 if (element.hasOrderableElement()) { 31306 composeBoolean("orderable", element.getOrderableElement()); 31307 } 31308 if (element.hasReferencedItem()) { 31309 composeReference("referencedItem", element.getReferencedItem()); 31310 } 31311 if (element.hasAdditionalIdentifier()) { 31312 for (Identifier e : element.getAdditionalIdentifier()) 31313 composeIdentifier("additionalIdentifier", e); 31314 } 31315 if (element.hasClassification()) { 31316 for (CodeableConcept e : element.getClassification()) 31317 composeCodeableConcept("classification", e); 31318 } 31319 if (element.hasStatusElement()) 31320 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 31321 if (element.hasValidityPeriod()) { 31322 composePeriod("validityPeriod", element.getValidityPeriod()); 31323 } 31324 if (element.hasValidToElement()) { 31325 composeDateTime("validTo", element.getValidToElement()); 31326 } 31327 if (element.hasLastUpdatedElement()) { 31328 composeDateTime("lastUpdated", element.getLastUpdatedElement()); 31329 } 31330 if (element.hasAdditionalCharacteristic()) { 31331 for (CodeableConcept e : element.getAdditionalCharacteristic()) 31332 composeCodeableConcept("additionalCharacteristic", e); 31333 } 31334 if (element.hasAdditionalClassification()) { 31335 for (CodeableConcept e : element.getAdditionalClassification()) 31336 composeCodeableConcept("additionalClassification", e); 31337 } 31338 if (element.hasRelatedEntry()) { 31339 for (CatalogEntry.CatalogEntryRelatedEntryComponent e : element.getRelatedEntry()) 31340 composeCatalogEntryCatalogEntryRelatedEntryComponent("relatedEntry", e); 31341 } 31342 } 31343 31344 protected void composeCatalogEntryCatalogEntryRelatedEntryComponent(String name, 31345 CatalogEntry.CatalogEntryRelatedEntryComponent element) throws IOException { 31346 if (element != null) { 31347 composeElementAttributes(element); 31348 xml.enter(FHIR_NS, name); 31349 composeCatalogEntryCatalogEntryRelatedEntryComponentElements(element); 31350 composeElementClose(element); 31351 xml.exit(FHIR_NS, name); 31352 } 31353 } 31354 31355 protected void composeCatalogEntryCatalogEntryRelatedEntryComponentElements( 31356 CatalogEntry.CatalogEntryRelatedEntryComponent element) throws IOException { 31357 composeBackboneElementElements(element); 31358 if (element.hasRelationtypeElement()) 31359 composeEnumeration("relationtype", element.getRelationtypeElement(), 31360 new CatalogEntry.CatalogEntryRelationTypeEnumFactory()); 31361 if (element.hasItem()) { 31362 composeReference("item", element.getItem()); 31363 } 31364 } 31365 31366 protected void composeChargeItem(String name, ChargeItem element) throws IOException { 31367 if (element != null) { 31368 composeDomainResourceAttributes(element); 31369 xml.enter(FHIR_NS, name); 31370 composeChargeItemElements(element); 31371 composeElementClose(element); 31372 xml.exit(FHIR_NS, name); 31373 } 31374 } 31375 31376 protected void composeChargeItemElements(ChargeItem element) throws IOException { 31377 composeDomainResourceElements(element); 31378 if (element.hasIdentifier()) { 31379 for (Identifier e : element.getIdentifier()) 31380 composeIdentifier("identifier", e); 31381 } 31382 if (element.hasDefinitionUri()) { 31383 for (UriType e : element.getDefinitionUri()) 31384 composeUri("definitionUri", e); 31385 } 31386 if (element.hasDefinitionCanonical()) { 31387 for (CanonicalType e : element.getDefinitionCanonical()) 31388 composeCanonical("definitionCanonical", e); 31389 } 31390 if (element.hasStatusElement()) 31391 composeEnumeration("status", element.getStatusElement(), new ChargeItem.ChargeItemStatusEnumFactory()); 31392 if (element.hasPartOf()) { 31393 for (Reference e : element.getPartOf()) 31394 composeReference("partOf", e); 31395 } 31396 if (element.hasCode()) { 31397 composeCodeableConcept("code", element.getCode()); 31398 } 31399 if (element.hasSubject()) { 31400 composeReference("subject", element.getSubject()); 31401 } 31402 if (element.hasContext()) { 31403 composeReference("context", element.getContext()); 31404 } 31405 if (element.hasOccurrence()) { 31406 composeType("occurrence", element.getOccurrence()); 31407 } 31408 if (element.hasPerformer()) { 31409 for (ChargeItem.ChargeItemPerformerComponent e : element.getPerformer()) 31410 composeChargeItemChargeItemPerformerComponent("performer", e); 31411 } 31412 if (element.hasPerformingOrganization()) { 31413 composeReference("performingOrganization", element.getPerformingOrganization()); 31414 } 31415 if (element.hasRequestingOrganization()) { 31416 composeReference("requestingOrganization", element.getRequestingOrganization()); 31417 } 31418 if (element.hasCostCenter()) { 31419 composeReference("costCenter", element.getCostCenter()); 31420 } 31421 if (element.hasQuantity()) { 31422 composeQuantity("quantity", element.getQuantity()); 31423 } 31424 if (element.hasBodysite()) { 31425 for (CodeableConcept e : element.getBodysite()) 31426 composeCodeableConcept("bodysite", e); 31427 } 31428 if (element.hasFactorOverrideElement()) { 31429 composeDecimal("factorOverride", element.getFactorOverrideElement()); 31430 } 31431 if (element.hasPriceOverride()) { 31432 composeMoney("priceOverride", element.getPriceOverride()); 31433 } 31434 if (element.hasOverrideReasonElement()) { 31435 composeString("overrideReason", element.getOverrideReasonElement()); 31436 } 31437 if (element.hasEnterer()) { 31438 composeReference("enterer", element.getEnterer()); 31439 } 31440 if (element.hasEnteredDateElement()) { 31441 composeDateTime("enteredDate", element.getEnteredDateElement()); 31442 } 31443 if (element.hasReason()) { 31444 for (CodeableConcept e : element.getReason()) 31445 composeCodeableConcept("reason", e); 31446 } 31447 if (element.hasService()) { 31448 for (Reference e : element.getService()) 31449 composeReference("service", e); 31450 } 31451 if (element.hasProduct()) { 31452 composeType("product", element.getProduct()); 31453 } 31454 if (element.hasAccount()) { 31455 for (Reference e : element.getAccount()) 31456 composeReference("account", e); 31457 } 31458 if (element.hasNote()) { 31459 for (Annotation e : element.getNote()) 31460 composeAnnotation("note", e); 31461 } 31462 if (element.hasSupportingInformation()) { 31463 for (Reference e : element.getSupportingInformation()) 31464 composeReference("supportingInformation", e); 31465 } 31466 } 31467 31468 protected void composeChargeItemChargeItemPerformerComponent(String name, 31469 ChargeItem.ChargeItemPerformerComponent element) throws IOException { 31470 if (element != null) { 31471 composeElementAttributes(element); 31472 xml.enter(FHIR_NS, name); 31473 composeChargeItemChargeItemPerformerComponentElements(element); 31474 composeElementClose(element); 31475 xml.exit(FHIR_NS, name); 31476 } 31477 } 31478 31479 protected void composeChargeItemChargeItemPerformerComponentElements(ChargeItem.ChargeItemPerformerComponent element) 31480 throws IOException { 31481 composeBackboneElementElements(element); 31482 if (element.hasFunction()) { 31483 composeCodeableConcept("function", element.getFunction()); 31484 } 31485 if (element.hasActor()) { 31486 composeReference("actor", element.getActor()); 31487 } 31488 } 31489 31490 protected void composeChargeItemDefinition(String name, ChargeItemDefinition element) throws IOException { 31491 if (element != null) { 31492 composeDomainResourceAttributes(element); 31493 xml.enter(FHIR_NS, name); 31494 composeChargeItemDefinitionElements(element); 31495 composeElementClose(element); 31496 xml.exit(FHIR_NS, name); 31497 } 31498 } 31499 31500 protected void composeChargeItemDefinitionElements(ChargeItemDefinition element) throws IOException { 31501 composeDomainResourceElements(element); 31502 if (element.hasUrlElement()) { 31503 composeUri("url", element.getUrlElement()); 31504 } 31505 if (element.hasIdentifier()) { 31506 for (Identifier e : element.getIdentifier()) 31507 composeIdentifier("identifier", e); 31508 } 31509 if (element.hasVersionElement()) { 31510 composeString("version", element.getVersionElement()); 31511 } 31512 if (element.hasTitleElement()) { 31513 composeString("title", element.getTitleElement()); 31514 } 31515 if (element.hasDerivedFromUri()) { 31516 for (UriType e : element.getDerivedFromUri()) 31517 composeUri("derivedFromUri", e); 31518 } 31519 if (element.hasPartOf()) { 31520 for (CanonicalType e : element.getPartOf()) 31521 composeCanonical("partOf", e); 31522 } 31523 if (element.hasReplaces()) { 31524 for (CanonicalType e : element.getReplaces()) 31525 composeCanonical("replaces", e); 31526 } 31527 if (element.hasStatusElement()) 31528 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 31529 if (element.hasExperimentalElement()) { 31530 composeBoolean("experimental", element.getExperimentalElement()); 31531 } 31532 if (element.hasDateElement()) { 31533 composeDateTime("date", element.getDateElement()); 31534 } 31535 if (element.hasPublisherElement()) { 31536 composeString("publisher", element.getPublisherElement()); 31537 } 31538 if (element.hasContact()) { 31539 for (ContactDetail e : element.getContact()) 31540 composeContactDetail("contact", e); 31541 } 31542 if (element.hasDescriptionElement()) { 31543 composeMarkdown("description", element.getDescriptionElement()); 31544 } 31545 if (element.hasUseContext()) { 31546 for (UsageContext e : element.getUseContext()) 31547 composeUsageContext("useContext", e); 31548 } 31549 if (element.hasJurisdiction()) { 31550 for (CodeableConcept e : element.getJurisdiction()) 31551 composeCodeableConcept("jurisdiction", e); 31552 } 31553 if (element.hasCopyrightElement()) { 31554 composeMarkdown("copyright", element.getCopyrightElement()); 31555 } 31556 if (element.hasApprovalDateElement()) { 31557 composeDate("approvalDate", element.getApprovalDateElement()); 31558 } 31559 if (element.hasLastReviewDateElement()) { 31560 composeDate("lastReviewDate", element.getLastReviewDateElement()); 31561 } 31562 if (element.hasEffectivePeriod()) { 31563 composePeriod("effectivePeriod", element.getEffectivePeriod()); 31564 } 31565 if (element.hasCode()) { 31566 composeCodeableConcept("code", element.getCode()); 31567 } 31568 if (element.hasInstance()) { 31569 for (Reference e : element.getInstance()) 31570 composeReference("instance", e); 31571 } 31572 if (element.hasApplicability()) { 31573 for (ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent e : element.getApplicability()) 31574 composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent("applicability", e); 31575 } 31576 if (element.hasPropertyGroup()) { 31577 for (ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent e : element.getPropertyGroup()) 31578 composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent("propertyGroup", e); 31579 } 31580 } 31581 31582 protected void composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent(String name, 31583 ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException { 31584 if (element != null) { 31585 composeElementAttributes(element); 31586 xml.enter(FHIR_NS, name); 31587 composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponentElements(element); 31588 composeElementClose(element); 31589 xml.exit(FHIR_NS, name); 31590 } 31591 } 31592 31593 protected void composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponentElements( 31594 ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent element) throws IOException { 31595 composeBackboneElementElements(element); 31596 if (element.hasDescriptionElement()) { 31597 composeString("description", element.getDescriptionElement()); 31598 } 31599 if (element.hasLanguageElement()) { 31600 composeString("language", element.getLanguageElement()); 31601 } 31602 if (element.hasExpressionElement()) { 31603 composeString("expression", element.getExpressionElement()); 31604 } 31605 } 31606 31607 protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponent(String name, 31608 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException { 31609 if (element != null) { 31610 composeElementAttributes(element); 31611 xml.enter(FHIR_NS, name); 31612 composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentElements(element); 31613 composeElementClose(element); 31614 xml.exit(FHIR_NS, name); 31615 } 31616 } 31617 31618 protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupComponentElements( 31619 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupComponent element) throws IOException { 31620 composeBackboneElementElements(element); 31621 if (element.hasApplicability()) { 31622 for (ChargeItemDefinition.ChargeItemDefinitionApplicabilityComponent e : element.getApplicability()) 31623 composeChargeItemDefinitionChargeItemDefinitionApplicabilityComponent("applicability", e); 31624 } 31625 if (element.hasPriceComponent()) { 31626 for (ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent e : element 31627 .getPriceComponent()) 31628 composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent("priceComponent", e); 31629 } 31630 } 31631 31632 protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponent(String name, 31633 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent element) throws IOException { 31634 if (element != null) { 31635 composeElementAttributes(element); 31636 xml.enter(FHIR_NS, name); 31637 composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentElements(element); 31638 composeElementClose(element); 31639 xml.exit(FHIR_NS, name); 31640 } 31641 } 31642 31643 protected void composeChargeItemDefinitionChargeItemDefinitionPropertyGroupPriceComponentComponentElements( 31644 ChargeItemDefinition.ChargeItemDefinitionPropertyGroupPriceComponentComponent element) throws IOException { 31645 composeBackboneElementElements(element); 31646 if (element.hasTypeElement()) 31647 composeEnumeration("type", element.getTypeElement(), 31648 new ChargeItemDefinition.ChargeItemDefinitionPriceComponentTypeEnumFactory()); 31649 if (element.hasCode()) { 31650 composeCodeableConcept("code", element.getCode()); 31651 } 31652 if (element.hasFactorElement()) { 31653 composeDecimal("factor", element.getFactorElement()); 31654 } 31655 if (element.hasAmount()) { 31656 composeMoney("amount", element.getAmount()); 31657 } 31658 } 31659 31660 protected void composeClaim(String name, Claim element) throws IOException { 31661 if (element != null) { 31662 composeDomainResourceAttributes(element); 31663 xml.enter(FHIR_NS, name); 31664 composeClaimElements(element); 31665 composeElementClose(element); 31666 xml.exit(FHIR_NS, name); 31667 } 31668 } 31669 31670 protected void composeClaimElements(Claim element) throws IOException { 31671 composeDomainResourceElements(element); 31672 if (element.hasIdentifier()) { 31673 for (Identifier e : element.getIdentifier()) 31674 composeIdentifier("identifier", e); 31675 } 31676 if (element.hasStatusElement()) 31677 composeEnumeration("status", element.getStatusElement(), new Claim.ClaimStatusEnumFactory()); 31678 if (element.hasType()) { 31679 composeCodeableConcept("type", element.getType()); 31680 } 31681 if (element.hasSubType()) { 31682 composeCodeableConcept("subType", element.getSubType()); 31683 } 31684 if (element.hasUseElement()) 31685 composeEnumeration("use", element.getUseElement(), new Claim.UseEnumFactory()); 31686 if (element.hasPatient()) { 31687 composeReference("patient", element.getPatient()); 31688 } 31689 if (element.hasBillablePeriod()) { 31690 composePeriod("billablePeriod", element.getBillablePeriod()); 31691 } 31692 if (element.hasCreatedElement()) { 31693 composeDateTime("created", element.getCreatedElement()); 31694 } 31695 if (element.hasEnterer()) { 31696 composeReference("enterer", element.getEnterer()); 31697 } 31698 if (element.hasInsurer()) { 31699 composeReference("insurer", element.getInsurer()); 31700 } 31701 if (element.hasProvider()) { 31702 composeReference("provider", element.getProvider()); 31703 } 31704 if (element.hasPriority()) { 31705 composeCodeableConcept("priority", element.getPriority()); 31706 } 31707 if (element.hasFundsReserve()) { 31708 composeCodeableConcept("fundsReserve", element.getFundsReserve()); 31709 } 31710 if (element.hasRelated()) { 31711 for (Claim.RelatedClaimComponent e : element.getRelated()) 31712 composeClaimRelatedClaimComponent("related", e); 31713 } 31714 if (element.hasPrescription()) { 31715 composeReference("prescription", element.getPrescription()); 31716 } 31717 if (element.hasOriginalPrescription()) { 31718 composeReference("originalPrescription", element.getOriginalPrescription()); 31719 } 31720 if (element.hasPayee()) { 31721 composeClaimPayeeComponent("payee", element.getPayee()); 31722 } 31723 if (element.hasReferral()) { 31724 composeReference("referral", element.getReferral()); 31725 } 31726 if (element.hasFacility()) { 31727 composeReference("facility", element.getFacility()); 31728 } 31729 if (element.hasCareTeam()) { 31730 for (Claim.CareTeamComponent e : element.getCareTeam()) 31731 composeClaimCareTeamComponent("careTeam", e); 31732 } 31733 if (element.hasSupportingInfo()) { 31734 for (Claim.SupportingInformationComponent e : element.getSupportingInfo()) 31735 composeClaimSupportingInformationComponent("supportingInfo", e); 31736 } 31737 if (element.hasDiagnosis()) { 31738 for (Claim.DiagnosisComponent e : element.getDiagnosis()) 31739 composeClaimDiagnosisComponent("diagnosis", e); 31740 } 31741 if (element.hasProcedure()) { 31742 for (Claim.ProcedureComponent e : element.getProcedure()) 31743 composeClaimProcedureComponent("procedure", e); 31744 } 31745 if (element.hasInsurance()) { 31746 for (Claim.InsuranceComponent e : element.getInsurance()) 31747 composeClaimInsuranceComponent("insurance", e); 31748 } 31749 if (element.hasAccident()) { 31750 composeClaimAccidentComponent("accident", element.getAccident()); 31751 } 31752 if (element.hasItem()) { 31753 for (Claim.ItemComponent e : element.getItem()) 31754 composeClaimItemComponent("item", e); 31755 } 31756 if (element.hasTotal()) { 31757 composeMoney("total", element.getTotal()); 31758 } 31759 } 31760 31761 protected void composeClaimRelatedClaimComponent(String name, Claim.RelatedClaimComponent element) 31762 throws IOException { 31763 if (element != null) { 31764 composeElementAttributes(element); 31765 xml.enter(FHIR_NS, name); 31766 composeClaimRelatedClaimComponentElements(element); 31767 composeElementClose(element); 31768 xml.exit(FHIR_NS, name); 31769 } 31770 } 31771 31772 protected void composeClaimRelatedClaimComponentElements(Claim.RelatedClaimComponent element) throws IOException { 31773 composeBackboneElementElements(element); 31774 if (element.hasClaim()) { 31775 composeReference("claim", element.getClaim()); 31776 } 31777 if (element.hasRelationship()) { 31778 composeCodeableConcept("relationship", element.getRelationship()); 31779 } 31780 if (element.hasReference()) { 31781 composeIdentifier("reference", element.getReference()); 31782 } 31783 } 31784 31785 protected void composeClaimPayeeComponent(String name, Claim.PayeeComponent element) throws IOException { 31786 if (element != null) { 31787 composeElementAttributes(element); 31788 xml.enter(FHIR_NS, name); 31789 composeClaimPayeeComponentElements(element); 31790 composeElementClose(element); 31791 xml.exit(FHIR_NS, name); 31792 } 31793 } 31794 31795 protected void composeClaimPayeeComponentElements(Claim.PayeeComponent element) throws IOException { 31796 composeBackboneElementElements(element); 31797 if (element.hasType()) { 31798 composeCodeableConcept("type", element.getType()); 31799 } 31800 if (element.hasParty()) { 31801 composeReference("party", element.getParty()); 31802 } 31803 } 31804 31805 protected void composeClaimCareTeamComponent(String name, Claim.CareTeamComponent element) throws IOException { 31806 if (element != null) { 31807 composeElementAttributes(element); 31808 xml.enter(FHIR_NS, name); 31809 composeClaimCareTeamComponentElements(element); 31810 composeElementClose(element); 31811 xml.exit(FHIR_NS, name); 31812 } 31813 } 31814 31815 protected void composeClaimCareTeamComponentElements(Claim.CareTeamComponent element) throws IOException { 31816 composeBackboneElementElements(element); 31817 if (element.hasSequenceElement()) { 31818 composePositiveInt("sequence", element.getSequenceElement()); 31819 } 31820 if (element.hasProvider()) { 31821 composeReference("provider", element.getProvider()); 31822 } 31823 if (element.hasResponsibleElement()) { 31824 composeBoolean("responsible", element.getResponsibleElement()); 31825 } 31826 if (element.hasRole()) { 31827 composeCodeableConcept("role", element.getRole()); 31828 } 31829 if (element.hasQualification()) { 31830 composeCodeableConcept("qualification", element.getQualification()); 31831 } 31832 } 31833 31834 protected void composeClaimSupportingInformationComponent(String name, Claim.SupportingInformationComponent element) 31835 throws IOException { 31836 if (element != null) { 31837 composeElementAttributes(element); 31838 xml.enter(FHIR_NS, name); 31839 composeClaimSupportingInformationComponentElements(element); 31840 composeElementClose(element); 31841 xml.exit(FHIR_NS, name); 31842 } 31843 } 31844 31845 protected void composeClaimSupportingInformationComponentElements(Claim.SupportingInformationComponent element) 31846 throws IOException { 31847 composeBackboneElementElements(element); 31848 if (element.hasSequenceElement()) { 31849 composePositiveInt("sequence", element.getSequenceElement()); 31850 } 31851 if (element.hasCategory()) { 31852 composeCodeableConcept("category", element.getCategory()); 31853 } 31854 if (element.hasCode()) { 31855 composeCodeableConcept("code", element.getCode()); 31856 } 31857 if (element.hasTiming()) { 31858 composeType("timing", element.getTiming()); 31859 } 31860 if (element.hasValue()) { 31861 composeType("value", element.getValue()); 31862 } 31863 if (element.hasReason()) { 31864 composeCodeableConcept("reason", element.getReason()); 31865 } 31866 } 31867 31868 protected void composeClaimDiagnosisComponent(String name, Claim.DiagnosisComponent element) throws IOException { 31869 if (element != null) { 31870 composeElementAttributes(element); 31871 xml.enter(FHIR_NS, name); 31872 composeClaimDiagnosisComponentElements(element); 31873 composeElementClose(element); 31874 xml.exit(FHIR_NS, name); 31875 } 31876 } 31877 31878 protected void composeClaimDiagnosisComponentElements(Claim.DiagnosisComponent element) throws IOException { 31879 composeBackboneElementElements(element); 31880 if (element.hasSequenceElement()) { 31881 composePositiveInt("sequence", element.getSequenceElement()); 31882 } 31883 if (element.hasDiagnosis()) { 31884 composeType("diagnosis", element.getDiagnosis()); 31885 } 31886 if (element.hasType()) { 31887 for (CodeableConcept e : element.getType()) 31888 composeCodeableConcept("type", e); 31889 } 31890 if (element.hasOnAdmission()) { 31891 composeCodeableConcept("onAdmission", element.getOnAdmission()); 31892 } 31893 if (element.hasPackageCode()) { 31894 composeCodeableConcept("packageCode", element.getPackageCode()); 31895 } 31896 } 31897 31898 protected void composeClaimProcedureComponent(String name, Claim.ProcedureComponent element) throws IOException { 31899 if (element != null) { 31900 composeElementAttributes(element); 31901 xml.enter(FHIR_NS, name); 31902 composeClaimProcedureComponentElements(element); 31903 composeElementClose(element); 31904 xml.exit(FHIR_NS, name); 31905 } 31906 } 31907 31908 protected void composeClaimProcedureComponentElements(Claim.ProcedureComponent element) throws IOException { 31909 composeBackboneElementElements(element); 31910 if (element.hasSequenceElement()) { 31911 composePositiveInt("sequence", element.getSequenceElement()); 31912 } 31913 if (element.hasType()) { 31914 for (CodeableConcept e : element.getType()) 31915 composeCodeableConcept("type", e); 31916 } 31917 if (element.hasDateElement()) { 31918 composeDateTime("date", element.getDateElement()); 31919 } 31920 if (element.hasProcedure()) { 31921 composeType("procedure", element.getProcedure()); 31922 } 31923 if (element.hasUdi()) { 31924 for (Reference e : element.getUdi()) 31925 composeReference("udi", e); 31926 } 31927 } 31928 31929 protected void composeClaimInsuranceComponent(String name, Claim.InsuranceComponent element) throws IOException { 31930 if (element != null) { 31931 composeElementAttributes(element); 31932 xml.enter(FHIR_NS, name); 31933 composeClaimInsuranceComponentElements(element); 31934 composeElementClose(element); 31935 xml.exit(FHIR_NS, name); 31936 } 31937 } 31938 31939 protected void composeClaimInsuranceComponentElements(Claim.InsuranceComponent element) throws IOException { 31940 composeBackboneElementElements(element); 31941 if (element.hasSequenceElement()) { 31942 composePositiveInt("sequence", element.getSequenceElement()); 31943 } 31944 if (element.hasFocalElement()) { 31945 composeBoolean("focal", element.getFocalElement()); 31946 } 31947 if (element.hasIdentifier()) { 31948 composeIdentifier("identifier", element.getIdentifier()); 31949 } 31950 if (element.hasCoverage()) { 31951 composeReference("coverage", element.getCoverage()); 31952 } 31953 if (element.hasBusinessArrangementElement()) { 31954 composeString("businessArrangement", element.getBusinessArrangementElement()); 31955 } 31956 if (element.hasPreAuthRef()) { 31957 for (StringType e : element.getPreAuthRef()) 31958 composeString("preAuthRef", e); 31959 } 31960 if (element.hasClaimResponse()) { 31961 composeReference("claimResponse", element.getClaimResponse()); 31962 } 31963 } 31964 31965 protected void composeClaimAccidentComponent(String name, Claim.AccidentComponent element) throws IOException { 31966 if (element != null) { 31967 composeElementAttributes(element); 31968 xml.enter(FHIR_NS, name); 31969 composeClaimAccidentComponentElements(element); 31970 composeElementClose(element); 31971 xml.exit(FHIR_NS, name); 31972 } 31973 } 31974 31975 protected void composeClaimAccidentComponentElements(Claim.AccidentComponent element) throws IOException { 31976 composeBackboneElementElements(element); 31977 if (element.hasDateElement()) { 31978 composeDate("date", element.getDateElement()); 31979 } 31980 if (element.hasType()) { 31981 composeCodeableConcept("type", element.getType()); 31982 } 31983 if (element.hasLocation()) { 31984 composeType("location", element.getLocation()); 31985 } 31986 } 31987 31988 protected void composeClaimItemComponent(String name, Claim.ItemComponent element) throws IOException { 31989 if (element != null) { 31990 composeElementAttributes(element); 31991 xml.enter(FHIR_NS, name); 31992 composeClaimItemComponentElements(element); 31993 composeElementClose(element); 31994 xml.exit(FHIR_NS, name); 31995 } 31996 } 31997 31998 protected void composeClaimItemComponentElements(Claim.ItemComponent element) throws IOException { 31999 composeBackboneElementElements(element); 32000 if (element.hasSequenceElement()) { 32001 composePositiveInt("sequence", element.getSequenceElement()); 32002 } 32003 if (element.hasCareTeamSequence()) { 32004 for (PositiveIntType e : element.getCareTeamSequence()) 32005 composePositiveInt("careTeamSequence", e); 32006 } 32007 if (element.hasDiagnosisSequence()) { 32008 for (PositiveIntType e : element.getDiagnosisSequence()) 32009 composePositiveInt("diagnosisSequence", e); 32010 } 32011 if (element.hasProcedureSequence()) { 32012 for (PositiveIntType e : element.getProcedureSequence()) 32013 composePositiveInt("procedureSequence", e); 32014 } 32015 if (element.hasInformationSequence()) { 32016 for (PositiveIntType e : element.getInformationSequence()) 32017 composePositiveInt("informationSequence", e); 32018 } 32019 if (element.hasRevenue()) { 32020 composeCodeableConcept("revenue", element.getRevenue()); 32021 } 32022 if (element.hasCategory()) { 32023 composeCodeableConcept("category", element.getCategory()); 32024 } 32025 if (element.hasProductOrService()) { 32026 composeCodeableConcept("productOrService", element.getProductOrService()); 32027 } 32028 if (element.hasModifier()) { 32029 for (CodeableConcept e : element.getModifier()) 32030 composeCodeableConcept("modifier", e); 32031 } 32032 if (element.hasProgramCode()) { 32033 for (CodeableConcept e : element.getProgramCode()) 32034 composeCodeableConcept("programCode", e); 32035 } 32036 if (element.hasServiced()) { 32037 composeType("serviced", element.getServiced()); 32038 } 32039 if (element.hasLocation()) { 32040 composeType("location", element.getLocation()); 32041 } 32042 if (element.hasQuantity()) { 32043 composeQuantity("quantity", element.getQuantity()); 32044 } 32045 if (element.hasUnitPrice()) { 32046 composeMoney("unitPrice", element.getUnitPrice()); 32047 } 32048 if (element.hasFactorElement()) { 32049 composeDecimal("factor", element.getFactorElement()); 32050 } 32051 if (element.hasNet()) { 32052 composeMoney("net", element.getNet()); 32053 } 32054 if (element.hasUdi()) { 32055 for (Reference e : element.getUdi()) 32056 composeReference("udi", e); 32057 } 32058 if (element.hasBodySite()) { 32059 composeCodeableConcept("bodySite", element.getBodySite()); 32060 } 32061 if (element.hasSubSite()) { 32062 for (CodeableConcept e : element.getSubSite()) 32063 composeCodeableConcept("subSite", e); 32064 } 32065 if (element.hasEncounter()) { 32066 for (Reference e : element.getEncounter()) 32067 composeReference("encounter", e); 32068 } 32069 if (element.hasDetail()) { 32070 for (Claim.DetailComponent e : element.getDetail()) 32071 composeClaimDetailComponent("detail", e); 32072 } 32073 } 32074 32075 protected void composeClaimDetailComponent(String name, Claim.DetailComponent element) throws IOException { 32076 if (element != null) { 32077 composeElementAttributes(element); 32078 xml.enter(FHIR_NS, name); 32079 composeClaimDetailComponentElements(element); 32080 composeElementClose(element); 32081 xml.exit(FHIR_NS, name); 32082 } 32083 } 32084 32085 protected void composeClaimDetailComponentElements(Claim.DetailComponent element) throws IOException { 32086 composeBackboneElementElements(element); 32087 if (element.hasSequenceElement()) { 32088 composePositiveInt("sequence", element.getSequenceElement()); 32089 } 32090 if (element.hasRevenue()) { 32091 composeCodeableConcept("revenue", element.getRevenue()); 32092 } 32093 if (element.hasCategory()) { 32094 composeCodeableConcept("category", element.getCategory()); 32095 } 32096 if (element.hasProductOrService()) { 32097 composeCodeableConcept("productOrService", element.getProductOrService()); 32098 } 32099 if (element.hasModifier()) { 32100 for (CodeableConcept e : element.getModifier()) 32101 composeCodeableConcept("modifier", e); 32102 } 32103 if (element.hasProgramCode()) { 32104 for (CodeableConcept e : element.getProgramCode()) 32105 composeCodeableConcept("programCode", e); 32106 } 32107 if (element.hasQuantity()) { 32108 composeQuantity("quantity", element.getQuantity()); 32109 } 32110 if (element.hasUnitPrice()) { 32111 composeMoney("unitPrice", element.getUnitPrice()); 32112 } 32113 if (element.hasFactorElement()) { 32114 composeDecimal("factor", element.getFactorElement()); 32115 } 32116 if (element.hasNet()) { 32117 composeMoney("net", element.getNet()); 32118 } 32119 if (element.hasUdi()) { 32120 for (Reference e : element.getUdi()) 32121 composeReference("udi", e); 32122 } 32123 if (element.hasSubDetail()) { 32124 for (Claim.SubDetailComponent e : element.getSubDetail()) 32125 composeClaimSubDetailComponent("subDetail", e); 32126 } 32127 } 32128 32129 protected void composeClaimSubDetailComponent(String name, Claim.SubDetailComponent element) throws IOException { 32130 if (element != null) { 32131 composeElementAttributes(element); 32132 xml.enter(FHIR_NS, name); 32133 composeClaimSubDetailComponentElements(element); 32134 composeElementClose(element); 32135 xml.exit(FHIR_NS, name); 32136 } 32137 } 32138 32139 protected void composeClaimSubDetailComponentElements(Claim.SubDetailComponent element) throws IOException { 32140 composeBackboneElementElements(element); 32141 if (element.hasSequenceElement()) { 32142 composePositiveInt("sequence", element.getSequenceElement()); 32143 } 32144 if (element.hasRevenue()) { 32145 composeCodeableConcept("revenue", element.getRevenue()); 32146 } 32147 if (element.hasCategory()) { 32148 composeCodeableConcept("category", element.getCategory()); 32149 } 32150 if (element.hasProductOrService()) { 32151 composeCodeableConcept("productOrService", element.getProductOrService()); 32152 } 32153 if (element.hasModifier()) { 32154 for (CodeableConcept e : element.getModifier()) 32155 composeCodeableConcept("modifier", e); 32156 } 32157 if (element.hasProgramCode()) { 32158 for (CodeableConcept e : element.getProgramCode()) 32159 composeCodeableConcept("programCode", e); 32160 } 32161 if (element.hasQuantity()) { 32162 composeQuantity("quantity", element.getQuantity()); 32163 } 32164 if (element.hasUnitPrice()) { 32165 composeMoney("unitPrice", element.getUnitPrice()); 32166 } 32167 if (element.hasFactorElement()) { 32168 composeDecimal("factor", element.getFactorElement()); 32169 } 32170 if (element.hasNet()) { 32171 composeMoney("net", element.getNet()); 32172 } 32173 if (element.hasUdi()) { 32174 for (Reference e : element.getUdi()) 32175 composeReference("udi", e); 32176 } 32177 } 32178 32179 protected void composeClaimResponse(String name, ClaimResponse element) throws IOException { 32180 if (element != null) { 32181 composeDomainResourceAttributes(element); 32182 xml.enter(FHIR_NS, name); 32183 composeClaimResponseElements(element); 32184 composeElementClose(element); 32185 xml.exit(FHIR_NS, name); 32186 } 32187 } 32188 32189 protected void composeClaimResponseElements(ClaimResponse element) throws IOException { 32190 composeDomainResourceElements(element); 32191 if (element.hasIdentifier()) { 32192 for (Identifier e : element.getIdentifier()) 32193 composeIdentifier("identifier", e); 32194 } 32195 if (element.hasStatusElement()) 32196 composeEnumeration("status", element.getStatusElement(), new ClaimResponse.ClaimResponseStatusEnumFactory()); 32197 if (element.hasType()) { 32198 composeCodeableConcept("type", element.getType()); 32199 } 32200 if (element.hasSubType()) { 32201 composeCodeableConcept("subType", element.getSubType()); 32202 } 32203 if (element.hasUseElement()) 32204 composeEnumeration("use", element.getUseElement(), new ClaimResponse.UseEnumFactory()); 32205 if (element.hasPatient()) { 32206 composeReference("patient", element.getPatient()); 32207 } 32208 if (element.hasCreatedElement()) { 32209 composeDateTime("created", element.getCreatedElement()); 32210 } 32211 if (element.hasInsurer()) { 32212 composeReference("insurer", element.getInsurer()); 32213 } 32214 if (element.hasRequestor()) { 32215 composeReference("requestor", element.getRequestor()); 32216 } 32217 if (element.hasRequest()) { 32218 composeReference("request", element.getRequest()); 32219 } 32220 if (element.hasOutcomeElement()) 32221 composeEnumeration("outcome", element.getOutcomeElement(), new ClaimResponse.RemittanceOutcomeEnumFactory()); 32222 if (element.hasDispositionElement()) { 32223 composeString("disposition", element.getDispositionElement()); 32224 } 32225 if (element.hasPreAuthRefElement()) { 32226 composeString("preAuthRef", element.getPreAuthRefElement()); 32227 } 32228 if (element.hasPreAuthPeriod()) { 32229 composePeriod("preAuthPeriod", element.getPreAuthPeriod()); 32230 } 32231 if (element.hasPayeeType()) { 32232 composeCodeableConcept("payeeType", element.getPayeeType()); 32233 } 32234 if (element.hasItem()) { 32235 for (ClaimResponse.ItemComponent e : element.getItem()) 32236 composeClaimResponseItemComponent("item", e); 32237 } 32238 if (element.hasAddItem()) { 32239 for (ClaimResponse.AddedItemComponent e : element.getAddItem()) 32240 composeClaimResponseAddedItemComponent("addItem", e); 32241 } 32242 if (element.hasAdjudication()) { 32243 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32244 composeClaimResponseAdjudicationComponent("adjudication", e); 32245 } 32246 if (element.hasTotal()) { 32247 for (ClaimResponse.TotalComponent e : element.getTotal()) 32248 composeClaimResponseTotalComponent("total", e); 32249 } 32250 if (element.hasPayment()) { 32251 composeClaimResponsePaymentComponent("payment", element.getPayment()); 32252 } 32253 if (element.hasFundsReserve()) { 32254 composeCodeableConcept("fundsReserve", element.getFundsReserve()); 32255 } 32256 if (element.hasFormCode()) { 32257 composeCodeableConcept("formCode", element.getFormCode()); 32258 } 32259 if (element.hasForm()) { 32260 composeAttachment("form", element.getForm()); 32261 } 32262 if (element.hasProcessNote()) { 32263 for (ClaimResponse.NoteComponent e : element.getProcessNote()) 32264 composeClaimResponseNoteComponent("processNote", e); 32265 } 32266 if (element.hasCommunicationRequest()) { 32267 for (Reference e : element.getCommunicationRequest()) 32268 composeReference("communicationRequest", e); 32269 } 32270 if (element.hasInsurance()) { 32271 for (ClaimResponse.InsuranceComponent e : element.getInsurance()) 32272 composeClaimResponseInsuranceComponent("insurance", e); 32273 } 32274 if (element.hasError()) { 32275 for (ClaimResponse.ErrorComponent e : element.getError()) 32276 composeClaimResponseErrorComponent("error", e); 32277 } 32278 } 32279 32280 protected void composeClaimResponseItemComponent(String name, ClaimResponse.ItemComponent element) 32281 throws IOException { 32282 if (element != null) { 32283 composeElementAttributes(element); 32284 xml.enter(FHIR_NS, name); 32285 composeClaimResponseItemComponentElements(element); 32286 composeElementClose(element); 32287 xml.exit(FHIR_NS, name); 32288 } 32289 } 32290 32291 protected void composeClaimResponseItemComponentElements(ClaimResponse.ItemComponent element) throws IOException { 32292 composeBackboneElementElements(element); 32293 if (element.hasItemSequenceElement()) { 32294 composePositiveInt("itemSequence", element.getItemSequenceElement()); 32295 } 32296 if (element.hasNoteNumber()) { 32297 for (PositiveIntType e : element.getNoteNumber()) 32298 composePositiveInt("noteNumber", e); 32299 } 32300 if (element.hasAdjudication()) { 32301 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32302 composeClaimResponseAdjudicationComponent("adjudication", e); 32303 } 32304 if (element.hasDetail()) { 32305 for (ClaimResponse.ItemDetailComponent e : element.getDetail()) 32306 composeClaimResponseItemDetailComponent("detail", e); 32307 } 32308 } 32309 32310 protected void composeClaimResponseAdjudicationComponent(String name, ClaimResponse.AdjudicationComponent element) 32311 throws IOException { 32312 if (element != null) { 32313 composeElementAttributes(element); 32314 xml.enter(FHIR_NS, name); 32315 composeClaimResponseAdjudicationComponentElements(element); 32316 composeElementClose(element); 32317 xml.exit(FHIR_NS, name); 32318 } 32319 } 32320 32321 protected void composeClaimResponseAdjudicationComponentElements(ClaimResponse.AdjudicationComponent element) 32322 throws IOException { 32323 composeBackboneElementElements(element); 32324 if (element.hasCategory()) { 32325 composeCodeableConcept("category", element.getCategory()); 32326 } 32327 if (element.hasReason()) { 32328 composeCodeableConcept("reason", element.getReason()); 32329 } 32330 if (element.hasAmount()) { 32331 composeMoney("amount", element.getAmount()); 32332 } 32333 if (element.hasValueElement()) { 32334 composeDecimal("value", element.getValueElement()); 32335 } 32336 } 32337 32338 protected void composeClaimResponseItemDetailComponent(String name, ClaimResponse.ItemDetailComponent element) 32339 throws IOException { 32340 if (element != null) { 32341 composeElementAttributes(element); 32342 xml.enter(FHIR_NS, name); 32343 composeClaimResponseItemDetailComponentElements(element); 32344 composeElementClose(element); 32345 xml.exit(FHIR_NS, name); 32346 } 32347 } 32348 32349 protected void composeClaimResponseItemDetailComponentElements(ClaimResponse.ItemDetailComponent element) 32350 throws IOException { 32351 composeBackboneElementElements(element); 32352 if (element.hasDetailSequenceElement()) { 32353 composePositiveInt("detailSequence", element.getDetailSequenceElement()); 32354 } 32355 if (element.hasNoteNumber()) { 32356 for (PositiveIntType e : element.getNoteNumber()) 32357 composePositiveInt("noteNumber", e); 32358 } 32359 if (element.hasAdjudication()) { 32360 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32361 composeClaimResponseAdjudicationComponent("adjudication", e); 32362 } 32363 if (element.hasSubDetail()) { 32364 for (ClaimResponse.SubDetailComponent e : element.getSubDetail()) 32365 composeClaimResponseSubDetailComponent("subDetail", e); 32366 } 32367 } 32368 32369 protected void composeClaimResponseSubDetailComponent(String name, ClaimResponse.SubDetailComponent element) 32370 throws IOException { 32371 if (element != null) { 32372 composeElementAttributes(element); 32373 xml.enter(FHIR_NS, name); 32374 composeClaimResponseSubDetailComponentElements(element); 32375 composeElementClose(element); 32376 xml.exit(FHIR_NS, name); 32377 } 32378 } 32379 32380 protected void composeClaimResponseSubDetailComponentElements(ClaimResponse.SubDetailComponent element) 32381 throws IOException { 32382 composeBackboneElementElements(element); 32383 if (element.hasSubDetailSequenceElement()) { 32384 composePositiveInt("subDetailSequence", element.getSubDetailSequenceElement()); 32385 } 32386 if (element.hasNoteNumber()) { 32387 for (PositiveIntType e : element.getNoteNumber()) 32388 composePositiveInt("noteNumber", e); 32389 } 32390 if (element.hasAdjudication()) { 32391 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32392 composeClaimResponseAdjudicationComponent("adjudication", e); 32393 } 32394 } 32395 32396 protected void composeClaimResponseAddedItemComponent(String name, ClaimResponse.AddedItemComponent element) 32397 throws IOException { 32398 if (element != null) { 32399 composeElementAttributes(element); 32400 xml.enter(FHIR_NS, name); 32401 composeClaimResponseAddedItemComponentElements(element); 32402 composeElementClose(element); 32403 xml.exit(FHIR_NS, name); 32404 } 32405 } 32406 32407 protected void composeClaimResponseAddedItemComponentElements(ClaimResponse.AddedItemComponent element) 32408 throws IOException { 32409 composeBackboneElementElements(element); 32410 if (element.hasItemSequence()) { 32411 for (PositiveIntType e : element.getItemSequence()) 32412 composePositiveInt("itemSequence", e); 32413 } 32414 if (element.hasDetailSequence()) { 32415 for (PositiveIntType e : element.getDetailSequence()) 32416 composePositiveInt("detailSequence", e); 32417 } 32418 if (element.hasSubdetailSequence()) { 32419 for (PositiveIntType e : element.getSubdetailSequence()) 32420 composePositiveInt("subdetailSequence", e); 32421 } 32422 if (element.hasProvider()) { 32423 for (Reference e : element.getProvider()) 32424 composeReference("provider", e); 32425 } 32426 if (element.hasProductOrService()) { 32427 composeCodeableConcept("productOrService", element.getProductOrService()); 32428 } 32429 if (element.hasModifier()) { 32430 for (CodeableConcept e : element.getModifier()) 32431 composeCodeableConcept("modifier", e); 32432 } 32433 if (element.hasProgramCode()) { 32434 for (CodeableConcept e : element.getProgramCode()) 32435 composeCodeableConcept("programCode", e); 32436 } 32437 if (element.hasServiced()) { 32438 composeType("serviced", element.getServiced()); 32439 } 32440 if (element.hasLocation()) { 32441 composeType("location", element.getLocation()); 32442 } 32443 if (element.hasQuantity()) { 32444 composeQuantity("quantity", element.getQuantity()); 32445 } 32446 if (element.hasUnitPrice()) { 32447 composeMoney("unitPrice", element.getUnitPrice()); 32448 } 32449 if (element.hasFactorElement()) { 32450 composeDecimal("factor", element.getFactorElement()); 32451 } 32452 if (element.hasNet()) { 32453 composeMoney("net", element.getNet()); 32454 } 32455 if (element.hasBodySite()) { 32456 composeCodeableConcept("bodySite", element.getBodySite()); 32457 } 32458 if (element.hasSubSite()) { 32459 for (CodeableConcept e : element.getSubSite()) 32460 composeCodeableConcept("subSite", e); 32461 } 32462 if (element.hasNoteNumber()) { 32463 for (PositiveIntType e : element.getNoteNumber()) 32464 composePositiveInt("noteNumber", e); 32465 } 32466 if (element.hasAdjudication()) { 32467 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32468 composeClaimResponseAdjudicationComponent("adjudication", e); 32469 } 32470 if (element.hasDetail()) { 32471 for (ClaimResponse.AddedItemDetailComponent e : element.getDetail()) 32472 composeClaimResponseAddedItemDetailComponent("detail", e); 32473 } 32474 } 32475 32476 protected void composeClaimResponseAddedItemDetailComponent(String name, 32477 ClaimResponse.AddedItemDetailComponent element) throws IOException { 32478 if (element != null) { 32479 composeElementAttributes(element); 32480 xml.enter(FHIR_NS, name); 32481 composeClaimResponseAddedItemDetailComponentElements(element); 32482 composeElementClose(element); 32483 xml.exit(FHIR_NS, name); 32484 } 32485 } 32486 32487 protected void composeClaimResponseAddedItemDetailComponentElements(ClaimResponse.AddedItemDetailComponent element) 32488 throws IOException { 32489 composeBackboneElementElements(element); 32490 if (element.hasProductOrService()) { 32491 composeCodeableConcept("productOrService", element.getProductOrService()); 32492 } 32493 if (element.hasModifier()) { 32494 for (CodeableConcept e : element.getModifier()) 32495 composeCodeableConcept("modifier", e); 32496 } 32497 if (element.hasQuantity()) { 32498 composeQuantity("quantity", element.getQuantity()); 32499 } 32500 if (element.hasUnitPrice()) { 32501 composeMoney("unitPrice", element.getUnitPrice()); 32502 } 32503 if (element.hasFactorElement()) { 32504 composeDecimal("factor", element.getFactorElement()); 32505 } 32506 if (element.hasNet()) { 32507 composeMoney("net", element.getNet()); 32508 } 32509 if (element.hasNoteNumber()) { 32510 for (PositiveIntType e : element.getNoteNumber()) 32511 composePositiveInt("noteNumber", e); 32512 } 32513 if (element.hasAdjudication()) { 32514 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32515 composeClaimResponseAdjudicationComponent("adjudication", e); 32516 } 32517 if (element.hasSubDetail()) { 32518 for (ClaimResponse.AddedItemSubDetailComponent e : element.getSubDetail()) 32519 composeClaimResponseAddedItemSubDetailComponent("subDetail", e); 32520 } 32521 } 32522 32523 protected void composeClaimResponseAddedItemSubDetailComponent(String name, 32524 ClaimResponse.AddedItemSubDetailComponent element) throws IOException { 32525 if (element != null) { 32526 composeElementAttributes(element); 32527 xml.enter(FHIR_NS, name); 32528 composeClaimResponseAddedItemSubDetailComponentElements(element); 32529 composeElementClose(element); 32530 xml.exit(FHIR_NS, name); 32531 } 32532 } 32533 32534 protected void composeClaimResponseAddedItemSubDetailComponentElements( 32535 ClaimResponse.AddedItemSubDetailComponent element) throws IOException { 32536 composeBackboneElementElements(element); 32537 if (element.hasProductOrService()) { 32538 composeCodeableConcept("productOrService", element.getProductOrService()); 32539 } 32540 if (element.hasModifier()) { 32541 for (CodeableConcept e : element.getModifier()) 32542 composeCodeableConcept("modifier", e); 32543 } 32544 if (element.hasQuantity()) { 32545 composeQuantity("quantity", element.getQuantity()); 32546 } 32547 if (element.hasUnitPrice()) { 32548 composeMoney("unitPrice", element.getUnitPrice()); 32549 } 32550 if (element.hasFactorElement()) { 32551 composeDecimal("factor", element.getFactorElement()); 32552 } 32553 if (element.hasNet()) { 32554 composeMoney("net", element.getNet()); 32555 } 32556 if (element.hasNoteNumber()) { 32557 for (PositiveIntType e : element.getNoteNumber()) 32558 composePositiveInt("noteNumber", e); 32559 } 32560 if (element.hasAdjudication()) { 32561 for (ClaimResponse.AdjudicationComponent e : element.getAdjudication()) 32562 composeClaimResponseAdjudicationComponent("adjudication", e); 32563 } 32564 } 32565 32566 protected void composeClaimResponseTotalComponent(String name, ClaimResponse.TotalComponent element) 32567 throws IOException { 32568 if (element != null) { 32569 composeElementAttributes(element); 32570 xml.enter(FHIR_NS, name); 32571 composeClaimResponseTotalComponentElements(element); 32572 composeElementClose(element); 32573 xml.exit(FHIR_NS, name); 32574 } 32575 } 32576 32577 protected void composeClaimResponseTotalComponentElements(ClaimResponse.TotalComponent element) throws IOException { 32578 composeBackboneElementElements(element); 32579 if (element.hasCategory()) { 32580 composeCodeableConcept("category", element.getCategory()); 32581 } 32582 if (element.hasAmount()) { 32583 composeMoney("amount", element.getAmount()); 32584 } 32585 } 32586 32587 protected void composeClaimResponsePaymentComponent(String name, ClaimResponse.PaymentComponent element) 32588 throws IOException { 32589 if (element != null) { 32590 composeElementAttributes(element); 32591 xml.enter(FHIR_NS, name); 32592 composeClaimResponsePaymentComponentElements(element); 32593 composeElementClose(element); 32594 xml.exit(FHIR_NS, name); 32595 } 32596 } 32597 32598 protected void composeClaimResponsePaymentComponentElements(ClaimResponse.PaymentComponent element) 32599 throws IOException { 32600 composeBackboneElementElements(element); 32601 if (element.hasType()) { 32602 composeCodeableConcept("type", element.getType()); 32603 } 32604 if (element.hasAdjustment()) { 32605 composeMoney("adjustment", element.getAdjustment()); 32606 } 32607 if (element.hasAdjustmentReason()) { 32608 composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); 32609 } 32610 if (element.hasDateElement()) { 32611 composeDate("date", element.getDateElement()); 32612 } 32613 if (element.hasAmount()) { 32614 composeMoney("amount", element.getAmount()); 32615 } 32616 if (element.hasIdentifier()) { 32617 composeIdentifier("identifier", element.getIdentifier()); 32618 } 32619 } 32620 32621 protected void composeClaimResponseNoteComponent(String name, ClaimResponse.NoteComponent element) 32622 throws IOException { 32623 if (element != null) { 32624 composeElementAttributes(element); 32625 xml.enter(FHIR_NS, name); 32626 composeClaimResponseNoteComponentElements(element); 32627 composeElementClose(element); 32628 xml.exit(FHIR_NS, name); 32629 } 32630 } 32631 32632 protected void composeClaimResponseNoteComponentElements(ClaimResponse.NoteComponent element) throws IOException { 32633 composeBackboneElementElements(element); 32634 if (element.hasNumberElement()) { 32635 composePositiveInt("number", element.getNumberElement()); 32636 } 32637 if (element.hasTypeElement()) 32638 composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); 32639 if (element.hasTextElement()) { 32640 composeString("text", element.getTextElement()); 32641 } 32642 if (element.hasLanguage()) { 32643 composeCodeableConcept("language", element.getLanguage()); 32644 } 32645 } 32646 32647 protected void composeClaimResponseInsuranceComponent(String name, ClaimResponse.InsuranceComponent element) 32648 throws IOException { 32649 if (element != null) { 32650 composeElementAttributes(element); 32651 xml.enter(FHIR_NS, name); 32652 composeClaimResponseInsuranceComponentElements(element); 32653 composeElementClose(element); 32654 xml.exit(FHIR_NS, name); 32655 } 32656 } 32657 32658 protected void composeClaimResponseInsuranceComponentElements(ClaimResponse.InsuranceComponent element) 32659 throws IOException { 32660 composeBackboneElementElements(element); 32661 if (element.hasSequenceElement()) { 32662 composePositiveInt("sequence", element.getSequenceElement()); 32663 } 32664 if (element.hasFocalElement()) { 32665 composeBoolean("focal", element.getFocalElement()); 32666 } 32667 if (element.hasCoverage()) { 32668 composeReference("coverage", element.getCoverage()); 32669 } 32670 if (element.hasBusinessArrangementElement()) { 32671 composeString("businessArrangement", element.getBusinessArrangementElement()); 32672 } 32673 if (element.hasClaimResponse()) { 32674 composeReference("claimResponse", element.getClaimResponse()); 32675 } 32676 } 32677 32678 protected void composeClaimResponseErrorComponent(String name, ClaimResponse.ErrorComponent element) 32679 throws IOException { 32680 if (element != null) { 32681 composeElementAttributes(element); 32682 xml.enter(FHIR_NS, name); 32683 composeClaimResponseErrorComponentElements(element); 32684 composeElementClose(element); 32685 xml.exit(FHIR_NS, name); 32686 } 32687 } 32688 32689 protected void composeClaimResponseErrorComponentElements(ClaimResponse.ErrorComponent element) throws IOException { 32690 composeBackboneElementElements(element); 32691 if (element.hasItemSequenceElement()) { 32692 composePositiveInt("itemSequence", element.getItemSequenceElement()); 32693 } 32694 if (element.hasDetailSequenceElement()) { 32695 composePositiveInt("detailSequence", element.getDetailSequenceElement()); 32696 } 32697 if (element.hasSubDetailSequenceElement()) { 32698 composePositiveInt("subDetailSequence", element.getSubDetailSequenceElement()); 32699 } 32700 if (element.hasCode()) { 32701 composeCodeableConcept("code", element.getCode()); 32702 } 32703 } 32704 32705 protected void composeClinicalImpression(String name, ClinicalImpression element) throws IOException { 32706 if (element != null) { 32707 composeDomainResourceAttributes(element); 32708 xml.enter(FHIR_NS, name); 32709 composeClinicalImpressionElements(element); 32710 composeElementClose(element); 32711 xml.exit(FHIR_NS, name); 32712 } 32713 } 32714 32715 protected void composeClinicalImpressionElements(ClinicalImpression element) throws IOException { 32716 composeDomainResourceElements(element); 32717 if (element.hasIdentifier()) { 32718 for (Identifier e : element.getIdentifier()) 32719 composeIdentifier("identifier", e); 32720 } 32721 if (element.hasStatusElement()) 32722 composeEnumeration("status", element.getStatusElement(), 32723 new ClinicalImpression.ClinicalImpressionStatusEnumFactory()); 32724 if (element.hasStatusReason()) { 32725 composeCodeableConcept("statusReason", element.getStatusReason()); 32726 } 32727 if (element.hasCode()) { 32728 composeCodeableConcept("code", element.getCode()); 32729 } 32730 if (element.hasDescriptionElement()) { 32731 composeString("description", element.getDescriptionElement()); 32732 } 32733 if (element.hasSubject()) { 32734 composeReference("subject", element.getSubject()); 32735 } 32736 if (element.hasEncounter()) { 32737 composeReference("encounter", element.getEncounter()); 32738 } 32739 if (element.hasEffective()) { 32740 composeType("effective", element.getEffective()); 32741 } 32742 if (element.hasDateElement()) { 32743 composeDateTime("date", element.getDateElement()); 32744 } 32745 if (element.hasAssessor()) { 32746 composeReference("assessor", element.getAssessor()); 32747 } 32748 if (element.hasPrevious()) { 32749 composeReference("previous", element.getPrevious()); 32750 } 32751 if (element.hasProblem()) { 32752 for (Reference e : element.getProblem()) 32753 composeReference("problem", e); 32754 } 32755 if (element.hasInvestigation()) { 32756 for (ClinicalImpression.ClinicalImpressionInvestigationComponent e : element.getInvestigation()) 32757 composeClinicalImpressionClinicalImpressionInvestigationComponent("investigation", e); 32758 } 32759 if (element.hasProtocol()) { 32760 for (UriType e : element.getProtocol()) 32761 composeUri("protocol", e); 32762 } 32763 if (element.hasSummaryElement()) { 32764 composeString("summary", element.getSummaryElement()); 32765 } 32766 if (element.hasFinding()) { 32767 for (ClinicalImpression.ClinicalImpressionFindingComponent e : element.getFinding()) 32768 composeClinicalImpressionClinicalImpressionFindingComponent("finding", e); 32769 } 32770 if (element.hasPrognosisCodeableConcept()) { 32771 for (CodeableConcept e : element.getPrognosisCodeableConcept()) 32772 composeCodeableConcept("prognosisCodeableConcept", e); 32773 } 32774 if (element.hasPrognosisReference()) { 32775 for (Reference e : element.getPrognosisReference()) 32776 composeReference("prognosisReference", e); 32777 } 32778 if (element.hasSupportingInfo()) { 32779 for (Reference e : element.getSupportingInfo()) 32780 composeReference("supportingInfo", e); 32781 } 32782 if (element.hasNote()) { 32783 for (Annotation e : element.getNote()) 32784 composeAnnotation("note", e); 32785 } 32786 } 32787 32788 protected void composeClinicalImpressionClinicalImpressionInvestigationComponent(String name, 32789 ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { 32790 if (element != null) { 32791 composeElementAttributes(element); 32792 xml.enter(FHIR_NS, name); 32793 composeClinicalImpressionClinicalImpressionInvestigationComponentElements(element); 32794 composeElementClose(element); 32795 xml.exit(FHIR_NS, name); 32796 } 32797 } 32798 32799 protected void composeClinicalImpressionClinicalImpressionInvestigationComponentElements( 32800 ClinicalImpression.ClinicalImpressionInvestigationComponent element) throws IOException { 32801 composeBackboneElementElements(element); 32802 if (element.hasCode()) { 32803 composeCodeableConcept("code", element.getCode()); 32804 } 32805 if (element.hasItem()) { 32806 for (Reference e : element.getItem()) 32807 composeReference("item", e); 32808 } 32809 } 32810 32811 protected void composeClinicalImpressionClinicalImpressionFindingComponent(String name, 32812 ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { 32813 if (element != null) { 32814 composeElementAttributes(element); 32815 xml.enter(FHIR_NS, name); 32816 composeClinicalImpressionClinicalImpressionFindingComponentElements(element); 32817 composeElementClose(element); 32818 xml.exit(FHIR_NS, name); 32819 } 32820 } 32821 32822 protected void composeClinicalImpressionClinicalImpressionFindingComponentElements( 32823 ClinicalImpression.ClinicalImpressionFindingComponent element) throws IOException { 32824 composeBackboneElementElements(element); 32825 if (element.hasItemCodeableConcept()) { 32826 composeCodeableConcept("itemCodeableConcept", element.getItemCodeableConcept()); 32827 } 32828 if (element.hasItemReference()) { 32829 composeReference("itemReference", element.getItemReference()); 32830 } 32831 if (element.hasBasisElement()) { 32832 composeString("basis", element.getBasisElement()); 32833 } 32834 } 32835 32836 protected void composeCodeSystem(String name, CodeSystem element) throws IOException { 32837 if (element != null) { 32838 composeDomainResourceAttributes(element); 32839 xml.enter(FHIR_NS, name); 32840 composeCodeSystemElements(element); 32841 composeElementClose(element); 32842 xml.exit(FHIR_NS, name); 32843 } 32844 } 32845 32846 protected void composeCodeSystemElements(CodeSystem element) throws IOException { 32847 composeDomainResourceElements(element); 32848 if (element.hasUrlElement()) { 32849 composeUri("url", element.getUrlElement()); 32850 } 32851 if (element.hasIdentifier()) { 32852 for (Identifier e : element.getIdentifier()) 32853 composeIdentifier("identifier", e); 32854 } 32855 if (element.hasVersionElement()) { 32856 composeString("version", element.getVersionElement()); 32857 } 32858 if (element.hasNameElement()) { 32859 composeString("name", element.getNameElement()); 32860 } 32861 if (element.hasTitleElement()) { 32862 composeString("title", element.getTitleElement()); 32863 } 32864 if (element.hasStatusElement()) 32865 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 32866 if (element.hasExperimentalElement()) { 32867 composeBoolean("experimental", element.getExperimentalElement()); 32868 } 32869 if (element.hasDateElement()) { 32870 composeDateTime("date", element.getDateElement()); 32871 } 32872 if (element.hasPublisherElement()) { 32873 composeString("publisher", element.getPublisherElement()); 32874 } 32875 if (element.hasContact()) { 32876 for (ContactDetail e : element.getContact()) 32877 composeContactDetail("contact", e); 32878 } 32879 if (element.hasDescriptionElement()) { 32880 composeMarkdown("description", element.getDescriptionElement()); 32881 } 32882 if (element.hasUseContext()) { 32883 for (UsageContext e : element.getUseContext()) 32884 composeUsageContext("useContext", e); 32885 } 32886 if (element.hasJurisdiction()) { 32887 for (CodeableConcept e : element.getJurisdiction()) 32888 composeCodeableConcept("jurisdiction", e); 32889 } 32890 if (element.hasPurposeElement()) { 32891 composeMarkdown("purpose", element.getPurposeElement()); 32892 } 32893 if (element.hasCopyrightElement()) { 32894 composeMarkdown("copyright", element.getCopyrightElement()); 32895 } 32896 if (element.hasCaseSensitiveElement()) { 32897 composeBoolean("caseSensitive", element.getCaseSensitiveElement()); 32898 } 32899 if (element.hasValueSetElement()) { 32900 composeCanonical("valueSet", element.getValueSetElement()); 32901 } 32902 if (element.hasHierarchyMeaningElement()) 32903 composeEnumeration("hierarchyMeaning", element.getHierarchyMeaningElement(), 32904 new CodeSystem.CodeSystemHierarchyMeaningEnumFactory()); 32905 if (element.hasCompositionalElement()) { 32906 composeBoolean("compositional", element.getCompositionalElement()); 32907 } 32908 if (element.hasVersionNeededElement()) { 32909 composeBoolean("versionNeeded", element.getVersionNeededElement()); 32910 } 32911 if (element.hasContentElement()) 32912 composeEnumeration("content", element.getContentElement(), new CodeSystem.CodeSystemContentModeEnumFactory()); 32913 if (element.hasSupplementsElement()) { 32914 composeCanonical("supplements", element.getSupplementsElement()); 32915 } 32916 if (element.hasCountElement()) { 32917 composeUnsignedInt("count", element.getCountElement()); 32918 } 32919 if (element.hasFilter()) { 32920 for (CodeSystem.CodeSystemFilterComponent e : element.getFilter()) 32921 composeCodeSystemCodeSystemFilterComponent("filter", e); 32922 } 32923 if (element.hasProperty()) { 32924 for (CodeSystem.PropertyComponent e : element.getProperty()) 32925 composeCodeSystemPropertyComponent("property", e); 32926 } 32927 if (element.hasConcept()) { 32928 for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) 32929 composeCodeSystemConceptDefinitionComponent("concept", e); 32930 } 32931 } 32932 32933 protected void composeCodeSystemCodeSystemFilterComponent(String name, CodeSystem.CodeSystemFilterComponent element) 32934 throws IOException { 32935 if (element != null) { 32936 composeElementAttributes(element); 32937 xml.enter(FHIR_NS, name); 32938 composeCodeSystemCodeSystemFilterComponentElements(element); 32939 composeElementClose(element); 32940 xml.exit(FHIR_NS, name); 32941 } 32942 } 32943 32944 protected void composeCodeSystemCodeSystemFilterComponentElements(CodeSystem.CodeSystemFilterComponent element) 32945 throws IOException { 32946 composeBackboneElementElements(element); 32947 if (element.hasCodeElement()) { 32948 composeCode("code", element.getCodeElement()); 32949 } 32950 if (element.hasDescriptionElement()) { 32951 composeString("description", element.getDescriptionElement()); 32952 } 32953 if (element.hasOperator()) 32954 for (Enumeration<CodeSystem.FilterOperator> e : element.getOperator()) 32955 composeEnumeration("operator", e, new CodeSystem.FilterOperatorEnumFactory()); 32956 if (element.hasValueElement()) { 32957 composeString("value", element.getValueElement()); 32958 } 32959 } 32960 32961 protected void composeCodeSystemPropertyComponent(String name, CodeSystem.PropertyComponent element) 32962 throws IOException { 32963 if (element != null) { 32964 composeElementAttributes(element); 32965 xml.enter(FHIR_NS, name); 32966 composeCodeSystemPropertyComponentElements(element); 32967 composeElementClose(element); 32968 xml.exit(FHIR_NS, name); 32969 } 32970 } 32971 32972 protected void composeCodeSystemPropertyComponentElements(CodeSystem.PropertyComponent element) throws IOException { 32973 composeBackboneElementElements(element); 32974 if (element.hasCodeElement()) { 32975 composeCode("code", element.getCodeElement()); 32976 } 32977 if (element.hasUriElement()) { 32978 composeUri("uri", element.getUriElement()); 32979 } 32980 if (element.hasDescriptionElement()) { 32981 composeString("description", element.getDescriptionElement()); 32982 } 32983 if (element.hasTypeElement()) 32984 composeEnumeration("type", element.getTypeElement(), new CodeSystem.PropertyTypeEnumFactory()); 32985 } 32986 32987 protected void composeCodeSystemConceptDefinitionComponent(String name, CodeSystem.ConceptDefinitionComponent element) 32988 throws IOException { 32989 if (element != null) { 32990 composeElementAttributes(element); 32991 xml.enter(FHIR_NS, name); 32992 composeCodeSystemConceptDefinitionComponentElements(element); 32993 composeElementClose(element); 32994 xml.exit(FHIR_NS, name); 32995 } 32996 } 32997 32998 protected void composeCodeSystemConceptDefinitionComponentElements(CodeSystem.ConceptDefinitionComponent element) 32999 throws IOException { 33000 composeBackboneElementElements(element); 33001 if (element.hasCodeElement()) { 33002 composeCode("code", element.getCodeElement()); 33003 } 33004 if (element.hasDisplayElement()) { 33005 composeString("display", element.getDisplayElement()); 33006 } 33007 if (element.hasDefinitionElement()) { 33008 composeString("definition", element.getDefinitionElement()); 33009 } 33010 if (element.hasDesignation()) { 33011 for (CodeSystem.ConceptDefinitionDesignationComponent e : element.getDesignation()) 33012 composeCodeSystemConceptDefinitionDesignationComponent("designation", e); 33013 } 33014 if (element.hasProperty()) { 33015 for (CodeSystem.ConceptPropertyComponent e : element.getProperty()) 33016 composeCodeSystemConceptPropertyComponent("property", e); 33017 } 33018 if (element.hasConcept()) { 33019 for (CodeSystem.ConceptDefinitionComponent e : element.getConcept()) 33020 composeCodeSystemConceptDefinitionComponent("concept", e); 33021 } 33022 } 33023 33024 protected void composeCodeSystemConceptDefinitionDesignationComponent(String name, 33025 CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { 33026 if (element != null) { 33027 composeElementAttributes(element); 33028 xml.enter(FHIR_NS, name); 33029 composeCodeSystemConceptDefinitionDesignationComponentElements(element); 33030 composeElementClose(element); 33031 xml.exit(FHIR_NS, name); 33032 } 33033 } 33034 33035 protected void composeCodeSystemConceptDefinitionDesignationComponentElements( 33036 CodeSystem.ConceptDefinitionDesignationComponent element) throws IOException { 33037 composeBackboneElementElements(element); 33038 if (element.hasLanguageElement()) { 33039 composeCode("language", element.getLanguageElement()); 33040 } 33041 if (element.hasUse()) { 33042 composeCoding("use", element.getUse()); 33043 } 33044 if (element.hasValueElement()) { 33045 composeString("value", element.getValueElement()); 33046 } 33047 } 33048 33049 protected void composeCodeSystemConceptPropertyComponent(String name, CodeSystem.ConceptPropertyComponent element) 33050 throws IOException { 33051 if (element != null) { 33052 composeElementAttributes(element); 33053 xml.enter(FHIR_NS, name); 33054 composeCodeSystemConceptPropertyComponentElements(element); 33055 composeElementClose(element); 33056 xml.exit(FHIR_NS, name); 33057 } 33058 } 33059 33060 protected void composeCodeSystemConceptPropertyComponentElements(CodeSystem.ConceptPropertyComponent element) 33061 throws IOException { 33062 composeBackboneElementElements(element); 33063 if (element.hasCodeElement()) { 33064 composeCode("code", element.getCodeElement()); 33065 } 33066 if (element.hasValue()) { 33067 composeType("value", element.getValue()); 33068 } 33069 } 33070 33071 protected void composeCommunication(String name, Communication element) throws IOException { 33072 if (element != null) { 33073 composeDomainResourceAttributes(element); 33074 xml.enter(FHIR_NS, name); 33075 composeCommunicationElements(element); 33076 composeElementClose(element); 33077 xml.exit(FHIR_NS, name); 33078 } 33079 } 33080 33081 protected void composeCommunicationElements(Communication element) throws IOException { 33082 composeDomainResourceElements(element); 33083 if (element.hasIdentifier()) { 33084 for (Identifier e : element.getIdentifier()) 33085 composeIdentifier("identifier", e); 33086 } 33087 if (element.hasInstantiatesCanonical()) { 33088 for (CanonicalType e : element.getInstantiatesCanonical()) 33089 composeCanonical("instantiatesCanonical", e); 33090 } 33091 if (element.hasInstantiatesUri()) { 33092 for (UriType e : element.getInstantiatesUri()) 33093 composeUri("instantiatesUri", e); 33094 } 33095 if (element.hasBasedOn()) { 33096 for (Reference e : element.getBasedOn()) 33097 composeReference("basedOn", e); 33098 } 33099 if (element.hasPartOf()) { 33100 for (Reference e : element.getPartOf()) 33101 composeReference("partOf", e); 33102 } 33103 if (element.hasInResponseTo()) { 33104 for (Reference e : element.getInResponseTo()) 33105 composeReference("inResponseTo", e); 33106 } 33107 if (element.hasStatusElement()) 33108 composeEnumeration("status", element.getStatusElement(), new Communication.CommunicationStatusEnumFactory()); 33109 if (element.hasStatusReason()) { 33110 composeCodeableConcept("statusReason", element.getStatusReason()); 33111 } 33112 if (element.hasCategory()) { 33113 for (CodeableConcept e : element.getCategory()) 33114 composeCodeableConcept("category", e); 33115 } 33116 if (element.hasPriorityElement()) 33117 composeEnumeration("priority", element.getPriorityElement(), 33118 new Communication.CommunicationPriorityEnumFactory()); 33119 if (element.hasMedium()) { 33120 for (CodeableConcept e : element.getMedium()) 33121 composeCodeableConcept("medium", e); 33122 } 33123 if (element.hasSubject()) { 33124 composeReference("subject", element.getSubject()); 33125 } 33126 if (element.hasTopic()) { 33127 composeCodeableConcept("topic", element.getTopic()); 33128 } 33129 if (element.hasAbout()) { 33130 for (Reference e : element.getAbout()) 33131 composeReference("about", e); 33132 } 33133 if (element.hasEncounter()) { 33134 composeReference("encounter", element.getEncounter()); 33135 } 33136 if (element.hasSentElement()) { 33137 composeDateTime("sent", element.getSentElement()); 33138 } 33139 if (element.hasReceivedElement()) { 33140 composeDateTime("received", element.getReceivedElement()); 33141 } 33142 if (element.hasRecipient()) { 33143 for (Reference e : element.getRecipient()) 33144 composeReference("recipient", e); 33145 } 33146 if (element.hasSender()) { 33147 composeReference("sender", element.getSender()); 33148 } 33149 if (element.hasReasonCode()) { 33150 for (CodeableConcept e : element.getReasonCode()) 33151 composeCodeableConcept("reasonCode", e); 33152 } 33153 if (element.hasReasonReference()) { 33154 for (Reference e : element.getReasonReference()) 33155 composeReference("reasonReference", e); 33156 } 33157 if (element.hasPayload()) { 33158 for (Communication.CommunicationPayloadComponent e : element.getPayload()) 33159 composeCommunicationCommunicationPayloadComponent("payload", e); 33160 } 33161 if (element.hasNote()) { 33162 for (Annotation e : element.getNote()) 33163 composeAnnotation("note", e); 33164 } 33165 } 33166 33167 protected void composeCommunicationCommunicationPayloadComponent(String name, 33168 Communication.CommunicationPayloadComponent element) throws IOException { 33169 if (element != null) { 33170 composeElementAttributes(element); 33171 xml.enter(FHIR_NS, name); 33172 composeCommunicationCommunicationPayloadComponentElements(element); 33173 composeElementClose(element); 33174 xml.exit(FHIR_NS, name); 33175 } 33176 } 33177 33178 protected void composeCommunicationCommunicationPayloadComponentElements( 33179 Communication.CommunicationPayloadComponent element) throws IOException { 33180 composeBackboneElementElements(element); 33181 if (element.hasContent()) { 33182 composeType("content", element.getContent()); 33183 } 33184 } 33185 33186 protected void composeCommunicationRequest(String name, CommunicationRequest element) throws IOException { 33187 if (element != null) { 33188 composeDomainResourceAttributes(element); 33189 xml.enter(FHIR_NS, name); 33190 composeCommunicationRequestElements(element); 33191 composeElementClose(element); 33192 xml.exit(FHIR_NS, name); 33193 } 33194 } 33195 33196 protected void composeCommunicationRequestElements(CommunicationRequest element) throws IOException { 33197 composeDomainResourceElements(element); 33198 if (element.hasIdentifier()) { 33199 for (Identifier e : element.getIdentifier()) 33200 composeIdentifier("identifier", e); 33201 } 33202 if (element.hasBasedOn()) { 33203 for (Reference e : element.getBasedOn()) 33204 composeReference("basedOn", e); 33205 } 33206 if (element.hasReplaces()) { 33207 for (Reference e : element.getReplaces()) 33208 composeReference("replaces", e); 33209 } 33210 if (element.hasGroupIdentifier()) { 33211 composeIdentifier("groupIdentifier", element.getGroupIdentifier()); 33212 } 33213 if (element.hasStatusElement()) 33214 composeEnumeration("status", element.getStatusElement(), 33215 new CommunicationRequest.CommunicationRequestStatusEnumFactory()); 33216 if (element.hasStatusReason()) { 33217 composeCodeableConcept("statusReason", element.getStatusReason()); 33218 } 33219 if (element.hasCategory()) { 33220 for (CodeableConcept e : element.getCategory()) 33221 composeCodeableConcept("category", e); 33222 } 33223 if (element.hasPriorityElement()) 33224 composeEnumeration("priority", element.getPriorityElement(), 33225 new CommunicationRequest.CommunicationPriorityEnumFactory()); 33226 if (element.hasDoNotPerformElement()) { 33227 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 33228 } 33229 if (element.hasMedium()) { 33230 for (CodeableConcept e : element.getMedium()) 33231 composeCodeableConcept("medium", e); 33232 } 33233 if (element.hasSubject()) { 33234 composeReference("subject", element.getSubject()); 33235 } 33236 if (element.hasAbout()) { 33237 for (Reference e : element.getAbout()) 33238 composeReference("about", e); 33239 } 33240 if (element.hasEncounter()) { 33241 composeReference("encounter", element.getEncounter()); 33242 } 33243 if (element.hasPayload()) { 33244 for (CommunicationRequest.CommunicationRequestPayloadComponent e : element.getPayload()) 33245 composeCommunicationRequestCommunicationRequestPayloadComponent("payload", e); 33246 } 33247 if (element.hasOccurrence()) { 33248 composeType("occurrence", element.getOccurrence()); 33249 } 33250 if (element.hasAuthoredOnElement()) { 33251 composeDateTime("authoredOn", element.getAuthoredOnElement()); 33252 } 33253 if (element.hasRequester()) { 33254 composeReference("requester", element.getRequester()); 33255 } 33256 if (element.hasRecipient()) { 33257 for (Reference e : element.getRecipient()) 33258 composeReference("recipient", e); 33259 } 33260 if (element.hasSender()) { 33261 composeReference("sender", element.getSender()); 33262 } 33263 if (element.hasReasonCode()) { 33264 for (CodeableConcept e : element.getReasonCode()) 33265 composeCodeableConcept("reasonCode", e); 33266 } 33267 if (element.hasReasonReference()) { 33268 for (Reference e : element.getReasonReference()) 33269 composeReference("reasonReference", e); 33270 } 33271 if (element.hasNote()) { 33272 for (Annotation e : element.getNote()) 33273 composeAnnotation("note", e); 33274 } 33275 } 33276 33277 protected void composeCommunicationRequestCommunicationRequestPayloadComponent(String name, 33278 CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { 33279 if (element != null) { 33280 composeElementAttributes(element); 33281 xml.enter(FHIR_NS, name); 33282 composeCommunicationRequestCommunicationRequestPayloadComponentElements(element); 33283 composeElementClose(element); 33284 xml.exit(FHIR_NS, name); 33285 } 33286 } 33287 33288 protected void composeCommunicationRequestCommunicationRequestPayloadComponentElements( 33289 CommunicationRequest.CommunicationRequestPayloadComponent element) throws IOException { 33290 composeBackboneElementElements(element); 33291 if (element.hasContent()) { 33292 composeType("content", element.getContent()); 33293 } 33294 } 33295 33296 protected void composeCompartmentDefinition(String name, CompartmentDefinition element) throws IOException { 33297 if (element != null) { 33298 composeDomainResourceAttributes(element); 33299 xml.enter(FHIR_NS, name); 33300 composeCompartmentDefinitionElements(element); 33301 composeElementClose(element); 33302 xml.exit(FHIR_NS, name); 33303 } 33304 } 33305 33306 protected void composeCompartmentDefinitionElements(CompartmentDefinition element) throws IOException { 33307 composeDomainResourceElements(element); 33308 if (element.hasUrlElement()) { 33309 composeUri("url", element.getUrlElement()); 33310 } 33311 if (element.hasVersionElement()) { 33312 composeString("version", element.getVersionElement()); 33313 } 33314 if (element.hasNameElement()) { 33315 composeString("name", element.getNameElement()); 33316 } 33317 if (element.hasStatusElement()) 33318 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 33319 if (element.hasExperimentalElement()) { 33320 composeBoolean("experimental", element.getExperimentalElement()); 33321 } 33322 if (element.hasDateElement()) { 33323 composeDateTime("date", element.getDateElement()); 33324 } 33325 if (element.hasPublisherElement()) { 33326 composeString("publisher", element.getPublisherElement()); 33327 } 33328 if (element.hasContact()) { 33329 for (ContactDetail e : element.getContact()) 33330 composeContactDetail("contact", e); 33331 } 33332 if (element.hasDescriptionElement()) { 33333 composeMarkdown("description", element.getDescriptionElement()); 33334 } 33335 if (element.hasUseContext()) { 33336 for (UsageContext e : element.getUseContext()) 33337 composeUsageContext("useContext", e); 33338 } 33339 if (element.hasPurposeElement()) { 33340 composeMarkdown("purpose", element.getPurposeElement()); 33341 } 33342 if (element.hasCodeElement()) 33343 composeEnumeration("code", element.getCodeElement(), new CompartmentDefinition.CompartmentTypeEnumFactory()); 33344 if (element.hasSearchElement()) { 33345 composeBoolean("search", element.getSearchElement()); 33346 } 33347 if (element.hasResource()) { 33348 for (CompartmentDefinition.CompartmentDefinitionResourceComponent e : element.getResource()) 33349 composeCompartmentDefinitionCompartmentDefinitionResourceComponent("resource", e); 33350 } 33351 } 33352 33353 protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponent(String name, 33354 CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { 33355 if (element != null) { 33356 composeElementAttributes(element); 33357 xml.enter(FHIR_NS, name); 33358 composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements(element); 33359 composeElementClose(element); 33360 xml.exit(FHIR_NS, name); 33361 } 33362 } 33363 33364 protected void composeCompartmentDefinitionCompartmentDefinitionResourceComponentElements( 33365 CompartmentDefinition.CompartmentDefinitionResourceComponent element) throws IOException { 33366 composeBackboneElementElements(element); 33367 if (element.hasCodeElement()) { 33368 composeCode("code", element.getCodeElement()); 33369 } 33370 if (element.hasParam()) { 33371 for (StringType e : element.getParam()) 33372 composeString("param", e); 33373 } 33374 if (element.hasDocumentationElement()) { 33375 composeString("documentation", element.getDocumentationElement()); 33376 } 33377 } 33378 33379 protected void composeComposition(String name, Composition element) throws IOException { 33380 if (element != null) { 33381 composeDomainResourceAttributes(element); 33382 xml.enter(FHIR_NS, name); 33383 composeCompositionElements(element); 33384 composeElementClose(element); 33385 xml.exit(FHIR_NS, name); 33386 } 33387 } 33388 33389 protected void composeCompositionElements(Composition element) throws IOException { 33390 composeDomainResourceElements(element); 33391 if (element.hasIdentifier()) { 33392 composeIdentifier("identifier", element.getIdentifier()); 33393 } 33394 if (element.hasStatusElement()) 33395 composeEnumeration("status", element.getStatusElement(), new Composition.CompositionStatusEnumFactory()); 33396 if (element.hasType()) { 33397 composeCodeableConcept("type", element.getType()); 33398 } 33399 if (element.hasCategory()) { 33400 for (CodeableConcept e : element.getCategory()) 33401 composeCodeableConcept("category", e); 33402 } 33403 if (element.hasSubject()) { 33404 composeReference("subject", element.getSubject()); 33405 } 33406 if (element.hasEncounter()) { 33407 composeReference("encounter", element.getEncounter()); 33408 } 33409 if (element.hasDateElement()) { 33410 composeDateTime("date", element.getDateElement()); 33411 } 33412 if (element.hasAuthor()) { 33413 for (Reference e : element.getAuthor()) 33414 composeReference("author", e); 33415 } 33416 if (element.hasTitleElement()) { 33417 composeString("title", element.getTitleElement()); 33418 } 33419 if (element.hasConfidentialityElement()) 33420 composeEnumeration("confidentiality", element.getConfidentialityElement(), 33421 new Composition.DocumentConfidentialityEnumFactory()); 33422 if (element.hasAttester()) { 33423 for (Composition.CompositionAttesterComponent e : element.getAttester()) 33424 composeCompositionCompositionAttesterComponent("attester", e); 33425 } 33426 if (element.hasCustodian()) { 33427 composeReference("custodian", element.getCustodian()); 33428 } 33429 if (element.hasRelatesTo()) { 33430 for (Composition.CompositionRelatesToComponent e : element.getRelatesTo()) 33431 composeCompositionCompositionRelatesToComponent("relatesTo", e); 33432 } 33433 if (element.hasEvent()) { 33434 for (Composition.CompositionEventComponent e : element.getEvent()) 33435 composeCompositionCompositionEventComponent("event", e); 33436 } 33437 if (element.hasSection()) { 33438 for (Composition.SectionComponent e : element.getSection()) 33439 composeCompositionSectionComponent("section", e); 33440 } 33441 } 33442 33443 protected void composeCompositionCompositionAttesterComponent(String name, 33444 Composition.CompositionAttesterComponent element) throws IOException { 33445 if (element != null) { 33446 composeElementAttributes(element); 33447 xml.enter(FHIR_NS, name); 33448 composeCompositionCompositionAttesterComponentElements(element); 33449 composeElementClose(element); 33450 xml.exit(FHIR_NS, name); 33451 } 33452 } 33453 33454 protected void composeCompositionCompositionAttesterComponentElements( 33455 Composition.CompositionAttesterComponent element) throws IOException { 33456 composeBackboneElementElements(element); 33457 if (element.hasModeElement()) 33458 composeEnumeration("mode", element.getModeElement(), new Composition.CompositionAttestationModeEnumFactory()); 33459 if (element.hasTimeElement()) { 33460 composeDateTime("time", element.getTimeElement()); 33461 } 33462 if (element.hasParty()) { 33463 composeReference("party", element.getParty()); 33464 } 33465 } 33466 33467 protected void composeCompositionCompositionRelatesToComponent(String name, 33468 Composition.CompositionRelatesToComponent element) throws IOException { 33469 if (element != null) { 33470 composeElementAttributes(element); 33471 xml.enter(FHIR_NS, name); 33472 composeCompositionCompositionRelatesToComponentElements(element); 33473 composeElementClose(element); 33474 xml.exit(FHIR_NS, name); 33475 } 33476 } 33477 33478 protected void composeCompositionCompositionRelatesToComponentElements( 33479 Composition.CompositionRelatesToComponent element) throws IOException { 33480 composeBackboneElementElements(element); 33481 if (element.hasCodeElement()) 33482 composeEnumeration("code", element.getCodeElement(), new Composition.DocumentRelationshipTypeEnumFactory()); 33483 if (element.hasTarget()) { 33484 composeType("target", element.getTarget()); 33485 } 33486 } 33487 33488 protected void composeCompositionCompositionEventComponent(String name, Composition.CompositionEventComponent element) 33489 throws IOException { 33490 if (element != null) { 33491 composeElementAttributes(element); 33492 xml.enter(FHIR_NS, name); 33493 composeCompositionCompositionEventComponentElements(element); 33494 composeElementClose(element); 33495 xml.exit(FHIR_NS, name); 33496 } 33497 } 33498 33499 protected void composeCompositionCompositionEventComponentElements(Composition.CompositionEventComponent element) 33500 throws IOException { 33501 composeBackboneElementElements(element); 33502 if (element.hasCode()) { 33503 for (CodeableConcept e : element.getCode()) 33504 composeCodeableConcept("code", e); 33505 } 33506 if (element.hasPeriod()) { 33507 composePeriod("period", element.getPeriod()); 33508 } 33509 if (element.hasDetail()) { 33510 for (Reference e : element.getDetail()) 33511 composeReference("detail", e); 33512 } 33513 } 33514 33515 protected void composeCompositionSectionComponent(String name, Composition.SectionComponent element) 33516 throws IOException { 33517 if (element != null) { 33518 composeElementAttributes(element); 33519 xml.enter(FHIR_NS, name); 33520 composeCompositionSectionComponentElements(element); 33521 composeElementClose(element); 33522 xml.exit(FHIR_NS, name); 33523 } 33524 } 33525 33526 protected void composeCompositionSectionComponentElements(Composition.SectionComponent element) throws IOException { 33527 composeBackboneElementElements(element); 33528 if (element.hasTitleElement()) { 33529 composeString("title", element.getTitleElement()); 33530 } 33531 if (element.hasCode()) { 33532 composeCodeableConcept("code", element.getCode()); 33533 } 33534 if (element.hasAuthor()) { 33535 for (Reference e : element.getAuthor()) 33536 composeReference("author", e); 33537 } 33538 if (element.hasFocus()) { 33539 composeReference("focus", element.getFocus()); 33540 } 33541 if (element.hasText()) { 33542 composeNarrative("text", element.getText()); 33543 } 33544 if (element.hasModeElement()) 33545 composeEnumeration("mode", element.getModeElement(), new Composition.SectionModeEnumFactory()); 33546 if (element.hasOrderedBy()) { 33547 composeCodeableConcept("orderedBy", element.getOrderedBy()); 33548 } 33549 if (element.hasEntry()) { 33550 for (Reference e : element.getEntry()) 33551 composeReference("entry", e); 33552 } 33553 if (element.hasEmptyReason()) { 33554 composeCodeableConcept("emptyReason", element.getEmptyReason()); 33555 } 33556 if (element.hasSection()) { 33557 for (Composition.SectionComponent e : element.getSection()) 33558 composeCompositionSectionComponent("section", e); 33559 } 33560 } 33561 33562 protected void composeConceptMap(String name, ConceptMap element) throws IOException { 33563 if (element != null) { 33564 composeDomainResourceAttributes(element); 33565 xml.enter(FHIR_NS, name); 33566 composeConceptMapElements(element); 33567 composeElementClose(element); 33568 xml.exit(FHIR_NS, name); 33569 } 33570 } 33571 33572 protected void composeConceptMapElements(ConceptMap element) throws IOException { 33573 composeDomainResourceElements(element); 33574 if (element.hasUrlElement()) { 33575 composeUri("url", element.getUrlElement()); 33576 } 33577 if (element.hasIdentifier()) { 33578 composeIdentifier("identifier", element.getIdentifier()); 33579 } 33580 if (element.hasVersionElement()) { 33581 composeString("version", element.getVersionElement()); 33582 } 33583 if (element.hasNameElement()) { 33584 composeString("name", element.getNameElement()); 33585 } 33586 if (element.hasTitleElement()) { 33587 composeString("title", element.getTitleElement()); 33588 } 33589 if (element.hasStatusElement()) 33590 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 33591 if (element.hasExperimentalElement()) { 33592 composeBoolean("experimental", element.getExperimentalElement()); 33593 } 33594 if (element.hasDateElement()) { 33595 composeDateTime("date", element.getDateElement()); 33596 } 33597 if (element.hasPublisherElement()) { 33598 composeString("publisher", element.getPublisherElement()); 33599 } 33600 if (element.hasContact()) { 33601 for (ContactDetail e : element.getContact()) 33602 composeContactDetail("contact", e); 33603 } 33604 if (element.hasDescriptionElement()) { 33605 composeMarkdown("description", element.getDescriptionElement()); 33606 } 33607 if (element.hasUseContext()) { 33608 for (UsageContext e : element.getUseContext()) 33609 composeUsageContext("useContext", e); 33610 } 33611 if (element.hasJurisdiction()) { 33612 for (CodeableConcept e : element.getJurisdiction()) 33613 composeCodeableConcept("jurisdiction", e); 33614 } 33615 if (element.hasPurposeElement()) { 33616 composeMarkdown("purpose", element.getPurposeElement()); 33617 } 33618 if (element.hasCopyrightElement()) { 33619 composeMarkdown("copyright", element.getCopyrightElement()); 33620 } 33621 if (element.hasSource()) { 33622 composeType("source", element.getSource()); 33623 } 33624 if (element.hasTarget()) { 33625 composeType("target", element.getTarget()); 33626 } 33627 if (element.hasGroup()) { 33628 for (ConceptMap.ConceptMapGroupComponent e : element.getGroup()) 33629 composeConceptMapConceptMapGroupComponent("group", e); 33630 } 33631 } 33632 33633 protected void composeConceptMapConceptMapGroupComponent(String name, ConceptMap.ConceptMapGroupComponent element) 33634 throws IOException { 33635 if (element != null) { 33636 composeElementAttributes(element); 33637 xml.enter(FHIR_NS, name); 33638 composeConceptMapConceptMapGroupComponentElements(element); 33639 composeElementClose(element); 33640 xml.exit(FHIR_NS, name); 33641 } 33642 } 33643 33644 protected void composeConceptMapConceptMapGroupComponentElements(ConceptMap.ConceptMapGroupComponent element) 33645 throws IOException { 33646 composeBackboneElementElements(element); 33647 if (element.hasSourceElement()) { 33648 composeUri("source", element.getSourceElement()); 33649 } 33650 if (element.hasSourceVersionElement()) { 33651 composeString("sourceVersion", element.getSourceVersionElement()); 33652 } 33653 if (element.hasTargetElement()) { 33654 composeUri("target", element.getTargetElement()); 33655 } 33656 if (element.hasTargetVersionElement()) { 33657 composeString("targetVersion", element.getTargetVersionElement()); 33658 } 33659 if (element.hasElement()) { 33660 for (ConceptMap.SourceElementComponent e : element.getElement()) 33661 composeConceptMapSourceElementComponent("element", e); 33662 } 33663 if (element.hasUnmapped()) { 33664 composeConceptMapConceptMapGroupUnmappedComponent("unmapped", element.getUnmapped()); 33665 } 33666 } 33667 33668 protected void composeConceptMapSourceElementComponent(String name, ConceptMap.SourceElementComponent element) 33669 throws IOException { 33670 if (element != null) { 33671 composeElementAttributes(element); 33672 xml.enter(FHIR_NS, name); 33673 composeConceptMapSourceElementComponentElements(element); 33674 composeElementClose(element); 33675 xml.exit(FHIR_NS, name); 33676 } 33677 } 33678 33679 protected void composeConceptMapSourceElementComponentElements(ConceptMap.SourceElementComponent element) 33680 throws IOException { 33681 composeBackboneElementElements(element); 33682 if (element.hasCodeElement()) { 33683 composeCode("code", element.getCodeElement()); 33684 } 33685 if (element.hasDisplayElement()) { 33686 composeString("display", element.getDisplayElement()); 33687 } 33688 if (element.hasTarget()) { 33689 for (ConceptMap.TargetElementComponent e : element.getTarget()) 33690 composeConceptMapTargetElementComponent("target", e); 33691 } 33692 } 33693 33694 protected void composeConceptMapTargetElementComponent(String name, ConceptMap.TargetElementComponent element) 33695 throws IOException { 33696 if (element != null) { 33697 composeElementAttributes(element); 33698 xml.enter(FHIR_NS, name); 33699 composeConceptMapTargetElementComponentElements(element); 33700 composeElementClose(element); 33701 xml.exit(FHIR_NS, name); 33702 } 33703 } 33704 33705 protected void composeConceptMapTargetElementComponentElements(ConceptMap.TargetElementComponent element) 33706 throws IOException { 33707 composeBackboneElementElements(element); 33708 if (element.hasCodeElement()) { 33709 composeCode("code", element.getCodeElement()); 33710 } 33711 if (element.hasDisplayElement()) { 33712 composeString("display", element.getDisplayElement()); 33713 } 33714 if (element.hasEquivalenceElement()) 33715 composeEnumeration("equivalence", element.getEquivalenceElement(), 33716 new Enumerations.ConceptMapEquivalenceEnumFactory()); 33717 if (element.hasCommentElement()) { 33718 composeString("comment", element.getCommentElement()); 33719 } 33720 if (element.hasDependsOn()) { 33721 for (ConceptMap.OtherElementComponent e : element.getDependsOn()) 33722 composeConceptMapOtherElementComponent("dependsOn", e); 33723 } 33724 if (element.hasProduct()) { 33725 for (ConceptMap.OtherElementComponent e : element.getProduct()) 33726 composeConceptMapOtherElementComponent("product", e); 33727 } 33728 } 33729 33730 protected void composeConceptMapOtherElementComponent(String name, ConceptMap.OtherElementComponent element) 33731 throws IOException { 33732 if (element != null) { 33733 composeElementAttributes(element); 33734 xml.enter(FHIR_NS, name); 33735 composeConceptMapOtherElementComponentElements(element); 33736 composeElementClose(element); 33737 xml.exit(FHIR_NS, name); 33738 } 33739 } 33740 33741 protected void composeConceptMapOtherElementComponentElements(ConceptMap.OtherElementComponent element) 33742 throws IOException { 33743 composeBackboneElementElements(element); 33744 if (element.hasPropertyElement()) { 33745 composeUri("property", element.getPropertyElement()); 33746 } 33747 if (element.hasSystemElement()) { 33748 composeCanonical("system", element.getSystemElement()); 33749 } 33750 if (element.hasValueElement()) { 33751 composeString("value", element.getValueElement()); 33752 } 33753 if (element.hasDisplayElement()) { 33754 composeString("display", element.getDisplayElement()); 33755 } 33756 } 33757 33758 protected void composeConceptMapConceptMapGroupUnmappedComponent(String name, 33759 ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { 33760 if (element != null) { 33761 composeElementAttributes(element); 33762 xml.enter(FHIR_NS, name); 33763 composeConceptMapConceptMapGroupUnmappedComponentElements(element); 33764 composeElementClose(element); 33765 xml.exit(FHIR_NS, name); 33766 } 33767 } 33768 33769 protected void composeConceptMapConceptMapGroupUnmappedComponentElements( 33770 ConceptMap.ConceptMapGroupUnmappedComponent element) throws IOException { 33771 composeBackboneElementElements(element); 33772 if (element.hasModeElement()) 33773 composeEnumeration("mode", element.getModeElement(), new ConceptMap.ConceptMapGroupUnmappedModeEnumFactory()); 33774 if (element.hasCodeElement()) { 33775 composeCode("code", element.getCodeElement()); 33776 } 33777 if (element.hasDisplayElement()) { 33778 composeString("display", element.getDisplayElement()); 33779 } 33780 if (element.hasUrlElement()) { 33781 composeCanonical("url", element.getUrlElement()); 33782 } 33783 } 33784 33785 protected void composeCondition(String name, Condition element) throws IOException { 33786 if (element != null) { 33787 composeDomainResourceAttributes(element); 33788 xml.enter(FHIR_NS, name); 33789 composeConditionElements(element); 33790 composeElementClose(element); 33791 xml.exit(FHIR_NS, name); 33792 } 33793 } 33794 33795 protected void composeConditionElements(Condition element) throws IOException { 33796 composeDomainResourceElements(element); 33797 if (element.hasIdentifier()) { 33798 for (Identifier e : element.getIdentifier()) 33799 composeIdentifier("identifier", e); 33800 } 33801 if (element.hasClinicalStatus()) { 33802 composeCodeableConcept("clinicalStatus", element.getClinicalStatus()); 33803 } 33804 if (element.hasVerificationStatus()) { 33805 composeCodeableConcept("verificationStatus", element.getVerificationStatus()); 33806 } 33807 if (element.hasCategory()) { 33808 for (CodeableConcept e : element.getCategory()) 33809 composeCodeableConcept("category", e); 33810 } 33811 if (element.hasSeverity()) { 33812 composeCodeableConcept("severity", element.getSeverity()); 33813 } 33814 if (element.hasCode()) { 33815 composeCodeableConcept("code", element.getCode()); 33816 } 33817 if (element.hasBodySite()) { 33818 for (CodeableConcept e : element.getBodySite()) 33819 composeCodeableConcept("bodySite", e); 33820 } 33821 if (element.hasSubject()) { 33822 composeReference("subject", element.getSubject()); 33823 } 33824 if (element.hasEncounter()) { 33825 composeReference("encounter", element.getEncounter()); 33826 } 33827 if (element.hasOnset()) { 33828 composeType("onset", element.getOnset()); 33829 } 33830 if (element.hasAbatement()) { 33831 composeType("abatement", element.getAbatement()); 33832 } 33833 if (element.hasRecordedDateElement()) { 33834 composeDateTime("recordedDate", element.getRecordedDateElement()); 33835 } 33836 if (element.hasRecorder()) { 33837 composeReference("recorder", element.getRecorder()); 33838 } 33839 if (element.hasAsserter()) { 33840 composeReference("asserter", element.getAsserter()); 33841 } 33842 if (element.hasStage()) { 33843 for (Condition.ConditionStageComponent e : element.getStage()) 33844 composeConditionConditionStageComponent("stage", e); 33845 } 33846 if (element.hasEvidence()) { 33847 for (Condition.ConditionEvidenceComponent e : element.getEvidence()) 33848 composeConditionConditionEvidenceComponent("evidence", e); 33849 } 33850 if (element.hasNote()) { 33851 for (Annotation e : element.getNote()) 33852 composeAnnotation("note", e); 33853 } 33854 } 33855 33856 protected void composeConditionConditionStageComponent(String name, Condition.ConditionStageComponent element) 33857 throws IOException { 33858 if (element != null) { 33859 composeElementAttributes(element); 33860 xml.enter(FHIR_NS, name); 33861 composeConditionConditionStageComponentElements(element); 33862 composeElementClose(element); 33863 xml.exit(FHIR_NS, name); 33864 } 33865 } 33866 33867 protected void composeConditionConditionStageComponentElements(Condition.ConditionStageComponent element) 33868 throws IOException { 33869 composeBackboneElementElements(element); 33870 if (element.hasSummary()) { 33871 composeCodeableConcept("summary", element.getSummary()); 33872 } 33873 if (element.hasAssessment()) { 33874 for (Reference e : element.getAssessment()) 33875 composeReference("assessment", e); 33876 } 33877 if (element.hasType()) { 33878 composeCodeableConcept("type", element.getType()); 33879 } 33880 } 33881 33882 protected void composeConditionConditionEvidenceComponent(String name, Condition.ConditionEvidenceComponent element) 33883 throws IOException { 33884 if (element != null) { 33885 composeElementAttributes(element); 33886 xml.enter(FHIR_NS, name); 33887 composeConditionConditionEvidenceComponentElements(element); 33888 composeElementClose(element); 33889 xml.exit(FHIR_NS, name); 33890 } 33891 } 33892 33893 protected void composeConditionConditionEvidenceComponentElements(Condition.ConditionEvidenceComponent element) 33894 throws IOException { 33895 composeBackboneElementElements(element); 33896 if (element.hasCode()) { 33897 for (CodeableConcept e : element.getCode()) 33898 composeCodeableConcept("code", e); 33899 } 33900 if (element.hasDetail()) { 33901 for (Reference e : element.getDetail()) 33902 composeReference("detail", e); 33903 } 33904 } 33905 33906 protected void composeConsent(String name, Consent element) throws IOException { 33907 if (element != null) { 33908 composeDomainResourceAttributes(element); 33909 xml.enter(FHIR_NS, name); 33910 composeConsentElements(element); 33911 composeElementClose(element); 33912 xml.exit(FHIR_NS, name); 33913 } 33914 } 33915 33916 protected void composeConsentElements(Consent element) throws IOException { 33917 composeDomainResourceElements(element); 33918 if (element.hasIdentifier()) { 33919 for (Identifier e : element.getIdentifier()) 33920 composeIdentifier("identifier", e); 33921 } 33922 if (element.hasStatusElement()) 33923 composeEnumeration("status", element.getStatusElement(), new Consent.ConsentStateEnumFactory()); 33924 if (element.hasScope()) { 33925 composeCodeableConcept("scope", element.getScope()); 33926 } 33927 if (element.hasCategory()) { 33928 for (CodeableConcept e : element.getCategory()) 33929 composeCodeableConcept("category", e); 33930 } 33931 if (element.hasPatient()) { 33932 composeReference("patient", element.getPatient()); 33933 } 33934 if (element.hasDateTimeElement()) { 33935 composeDateTime("dateTime", element.getDateTimeElement()); 33936 } 33937 if (element.hasPerformer()) { 33938 for (Reference e : element.getPerformer()) 33939 composeReference("performer", e); 33940 } 33941 if (element.hasOrganization()) { 33942 for (Reference e : element.getOrganization()) 33943 composeReference("organization", e); 33944 } 33945 if (element.hasSource()) { 33946 composeType("source", element.getSource()); 33947 } 33948 if (element.hasPolicy()) { 33949 for (Consent.ConsentPolicyComponent e : element.getPolicy()) 33950 composeConsentConsentPolicyComponent("policy", e); 33951 } 33952 if (element.hasPolicyRule()) { 33953 composeCodeableConcept("policyRule", element.getPolicyRule()); 33954 } 33955 if (element.hasVerification()) { 33956 for (Consent.ConsentVerificationComponent e : element.getVerification()) 33957 composeConsentConsentVerificationComponent("verification", e); 33958 } 33959 if (element.hasProvision()) { 33960 composeConsentprovisionComponent("provision", element.getProvision()); 33961 } 33962 } 33963 33964 protected void composeConsentConsentPolicyComponent(String name, Consent.ConsentPolicyComponent element) 33965 throws IOException { 33966 if (element != null) { 33967 composeElementAttributes(element); 33968 xml.enter(FHIR_NS, name); 33969 composeConsentConsentPolicyComponentElements(element); 33970 composeElementClose(element); 33971 xml.exit(FHIR_NS, name); 33972 } 33973 } 33974 33975 protected void composeConsentConsentPolicyComponentElements(Consent.ConsentPolicyComponent element) 33976 throws IOException { 33977 composeBackboneElementElements(element); 33978 if (element.hasAuthorityElement()) { 33979 composeUri("authority", element.getAuthorityElement()); 33980 } 33981 if (element.hasUriElement()) { 33982 composeUri("uri", element.getUriElement()); 33983 } 33984 } 33985 33986 protected void composeConsentConsentVerificationComponent(String name, Consent.ConsentVerificationComponent element) 33987 throws IOException { 33988 if (element != null) { 33989 composeElementAttributes(element); 33990 xml.enter(FHIR_NS, name); 33991 composeConsentConsentVerificationComponentElements(element); 33992 composeElementClose(element); 33993 xml.exit(FHIR_NS, name); 33994 } 33995 } 33996 33997 protected void composeConsentConsentVerificationComponentElements(Consent.ConsentVerificationComponent element) 33998 throws IOException { 33999 composeBackboneElementElements(element); 34000 if (element.hasVerifiedElement()) { 34001 composeBoolean("verified", element.getVerifiedElement()); 34002 } 34003 if (element.hasVerifiedWith()) { 34004 composeReference("verifiedWith", element.getVerifiedWith()); 34005 } 34006 if (element.hasVerificationDateElement()) { 34007 composeDateTime("verificationDate", element.getVerificationDateElement()); 34008 } 34009 } 34010 34011 protected void composeConsentprovisionComponent(String name, Consent.ProvisionComponent element) throws IOException { 34012 if (element != null) { 34013 composeElementAttributes(element); 34014 xml.enter(FHIR_NS, name); 34015 composeConsentprovisionComponentElements(element); 34016 composeElementClose(element); 34017 xml.exit(FHIR_NS, name); 34018 } 34019 } 34020 34021 protected void composeConsentprovisionComponentElements(Consent.ProvisionComponent element) throws IOException { 34022 composeBackboneElementElements(element); 34023 if (element.hasTypeElement()) 34024 composeEnumeration("type", element.getTypeElement(), new Consent.ConsentProvisionTypeEnumFactory()); 34025 if (element.hasPeriod()) { 34026 composePeriod("period", element.getPeriod()); 34027 } 34028 if (element.hasActor()) { 34029 for (Consent.provisionActorComponent e : element.getActor()) 34030 composeConsentprovisionActorComponent("actor", e); 34031 } 34032 if (element.hasAction()) { 34033 for (CodeableConcept e : element.getAction()) 34034 composeCodeableConcept("action", e); 34035 } 34036 if (element.hasSecurityLabel()) { 34037 for (Coding e : element.getSecurityLabel()) 34038 composeCoding("securityLabel", e); 34039 } 34040 if (element.hasPurpose()) { 34041 for (Coding e : element.getPurpose()) 34042 composeCoding("purpose", e); 34043 } 34044 if (element.hasClass_()) { 34045 for (Coding e : element.getClass_()) 34046 composeCoding("class", e); 34047 } 34048 if (element.hasCode()) { 34049 for (CodeableConcept e : element.getCode()) 34050 composeCodeableConcept("code", e); 34051 } 34052 if (element.hasDataPeriod()) { 34053 composePeriod("dataPeriod", element.getDataPeriod()); 34054 } 34055 if (element.hasData()) { 34056 for (Consent.provisionDataComponent e : element.getData()) 34057 composeConsentprovisionDataComponent("data", e); 34058 } 34059 if (element.hasProvision()) { 34060 for (Consent.ProvisionComponent e : element.getProvision()) 34061 composeConsentprovisionComponent("provision", e); 34062 } 34063 } 34064 34065 protected void composeConsentprovisionActorComponent(String name, Consent.provisionActorComponent element) 34066 throws IOException { 34067 if (element != null) { 34068 composeElementAttributes(element); 34069 xml.enter(FHIR_NS, name); 34070 composeConsentprovisionActorComponentElements(element); 34071 composeElementClose(element); 34072 xml.exit(FHIR_NS, name); 34073 } 34074 } 34075 34076 protected void composeConsentprovisionActorComponentElements(Consent.provisionActorComponent element) 34077 throws IOException { 34078 composeBackboneElementElements(element); 34079 if (element.hasRole()) { 34080 composeCodeableConcept("role", element.getRole()); 34081 } 34082 if (element.hasReference()) { 34083 composeReference("reference", element.getReference()); 34084 } 34085 } 34086 34087 protected void composeConsentprovisionDataComponent(String name, Consent.provisionDataComponent element) 34088 throws IOException { 34089 if (element != null) { 34090 composeElementAttributes(element); 34091 xml.enter(FHIR_NS, name); 34092 composeConsentprovisionDataComponentElements(element); 34093 composeElementClose(element); 34094 xml.exit(FHIR_NS, name); 34095 } 34096 } 34097 34098 protected void composeConsentprovisionDataComponentElements(Consent.provisionDataComponent element) 34099 throws IOException { 34100 composeBackboneElementElements(element); 34101 if (element.hasMeaningElement()) 34102 composeEnumeration("meaning", element.getMeaningElement(), new Consent.ConsentDataMeaningEnumFactory()); 34103 if (element.hasReference()) { 34104 composeReference("reference", element.getReference()); 34105 } 34106 } 34107 34108 protected void composeContract(String name, Contract element) throws IOException { 34109 if (element != null) { 34110 composeDomainResourceAttributes(element); 34111 xml.enter(FHIR_NS, name); 34112 composeContractElements(element); 34113 composeElementClose(element); 34114 xml.exit(FHIR_NS, name); 34115 } 34116 } 34117 34118 protected void composeContractElements(Contract element) throws IOException { 34119 composeDomainResourceElements(element); 34120 if (element.hasIdentifier()) { 34121 for (Identifier e : element.getIdentifier()) 34122 composeIdentifier("identifier", e); 34123 } 34124 if (element.hasUrlElement()) { 34125 composeUri("url", element.getUrlElement()); 34126 } 34127 if (element.hasVersionElement()) { 34128 composeString("version", element.getVersionElement()); 34129 } 34130 if (element.hasStatusElement()) 34131 composeEnumeration("status", element.getStatusElement(), new Contract.ContractStatusEnumFactory()); 34132 if (element.hasLegalState()) { 34133 composeCodeableConcept("legalState", element.getLegalState()); 34134 } 34135 if (element.hasInstantiatesCanonical()) { 34136 composeReference("instantiatesCanonical", element.getInstantiatesCanonical()); 34137 } 34138 if (element.hasInstantiatesUriElement()) { 34139 composeUri("instantiatesUri", element.getInstantiatesUriElement()); 34140 } 34141 if (element.hasContentDerivative()) { 34142 composeCodeableConcept("contentDerivative", element.getContentDerivative()); 34143 } 34144 if (element.hasIssuedElement()) { 34145 composeDateTime("issued", element.getIssuedElement()); 34146 } 34147 if (element.hasApplies()) { 34148 composePeriod("applies", element.getApplies()); 34149 } 34150 if (element.hasExpirationType()) { 34151 composeCodeableConcept("expirationType", element.getExpirationType()); 34152 } 34153 if (element.hasSubject()) { 34154 for (Reference e : element.getSubject()) 34155 composeReference("subject", e); 34156 } 34157 if (element.hasAuthority()) { 34158 for (Reference e : element.getAuthority()) 34159 composeReference("authority", e); 34160 } 34161 if (element.hasDomain()) { 34162 for (Reference e : element.getDomain()) 34163 composeReference("domain", e); 34164 } 34165 if (element.hasSite()) { 34166 for (Reference e : element.getSite()) 34167 composeReference("site", e); 34168 } 34169 if (element.hasNameElement()) { 34170 composeString("name", element.getNameElement()); 34171 } 34172 if (element.hasTitleElement()) { 34173 composeString("title", element.getTitleElement()); 34174 } 34175 if (element.hasSubtitleElement()) { 34176 composeString("subtitle", element.getSubtitleElement()); 34177 } 34178 if (element.hasAlias()) { 34179 for (StringType e : element.getAlias()) 34180 composeString("alias", e); 34181 } 34182 if (element.hasAuthor()) { 34183 composeReference("author", element.getAuthor()); 34184 } 34185 if (element.hasScope()) { 34186 composeCodeableConcept("scope", element.getScope()); 34187 } 34188 if (element.hasTopic()) { 34189 composeType("topic", element.getTopic()); 34190 } 34191 if (element.hasType()) { 34192 composeCodeableConcept("type", element.getType()); 34193 } 34194 if (element.hasSubType()) { 34195 for (CodeableConcept e : element.getSubType()) 34196 composeCodeableConcept("subType", e); 34197 } 34198 if (element.hasContentDefinition()) { 34199 composeContractContentDefinitionComponent("contentDefinition", element.getContentDefinition()); 34200 } 34201 if (element.hasTerm()) { 34202 for (Contract.TermComponent e : element.getTerm()) 34203 composeContractTermComponent("term", e); 34204 } 34205 if (element.hasSupportingInfo()) { 34206 for (Reference e : element.getSupportingInfo()) 34207 composeReference("supportingInfo", e); 34208 } 34209 if (element.hasRelevantHistory()) { 34210 for (Reference e : element.getRelevantHistory()) 34211 composeReference("relevantHistory", e); 34212 } 34213 if (element.hasSigner()) { 34214 for (Contract.SignatoryComponent e : element.getSigner()) 34215 composeContractSignatoryComponent("signer", e); 34216 } 34217 if (element.hasFriendly()) { 34218 for (Contract.FriendlyLanguageComponent e : element.getFriendly()) 34219 composeContractFriendlyLanguageComponent("friendly", e); 34220 } 34221 if (element.hasLegal()) { 34222 for (Contract.LegalLanguageComponent e : element.getLegal()) 34223 composeContractLegalLanguageComponent("legal", e); 34224 } 34225 if (element.hasRule()) { 34226 for (Contract.ComputableLanguageComponent e : element.getRule()) 34227 composeContractComputableLanguageComponent("rule", e); 34228 } 34229 if (element.hasLegallyBinding()) { 34230 composeType("legallyBinding", element.getLegallyBinding()); 34231 } 34232 } 34233 34234 protected void composeContractContentDefinitionComponent(String name, Contract.ContentDefinitionComponent element) 34235 throws IOException { 34236 if (element != null) { 34237 composeElementAttributes(element); 34238 xml.enter(FHIR_NS, name); 34239 composeContractContentDefinitionComponentElements(element); 34240 composeElementClose(element); 34241 xml.exit(FHIR_NS, name); 34242 } 34243 } 34244 34245 protected void composeContractContentDefinitionComponentElements(Contract.ContentDefinitionComponent element) 34246 throws IOException { 34247 composeBackboneElementElements(element); 34248 if (element.hasType()) { 34249 composeCodeableConcept("type", element.getType()); 34250 } 34251 if (element.hasSubType()) { 34252 composeCodeableConcept("subType", element.getSubType()); 34253 } 34254 if (element.hasPublisher()) { 34255 composeReference("publisher", element.getPublisher()); 34256 } 34257 if (element.hasPublicationDateElement()) { 34258 composeDateTime("publicationDate", element.getPublicationDateElement()); 34259 } 34260 if (element.hasPublicationStatusElement()) 34261 composeEnumeration("publicationStatus", element.getPublicationStatusElement(), 34262 new Contract.ContractPublicationStatusEnumFactory()); 34263 if (element.hasCopyrightElement()) { 34264 composeMarkdown("copyright", element.getCopyrightElement()); 34265 } 34266 } 34267 34268 protected void composeContractTermComponent(String name, Contract.TermComponent element) throws IOException { 34269 if (element != null) { 34270 composeElementAttributes(element); 34271 xml.enter(FHIR_NS, name); 34272 composeContractTermComponentElements(element); 34273 composeElementClose(element); 34274 xml.exit(FHIR_NS, name); 34275 } 34276 } 34277 34278 protected void composeContractTermComponentElements(Contract.TermComponent element) throws IOException { 34279 composeBackboneElementElements(element); 34280 if (element.hasIdentifier()) { 34281 composeIdentifier("identifier", element.getIdentifier()); 34282 } 34283 if (element.hasIssuedElement()) { 34284 composeDateTime("issued", element.getIssuedElement()); 34285 } 34286 if (element.hasApplies()) { 34287 composePeriod("applies", element.getApplies()); 34288 } 34289 if (element.hasTopic()) { 34290 composeType("topic", element.getTopic()); 34291 } 34292 if (element.hasType()) { 34293 composeCodeableConcept("type", element.getType()); 34294 } 34295 if (element.hasSubType()) { 34296 composeCodeableConcept("subType", element.getSubType()); 34297 } 34298 if (element.hasTextElement()) { 34299 composeString("text", element.getTextElement()); 34300 } 34301 if (element.hasSecurityLabel()) { 34302 for (Contract.SecurityLabelComponent e : element.getSecurityLabel()) 34303 composeContractSecurityLabelComponent("securityLabel", e); 34304 } 34305 if (element.hasOffer()) { 34306 composeContractContractOfferComponent("offer", element.getOffer()); 34307 } 34308 if (element.hasAsset()) { 34309 for (Contract.ContractAssetComponent e : element.getAsset()) 34310 composeContractContractAssetComponent("asset", e); 34311 } 34312 if (element.hasAction()) { 34313 for (Contract.ActionComponent e : element.getAction()) 34314 composeContractActionComponent("action", e); 34315 } 34316 if (element.hasGroup()) { 34317 for (Contract.TermComponent e : element.getGroup()) 34318 composeContractTermComponent("group", e); 34319 } 34320 } 34321 34322 protected void composeContractSecurityLabelComponent(String name, Contract.SecurityLabelComponent element) 34323 throws IOException { 34324 if (element != null) { 34325 composeElementAttributes(element); 34326 xml.enter(FHIR_NS, name); 34327 composeContractSecurityLabelComponentElements(element); 34328 composeElementClose(element); 34329 xml.exit(FHIR_NS, name); 34330 } 34331 } 34332 34333 protected void composeContractSecurityLabelComponentElements(Contract.SecurityLabelComponent element) 34334 throws IOException { 34335 composeBackboneElementElements(element); 34336 if (element.hasNumber()) { 34337 for (UnsignedIntType e : element.getNumber()) 34338 composeUnsignedInt("number", e); 34339 } 34340 if (element.hasClassification()) { 34341 composeCoding("classification", element.getClassification()); 34342 } 34343 if (element.hasCategory()) { 34344 for (Coding e : element.getCategory()) 34345 composeCoding("category", e); 34346 } 34347 if (element.hasControl()) { 34348 for (Coding e : element.getControl()) 34349 composeCoding("control", e); 34350 } 34351 } 34352 34353 protected void composeContractContractOfferComponent(String name, Contract.ContractOfferComponent element) 34354 throws IOException { 34355 if (element != null) { 34356 composeElementAttributes(element); 34357 xml.enter(FHIR_NS, name); 34358 composeContractContractOfferComponentElements(element); 34359 composeElementClose(element); 34360 xml.exit(FHIR_NS, name); 34361 } 34362 } 34363 34364 protected void composeContractContractOfferComponentElements(Contract.ContractOfferComponent element) 34365 throws IOException { 34366 composeBackboneElementElements(element); 34367 if (element.hasIdentifier()) { 34368 for (Identifier e : element.getIdentifier()) 34369 composeIdentifier("identifier", e); 34370 } 34371 if (element.hasParty()) { 34372 for (Contract.ContractPartyComponent e : element.getParty()) 34373 composeContractContractPartyComponent("party", e); 34374 } 34375 if (element.hasTopic()) { 34376 composeReference("topic", element.getTopic()); 34377 } 34378 if (element.hasType()) { 34379 composeCodeableConcept("type", element.getType()); 34380 } 34381 if (element.hasDecision()) { 34382 composeCodeableConcept("decision", element.getDecision()); 34383 } 34384 if (element.hasDecisionMode()) { 34385 for (CodeableConcept e : element.getDecisionMode()) 34386 composeCodeableConcept("decisionMode", e); 34387 } 34388 if (element.hasAnswer()) { 34389 for (Contract.AnswerComponent e : element.getAnswer()) 34390 composeContractAnswerComponent("answer", e); 34391 } 34392 if (element.hasTextElement()) { 34393 composeString("text", element.getTextElement()); 34394 } 34395 if (element.hasLinkId()) { 34396 for (StringType e : element.getLinkId()) 34397 composeString("linkId", e); 34398 } 34399 if (element.hasSecurityLabelNumber()) { 34400 for (UnsignedIntType e : element.getSecurityLabelNumber()) 34401 composeUnsignedInt("securityLabelNumber", e); 34402 } 34403 } 34404 34405 protected void composeContractContractPartyComponent(String name, Contract.ContractPartyComponent element) 34406 throws IOException { 34407 if (element != null) { 34408 composeElementAttributes(element); 34409 xml.enter(FHIR_NS, name); 34410 composeContractContractPartyComponentElements(element); 34411 composeElementClose(element); 34412 xml.exit(FHIR_NS, name); 34413 } 34414 } 34415 34416 protected void composeContractContractPartyComponentElements(Contract.ContractPartyComponent element) 34417 throws IOException { 34418 composeBackboneElementElements(element); 34419 if (element.hasReference()) { 34420 for (Reference e : element.getReference()) 34421 composeReference("reference", e); 34422 } 34423 if (element.hasRole()) { 34424 composeCodeableConcept("role", element.getRole()); 34425 } 34426 } 34427 34428 protected void composeContractAnswerComponent(String name, Contract.AnswerComponent element) throws IOException { 34429 if (element != null) { 34430 composeElementAttributes(element); 34431 xml.enter(FHIR_NS, name); 34432 composeContractAnswerComponentElements(element); 34433 composeElementClose(element); 34434 xml.exit(FHIR_NS, name); 34435 } 34436 } 34437 34438 protected void composeContractAnswerComponentElements(Contract.AnswerComponent element) throws IOException { 34439 composeBackboneElementElements(element); 34440 if (element.hasValue()) { 34441 composeType("value", element.getValue()); 34442 } 34443 } 34444 34445 protected void composeContractContractAssetComponent(String name, Contract.ContractAssetComponent element) 34446 throws IOException { 34447 if (element != null) { 34448 composeElementAttributes(element); 34449 xml.enter(FHIR_NS, name); 34450 composeContractContractAssetComponentElements(element); 34451 composeElementClose(element); 34452 xml.exit(FHIR_NS, name); 34453 } 34454 } 34455 34456 protected void composeContractContractAssetComponentElements(Contract.ContractAssetComponent element) 34457 throws IOException { 34458 composeBackboneElementElements(element); 34459 if (element.hasScope()) { 34460 composeCodeableConcept("scope", element.getScope()); 34461 } 34462 if (element.hasType()) { 34463 for (CodeableConcept e : element.getType()) 34464 composeCodeableConcept("type", e); 34465 } 34466 if (element.hasTypeReference()) { 34467 for (Reference e : element.getTypeReference()) 34468 composeReference("typeReference", e); 34469 } 34470 if (element.hasSubtype()) { 34471 for (CodeableConcept e : element.getSubtype()) 34472 composeCodeableConcept("subtype", e); 34473 } 34474 if (element.hasRelationship()) { 34475 composeCoding("relationship", element.getRelationship()); 34476 } 34477 if (element.hasContext()) { 34478 for (Contract.AssetContextComponent e : element.getContext()) 34479 composeContractAssetContextComponent("context", e); 34480 } 34481 if (element.hasConditionElement()) { 34482 composeString("condition", element.getConditionElement()); 34483 } 34484 if (element.hasPeriodType()) { 34485 for (CodeableConcept e : element.getPeriodType()) 34486 composeCodeableConcept("periodType", e); 34487 } 34488 if (element.hasPeriod()) { 34489 for (Period e : element.getPeriod()) 34490 composePeriod("period", e); 34491 } 34492 if (element.hasUsePeriod()) { 34493 for (Period e : element.getUsePeriod()) 34494 composePeriod("usePeriod", e); 34495 } 34496 if (element.hasTextElement()) { 34497 composeString("text", element.getTextElement()); 34498 } 34499 if (element.hasLinkId()) { 34500 for (StringType e : element.getLinkId()) 34501 composeString("linkId", e); 34502 } 34503 if (element.hasAnswer()) { 34504 for (Contract.AnswerComponent e : element.getAnswer()) 34505 composeContractAnswerComponent("answer", e); 34506 } 34507 if (element.hasSecurityLabelNumber()) { 34508 for (UnsignedIntType e : element.getSecurityLabelNumber()) 34509 composeUnsignedInt("securityLabelNumber", e); 34510 } 34511 if (element.hasValuedItem()) { 34512 for (Contract.ValuedItemComponent e : element.getValuedItem()) 34513 composeContractValuedItemComponent("valuedItem", e); 34514 } 34515 } 34516 34517 protected void composeContractAssetContextComponent(String name, Contract.AssetContextComponent element) 34518 throws IOException { 34519 if (element != null) { 34520 composeElementAttributes(element); 34521 xml.enter(FHIR_NS, name); 34522 composeContractAssetContextComponentElements(element); 34523 composeElementClose(element); 34524 xml.exit(FHIR_NS, name); 34525 } 34526 } 34527 34528 protected void composeContractAssetContextComponentElements(Contract.AssetContextComponent element) 34529 throws IOException { 34530 composeBackboneElementElements(element); 34531 if (element.hasReference()) { 34532 composeReference("reference", element.getReference()); 34533 } 34534 if (element.hasCode()) { 34535 for (CodeableConcept e : element.getCode()) 34536 composeCodeableConcept("code", e); 34537 } 34538 if (element.hasTextElement()) { 34539 composeString("text", element.getTextElement()); 34540 } 34541 } 34542 34543 protected void composeContractValuedItemComponent(String name, Contract.ValuedItemComponent element) 34544 throws IOException { 34545 if (element != null) { 34546 composeElementAttributes(element); 34547 xml.enter(FHIR_NS, name); 34548 composeContractValuedItemComponentElements(element); 34549 composeElementClose(element); 34550 xml.exit(FHIR_NS, name); 34551 } 34552 } 34553 34554 protected void composeContractValuedItemComponentElements(Contract.ValuedItemComponent element) throws IOException { 34555 composeBackboneElementElements(element); 34556 if (element.hasEntity()) { 34557 composeType("entity", element.getEntity()); 34558 } 34559 if (element.hasIdentifier()) { 34560 composeIdentifier("identifier", element.getIdentifier()); 34561 } 34562 if (element.hasEffectiveTimeElement()) { 34563 composeDateTime("effectiveTime", element.getEffectiveTimeElement()); 34564 } 34565 if (element.hasQuantity()) { 34566 composeQuantity("quantity", element.getQuantity()); 34567 } 34568 if (element.hasUnitPrice()) { 34569 composeMoney("unitPrice", element.getUnitPrice()); 34570 } 34571 if (element.hasFactorElement()) { 34572 composeDecimal("factor", element.getFactorElement()); 34573 } 34574 if (element.hasPointsElement()) { 34575 composeDecimal("points", element.getPointsElement()); 34576 } 34577 if (element.hasNet()) { 34578 composeMoney("net", element.getNet()); 34579 } 34580 if (element.hasPaymentElement()) { 34581 composeString("payment", element.getPaymentElement()); 34582 } 34583 if (element.hasPaymentDateElement()) { 34584 composeDateTime("paymentDate", element.getPaymentDateElement()); 34585 } 34586 if (element.hasResponsible()) { 34587 composeReference("responsible", element.getResponsible()); 34588 } 34589 if (element.hasRecipient()) { 34590 composeReference("recipient", element.getRecipient()); 34591 } 34592 if (element.hasLinkId()) { 34593 for (StringType e : element.getLinkId()) 34594 composeString("linkId", e); 34595 } 34596 if (element.hasSecurityLabelNumber()) { 34597 for (UnsignedIntType e : element.getSecurityLabelNumber()) 34598 composeUnsignedInt("securityLabelNumber", e); 34599 } 34600 } 34601 34602 protected void composeContractActionComponent(String name, Contract.ActionComponent element) throws IOException { 34603 if (element != null) { 34604 composeElementAttributes(element); 34605 xml.enter(FHIR_NS, name); 34606 composeContractActionComponentElements(element); 34607 composeElementClose(element); 34608 xml.exit(FHIR_NS, name); 34609 } 34610 } 34611 34612 protected void composeContractActionComponentElements(Contract.ActionComponent element) throws IOException { 34613 composeBackboneElementElements(element); 34614 if (element.hasDoNotPerformElement()) { 34615 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 34616 } 34617 if (element.hasType()) { 34618 composeCodeableConcept("type", element.getType()); 34619 } 34620 if (element.hasSubject()) { 34621 for (Contract.ActionSubjectComponent e : element.getSubject()) 34622 composeContractActionSubjectComponent("subject", e); 34623 } 34624 if (element.hasIntent()) { 34625 composeCodeableConcept("intent", element.getIntent()); 34626 } 34627 if (element.hasLinkId()) { 34628 for (StringType e : element.getLinkId()) 34629 composeString("linkId", e); 34630 } 34631 if (element.hasStatus()) { 34632 composeCodeableConcept("status", element.getStatus()); 34633 } 34634 if (element.hasContext()) { 34635 composeReference("context", element.getContext()); 34636 } 34637 if (element.hasContextLinkId()) { 34638 for (StringType e : element.getContextLinkId()) 34639 composeString("contextLinkId", e); 34640 } 34641 if (element.hasOccurrence()) { 34642 composeType("occurrence", element.getOccurrence()); 34643 } 34644 if (element.hasRequester()) { 34645 for (Reference e : element.getRequester()) 34646 composeReference("requester", e); 34647 } 34648 if (element.hasRequesterLinkId()) { 34649 for (StringType e : element.getRequesterLinkId()) 34650 composeString("requesterLinkId", e); 34651 } 34652 if (element.hasPerformerType()) { 34653 for (CodeableConcept e : element.getPerformerType()) 34654 composeCodeableConcept("performerType", e); 34655 } 34656 if (element.hasPerformerRole()) { 34657 composeCodeableConcept("performerRole", element.getPerformerRole()); 34658 } 34659 if (element.hasPerformer()) { 34660 composeReference("performer", element.getPerformer()); 34661 } 34662 if (element.hasPerformerLinkId()) { 34663 for (StringType e : element.getPerformerLinkId()) 34664 composeString("performerLinkId", e); 34665 } 34666 if (element.hasReasonCode()) { 34667 for (CodeableConcept e : element.getReasonCode()) 34668 composeCodeableConcept("reasonCode", e); 34669 } 34670 if (element.hasReasonReference()) { 34671 for (Reference e : element.getReasonReference()) 34672 composeReference("reasonReference", e); 34673 } 34674 if (element.hasReason()) { 34675 for (StringType e : element.getReason()) 34676 composeString("reason", e); 34677 } 34678 if (element.hasReasonLinkId()) { 34679 for (StringType e : element.getReasonLinkId()) 34680 composeString("reasonLinkId", e); 34681 } 34682 if (element.hasNote()) { 34683 for (Annotation e : element.getNote()) 34684 composeAnnotation("note", e); 34685 } 34686 if (element.hasSecurityLabelNumber()) { 34687 for (UnsignedIntType e : element.getSecurityLabelNumber()) 34688 composeUnsignedInt("securityLabelNumber", e); 34689 } 34690 } 34691 34692 protected void composeContractActionSubjectComponent(String name, Contract.ActionSubjectComponent element) 34693 throws IOException { 34694 if (element != null) { 34695 composeElementAttributes(element); 34696 xml.enter(FHIR_NS, name); 34697 composeContractActionSubjectComponentElements(element); 34698 composeElementClose(element); 34699 xml.exit(FHIR_NS, name); 34700 } 34701 } 34702 34703 protected void composeContractActionSubjectComponentElements(Contract.ActionSubjectComponent element) 34704 throws IOException { 34705 composeBackboneElementElements(element); 34706 if (element.hasReference()) { 34707 for (Reference e : element.getReference()) 34708 composeReference("reference", e); 34709 } 34710 if (element.hasRole()) { 34711 composeCodeableConcept("role", element.getRole()); 34712 } 34713 } 34714 34715 protected void composeContractSignatoryComponent(String name, Contract.SignatoryComponent element) 34716 throws IOException { 34717 if (element != null) { 34718 composeElementAttributes(element); 34719 xml.enter(FHIR_NS, name); 34720 composeContractSignatoryComponentElements(element); 34721 composeElementClose(element); 34722 xml.exit(FHIR_NS, name); 34723 } 34724 } 34725 34726 protected void composeContractSignatoryComponentElements(Contract.SignatoryComponent element) throws IOException { 34727 composeBackboneElementElements(element); 34728 if (element.hasType()) { 34729 composeCoding("type", element.getType()); 34730 } 34731 if (element.hasParty()) { 34732 composeReference("party", element.getParty()); 34733 } 34734 if (element.hasSignature()) { 34735 for (Signature e : element.getSignature()) 34736 composeSignature("signature", e); 34737 } 34738 } 34739 34740 protected void composeContractFriendlyLanguageComponent(String name, Contract.FriendlyLanguageComponent element) 34741 throws IOException { 34742 if (element != null) { 34743 composeElementAttributes(element); 34744 xml.enter(FHIR_NS, name); 34745 composeContractFriendlyLanguageComponentElements(element); 34746 composeElementClose(element); 34747 xml.exit(FHIR_NS, name); 34748 } 34749 } 34750 34751 protected void composeContractFriendlyLanguageComponentElements(Contract.FriendlyLanguageComponent element) 34752 throws IOException { 34753 composeBackboneElementElements(element); 34754 if (element.hasContent()) { 34755 composeType("content", element.getContent()); 34756 } 34757 } 34758 34759 protected void composeContractLegalLanguageComponent(String name, Contract.LegalLanguageComponent element) 34760 throws IOException { 34761 if (element != null) { 34762 composeElementAttributes(element); 34763 xml.enter(FHIR_NS, name); 34764 composeContractLegalLanguageComponentElements(element); 34765 composeElementClose(element); 34766 xml.exit(FHIR_NS, name); 34767 } 34768 } 34769 34770 protected void composeContractLegalLanguageComponentElements(Contract.LegalLanguageComponent element) 34771 throws IOException { 34772 composeBackboneElementElements(element); 34773 if (element.hasContent()) { 34774 composeType("content", element.getContent()); 34775 } 34776 } 34777 34778 protected void composeContractComputableLanguageComponent(String name, Contract.ComputableLanguageComponent element) 34779 throws IOException { 34780 if (element != null) { 34781 composeElementAttributes(element); 34782 xml.enter(FHIR_NS, name); 34783 composeContractComputableLanguageComponentElements(element); 34784 composeElementClose(element); 34785 xml.exit(FHIR_NS, name); 34786 } 34787 } 34788 34789 protected void composeContractComputableLanguageComponentElements(Contract.ComputableLanguageComponent element) 34790 throws IOException { 34791 composeBackboneElementElements(element); 34792 if (element.hasContent()) { 34793 composeType("content", element.getContent()); 34794 } 34795 } 34796 34797 protected void composeCoverage(String name, Coverage element) throws IOException { 34798 if (element != null) { 34799 composeDomainResourceAttributes(element); 34800 xml.enter(FHIR_NS, name); 34801 composeCoverageElements(element); 34802 composeElementClose(element); 34803 xml.exit(FHIR_NS, name); 34804 } 34805 } 34806 34807 protected void composeCoverageElements(Coverage element) throws IOException { 34808 composeDomainResourceElements(element); 34809 if (element.hasIdentifier()) { 34810 for (Identifier e : element.getIdentifier()) 34811 composeIdentifier("identifier", e); 34812 } 34813 if (element.hasStatusElement()) 34814 composeEnumeration("status", element.getStatusElement(), new Coverage.CoverageStatusEnumFactory()); 34815 if (element.hasType()) { 34816 composeCodeableConcept("type", element.getType()); 34817 } 34818 if (element.hasPolicyHolder()) { 34819 composeReference("policyHolder", element.getPolicyHolder()); 34820 } 34821 if (element.hasSubscriber()) { 34822 composeReference("subscriber", element.getSubscriber()); 34823 } 34824 if (element.hasSubscriberIdElement()) { 34825 composeString("subscriberId", element.getSubscriberIdElement()); 34826 } 34827 if (element.hasBeneficiary()) { 34828 composeReference("beneficiary", element.getBeneficiary()); 34829 } 34830 if (element.hasDependentElement()) { 34831 composeString("dependent", element.getDependentElement()); 34832 } 34833 if (element.hasRelationship()) { 34834 composeCodeableConcept("relationship", element.getRelationship()); 34835 } 34836 if (element.hasPeriod()) { 34837 composePeriod("period", element.getPeriod()); 34838 } 34839 if (element.hasPayor()) { 34840 for (Reference e : element.getPayor()) 34841 composeReference("payor", e); 34842 } 34843 if (element.hasClass_()) { 34844 for (Coverage.ClassComponent e : element.getClass_()) 34845 composeCoverageClassComponent("class", e); 34846 } 34847 if (element.hasOrderElement()) { 34848 composePositiveInt("order", element.getOrderElement()); 34849 } 34850 if (element.hasNetworkElement()) { 34851 composeString("network", element.getNetworkElement()); 34852 } 34853 if (element.hasCostToBeneficiary()) { 34854 for (Coverage.CostToBeneficiaryComponent e : element.getCostToBeneficiary()) 34855 composeCoverageCostToBeneficiaryComponent("costToBeneficiary", e); 34856 } 34857 if (element.hasSubrogationElement()) { 34858 composeBoolean("subrogation", element.getSubrogationElement()); 34859 } 34860 if (element.hasContract()) { 34861 for (Reference e : element.getContract()) 34862 composeReference("contract", e); 34863 } 34864 } 34865 34866 protected void composeCoverageClassComponent(String name, Coverage.ClassComponent element) throws IOException { 34867 if (element != null) { 34868 composeElementAttributes(element); 34869 xml.enter(FHIR_NS, name); 34870 composeCoverageClassComponentElements(element); 34871 composeElementClose(element); 34872 xml.exit(FHIR_NS, name); 34873 } 34874 } 34875 34876 protected void composeCoverageClassComponentElements(Coverage.ClassComponent element) throws IOException { 34877 composeBackboneElementElements(element); 34878 if (element.hasType()) { 34879 composeCodeableConcept("type", element.getType()); 34880 } 34881 if (element.hasValueElement()) { 34882 composeString("value", element.getValueElement()); 34883 } 34884 if (element.hasNameElement()) { 34885 composeString("name", element.getNameElement()); 34886 } 34887 } 34888 34889 protected void composeCoverageCostToBeneficiaryComponent(String name, Coverage.CostToBeneficiaryComponent element) 34890 throws IOException { 34891 if (element != null) { 34892 composeElementAttributes(element); 34893 xml.enter(FHIR_NS, name); 34894 composeCoverageCostToBeneficiaryComponentElements(element); 34895 composeElementClose(element); 34896 xml.exit(FHIR_NS, name); 34897 } 34898 } 34899 34900 protected void composeCoverageCostToBeneficiaryComponentElements(Coverage.CostToBeneficiaryComponent element) 34901 throws IOException { 34902 composeBackboneElementElements(element); 34903 if (element.hasType()) { 34904 composeCodeableConcept("type", element.getType()); 34905 } 34906 if (element.hasValue()) { 34907 composeType("value", element.getValue()); 34908 } 34909 if (element.hasException()) { 34910 for (Coverage.ExemptionComponent e : element.getException()) 34911 composeCoverageExemptionComponent("exception", e); 34912 } 34913 } 34914 34915 protected void composeCoverageExemptionComponent(String name, Coverage.ExemptionComponent element) 34916 throws IOException { 34917 if (element != null) { 34918 composeElementAttributes(element); 34919 xml.enter(FHIR_NS, name); 34920 composeCoverageExemptionComponentElements(element); 34921 composeElementClose(element); 34922 xml.exit(FHIR_NS, name); 34923 } 34924 } 34925 34926 protected void composeCoverageExemptionComponentElements(Coverage.ExemptionComponent element) throws IOException { 34927 composeBackboneElementElements(element); 34928 if (element.hasType()) { 34929 composeCodeableConcept("type", element.getType()); 34930 } 34931 if (element.hasPeriod()) { 34932 composePeriod("period", element.getPeriod()); 34933 } 34934 } 34935 34936 protected void composeCoverageEligibilityRequest(String name, CoverageEligibilityRequest element) throws IOException { 34937 if (element != null) { 34938 composeDomainResourceAttributes(element); 34939 xml.enter(FHIR_NS, name); 34940 composeCoverageEligibilityRequestElements(element); 34941 composeElementClose(element); 34942 xml.exit(FHIR_NS, name); 34943 } 34944 } 34945 34946 protected void composeCoverageEligibilityRequestElements(CoverageEligibilityRequest element) throws IOException { 34947 composeDomainResourceElements(element); 34948 if (element.hasIdentifier()) { 34949 for (Identifier e : element.getIdentifier()) 34950 composeIdentifier("identifier", e); 34951 } 34952 if (element.hasStatusElement()) 34953 composeEnumeration("status", element.getStatusElement(), 34954 new CoverageEligibilityRequest.EligibilityRequestStatusEnumFactory()); 34955 if (element.hasPriority()) { 34956 composeCodeableConcept("priority", element.getPriority()); 34957 } 34958 if (element.hasPurpose()) 34959 for (Enumeration<CoverageEligibilityRequest.EligibilityRequestPurpose> e : element.getPurpose()) 34960 composeEnumeration("purpose", e, new CoverageEligibilityRequest.EligibilityRequestPurposeEnumFactory()); 34961 if (element.hasPatient()) { 34962 composeReference("patient", element.getPatient()); 34963 } 34964 if (element.hasServiced()) { 34965 composeType("serviced", element.getServiced()); 34966 } 34967 if (element.hasCreatedElement()) { 34968 composeDateTime("created", element.getCreatedElement()); 34969 } 34970 if (element.hasEnterer()) { 34971 composeReference("enterer", element.getEnterer()); 34972 } 34973 if (element.hasProvider()) { 34974 composeReference("provider", element.getProvider()); 34975 } 34976 if (element.hasInsurer()) { 34977 composeReference("insurer", element.getInsurer()); 34978 } 34979 if (element.hasFacility()) { 34980 composeReference("facility", element.getFacility()); 34981 } 34982 if (element.hasSupportingInfo()) { 34983 for (CoverageEligibilityRequest.SupportingInformationComponent e : element.getSupportingInfo()) 34984 composeCoverageEligibilityRequestSupportingInformationComponent("supportingInfo", e); 34985 } 34986 if (element.hasInsurance()) { 34987 for (CoverageEligibilityRequest.InsuranceComponent e : element.getInsurance()) 34988 composeCoverageEligibilityRequestInsuranceComponent("insurance", e); 34989 } 34990 if (element.hasItem()) { 34991 for (CoverageEligibilityRequest.DetailsComponent e : element.getItem()) 34992 composeCoverageEligibilityRequestDetailsComponent("item", e); 34993 } 34994 } 34995 34996 protected void composeCoverageEligibilityRequestSupportingInformationComponent(String name, 34997 CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException { 34998 if (element != null) { 34999 composeElementAttributes(element); 35000 xml.enter(FHIR_NS, name); 35001 composeCoverageEligibilityRequestSupportingInformationComponentElements(element); 35002 composeElementClose(element); 35003 xml.exit(FHIR_NS, name); 35004 } 35005 } 35006 35007 protected void composeCoverageEligibilityRequestSupportingInformationComponentElements( 35008 CoverageEligibilityRequest.SupportingInformationComponent element) throws IOException { 35009 composeBackboneElementElements(element); 35010 if (element.hasSequenceElement()) { 35011 composePositiveInt("sequence", element.getSequenceElement()); 35012 } 35013 if (element.hasInformation()) { 35014 composeReference("information", element.getInformation()); 35015 } 35016 if (element.hasAppliesToAllElement()) { 35017 composeBoolean("appliesToAll", element.getAppliesToAllElement()); 35018 } 35019 } 35020 35021 protected void composeCoverageEligibilityRequestInsuranceComponent(String name, 35022 CoverageEligibilityRequest.InsuranceComponent element) throws IOException { 35023 if (element != null) { 35024 composeElementAttributes(element); 35025 xml.enter(FHIR_NS, name); 35026 composeCoverageEligibilityRequestInsuranceComponentElements(element); 35027 composeElementClose(element); 35028 xml.exit(FHIR_NS, name); 35029 } 35030 } 35031 35032 protected void composeCoverageEligibilityRequestInsuranceComponentElements( 35033 CoverageEligibilityRequest.InsuranceComponent element) throws IOException { 35034 composeBackboneElementElements(element); 35035 if (element.hasFocalElement()) { 35036 composeBoolean("focal", element.getFocalElement()); 35037 } 35038 if (element.hasCoverage()) { 35039 composeReference("coverage", element.getCoverage()); 35040 } 35041 if (element.hasBusinessArrangementElement()) { 35042 composeString("businessArrangement", element.getBusinessArrangementElement()); 35043 } 35044 } 35045 35046 protected void composeCoverageEligibilityRequestDetailsComponent(String name, 35047 CoverageEligibilityRequest.DetailsComponent element) throws IOException { 35048 if (element != null) { 35049 composeElementAttributes(element); 35050 xml.enter(FHIR_NS, name); 35051 composeCoverageEligibilityRequestDetailsComponentElements(element); 35052 composeElementClose(element); 35053 xml.exit(FHIR_NS, name); 35054 } 35055 } 35056 35057 protected void composeCoverageEligibilityRequestDetailsComponentElements( 35058 CoverageEligibilityRequest.DetailsComponent element) throws IOException { 35059 composeBackboneElementElements(element); 35060 if (element.hasSupportingInfoSequence()) { 35061 for (PositiveIntType e : element.getSupportingInfoSequence()) 35062 composePositiveInt("supportingInfoSequence", e); 35063 } 35064 if (element.hasCategory()) { 35065 composeCodeableConcept("category", element.getCategory()); 35066 } 35067 if (element.hasProductOrService()) { 35068 composeCodeableConcept("productOrService", element.getProductOrService()); 35069 } 35070 if (element.hasModifier()) { 35071 for (CodeableConcept e : element.getModifier()) 35072 composeCodeableConcept("modifier", e); 35073 } 35074 if (element.hasProvider()) { 35075 composeReference("provider", element.getProvider()); 35076 } 35077 if (element.hasQuantity()) { 35078 composeQuantity("quantity", element.getQuantity()); 35079 } 35080 if (element.hasUnitPrice()) { 35081 composeMoney("unitPrice", element.getUnitPrice()); 35082 } 35083 if (element.hasFacility()) { 35084 composeReference("facility", element.getFacility()); 35085 } 35086 if (element.hasDiagnosis()) { 35087 for (CoverageEligibilityRequest.DiagnosisComponent e : element.getDiagnosis()) 35088 composeCoverageEligibilityRequestDiagnosisComponent("diagnosis", e); 35089 } 35090 if (element.hasDetail()) { 35091 for (Reference e : element.getDetail()) 35092 composeReference("detail", e); 35093 } 35094 } 35095 35096 protected void composeCoverageEligibilityRequestDiagnosisComponent(String name, 35097 CoverageEligibilityRequest.DiagnosisComponent element) throws IOException { 35098 if (element != null) { 35099 composeElementAttributes(element); 35100 xml.enter(FHIR_NS, name); 35101 composeCoverageEligibilityRequestDiagnosisComponentElements(element); 35102 composeElementClose(element); 35103 xml.exit(FHIR_NS, name); 35104 } 35105 } 35106 35107 protected void composeCoverageEligibilityRequestDiagnosisComponentElements( 35108 CoverageEligibilityRequest.DiagnosisComponent element) throws IOException { 35109 composeBackboneElementElements(element); 35110 if (element.hasDiagnosis()) { 35111 composeType("diagnosis", element.getDiagnosis()); 35112 } 35113 } 35114 35115 protected void composeCoverageEligibilityResponse(String name, CoverageEligibilityResponse element) 35116 throws IOException { 35117 if (element != null) { 35118 composeDomainResourceAttributes(element); 35119 xml.enter(FHIR_NS, name); 35120 composeCoverageEligibilityResponseElements(element); 35121 composeElementClose(element); 35122 xml.exit(FHIR_NS, name); 35123 } 35124 } 35125 35126 protected void composeCoverageEligibilityResponseElements(CoverageEligibilityResponse element) throws IOException { 35127 composeDomainResourceElements(element); 35128 if (element.hasIdentifier()) { 35129 for (Identifier e : element.getIdentifier()) 35130 composeIdentifier("identifier", e); 35131 } 35132 if (element.hasStatusElement()) 35133 composeEnumeration("status", element.getStatusElement(), 35134 new CoverageEligibilityResponse.EligibilityResponseStatusEnumFactory()); 35135 if (element.hasPurpose()) 35136 for (Enumeration<CoverageEligibilityResponse.EligibilityResponsePurpose> e : element.getPurpose()) 35137 composeEnumeration("purpose", e, new CoverageEligibilityResponse.EligibilityResponsePurposeEnumFactory()); 35138 if (element.hasPatient()) { 35139 composeReference("patient", element.getPatient()); 35140 } 35141 if (element.hasServiced()) { 35142 composeType("serviced", element.getServiced()); 35143 } 35144 if (element.hasCreatedElement()) { 35145 composeDateTime("created", element.getCreatedElement()); 35146 } 35147 if (element.hasRequestor()) { 35148 composeReference("requestor", element.getRequestor()); 35149 } 35150 if (element.hasRequest()) { 35151 composeReference("request", element.getRequest()); 35152 } 35153 if (element.hasOutcomeElement()) 35154 composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); 35155 if (element.hasDispositionElement()) { 35156 composeString("disposition", element.getDispositionElement()); 35157 } 35158 if (element.hasInsurer()) { 35159 composeReference("insurer", element.getInsurer()); 35160 } 35161 if (element.hasInsurance()) { 35162 for (CoverageEligibilityResponse.InsuranceComponent e : element.getInsurance()) 35163 composeCoverageEligibilityResponseInsuranceComponent("insurance", e); 35164 } 35165 if (element.hasPreAuthRefElement()) { 35166 composeString("preAuthRef", element.getPreAuthRefElement()); 35167 } 35168 if (element.hasForm()) { 35169 composeCodeableConcept("form", element.getForm()); 35170 } 35171 if (element.hasError()) { 35172 for (CoverageEligibilityResponse.ErrorsComponent e : element.getError()) 35173 composeCoverageEligibilityResponseErrorsComponent("error", e); 35174 } 35175 } 35176 35177 protected void composeCoverageEligibilityResponseInsuranceComponent(String name, 35178 CoverageEligibilityResponse.InsuranceComponent element) throws IOException { 35179 if (element != null) { 35180 composeElementAttributes(element); 35181 xml.enter(FHIR_NS, name); 35182 composeCoverageEligibilityResponseInsuranceComponentElements(element); 35183 composeElementClose(element); 35184 xml.exit(FHIR_NS, name); 35185 } 35186 } 35187 35188 protected void composeCoverageEligibilityResponseInsuranceComponentElements( 35189 CoverageEligibilityResponse.InsuranceComponent element) throws IOException { 35190 composeBackboneElementElements(element); 35191 if (element.hasCoverage()) { 35192 composeReference("coverage", element.getCoverage()); 35193 } 35194 if (element.hasInforceElement()) { 35195 composeBoolean("inforce", element.getInforceElement()); 35196 } 35197 if (element.hasBenefitPeriod()) { 35198 composePeriod("benefitPeriod", element.getBenefitPeriod()); 35199 } 35200 if (element.hasItem()) { 35201 for (CoverageEligibilityResponse.ItemsComponent e : element.getItem()) 35202 composeCoverageEligibilityResponseItemsComponent("item", e); 35203 } 35204 } 35205 35206 protected void composeCoverageEligibilityResponseItemsComponent(String name, 35207 CoverageEligibilityResponse.ItemsComponent element) throws IOException { 35208 if (element != null) { 35209 composeElementAttributes(element); 35210 xml.enter(FHIR_NS, name); 35211 composeCoverageEligibilityResponseItemsComponentElements(element); 35212 composeElementClose(element); 35213 xml.exit(FHIR_NS, name); 35214 } 35215 } 35216 35217 protected void composeCoverageEligibilityResponseItemsComponentElements( 35218 CoverageEligibilityResponse.ItemsComponent element) throws IOException { 35219 composeBackboneElementElements(element); 35220 if (element.hasCategory()) { 35221 composeCodeableConcept("category", element.getCategory()); 35222 } 35223 if (element.hasProductOrService()) { 35224 composeCodeableConcept("productOrService", element.getProductOrService()); 35225 } 35226 if (element.hasModifier()) { 35227 for (CodeableConcept e : element.getModifier()) 35228 composeCodeableConcept("modifier", e); 35229 } 35230 if (element.hasProvider()) { 35231 composeReference("provider", element.getProvider()); 35232 } 35233 if (element.hasExcludedElement()) { 35234 composeBoolean("excluded", element.getExcludedElement()); 35235 } 35236 if (element.hasNameElement()) { 35237 composeString("name", element.getNameElement()); 35238 } 35239 if (element.hasDescriptionElement()) { 35240 composeString("description", element.getDescriptionElement()); 35241 } 35242 if (element.hasNetwork()) { 35243 composeCodeableConcept("network", element.getNetwork()); 35244 } 35245 if (element.hasUnit()) { 35246 composeCodeableConcept("unit", element.getUnit()); 35247 } 35248 if (element.hasTerm()) { 35249 composeCodeableConcept("term", element.getTerm()); 35250 } 35251 if (element.hasBenefit()) { 35252 for (CoverageEligibilityResponse.BenefitComponent e : element.getBenefit()) 35253 composeCoverageEligibilityResponseBenefitComponent("benefit", e); 35254 } 35255 if (element.hasAuthorizationRequiredElement()) { 35256 composeBoolean("authorizationRequired", element.getAuthorizationRequiredElement()); 35257 } 35258 if (element.hasAuthorizationSupporting()) { 35259 for (CodeableConcept e : element.getAuthorizationSupporting()) 35260 composeCodeableConcept("authorizationSupporting", e); 35261 } 35262 if (element.hasAuthorizationUrlElement()) { 35263 composeUri("authorizationUrl", element.getAuthorizationUrlElement()); 35264 } 35265 } 35266 35267 protected void composeCoverageEligibilityResponseBenefitComponent(String name, 35268 CoverageEligibilityResponse.BenefitComponent element) throws IOException { 35269 if (element != null) { 35270 composeElementAttributes(element); 35271 xml.enter(FHIR_NS, name); 35272 composeCoverageEligibilityResponseBenefitComponentElements(element); 35273 composeElementClose(element); 35274 xml.exit(FHIR_NS, name); 35275 } 35276 } 35277 35278 protected void composeCoverageEligibilityResponseBenefitComponentElements( 35279 CoverageEligibilityResponse.BenefitComponent element) throws IOException { 35280 composeBackboneElementElements(element); 35281 if (element.hasType()) { 35282 composeCodeableConcept("type", element.getType()); 35283 } 35284 if (element.hasAllowed()) { 35285 composeType("allowed", element.getAllowed()); 35286 } 35287 if (element.hasUsed()) { 35288 composeType("used", element.getUsed()); 35289 } 35290 } 35291 35292 protected void composeCoverageEligibilityResponseErrorsComponent(String name, 35293 CoverageEligibilityResponse.ErrorsComponent element) throws IOException { 35294 if (element != null) { 35295 composeElementAttributes(element); 35296 xml.enter(FHIR_NS, name); 35297 composeCoverageEligibilityResponseErrorsComponentElements(element); 35298 composeElementClose(element); 35299 xml.exit(FHIR_NS, name); 35300 } 35301 } 35302 35303 protected void composeCoverageEligibilityResponseErrorsComponentElements( 35304 CoverageEligibilityResponse.ErrorsComponent element) throws IOException { 35305 composeBackboneElementElements(element); 35306 if (element.hasCode()) { 35307 composeCodeableConcept("code", element.getCode()); 35308 } 35309 } 35310 35311 protected void composeDetectedIssue(String name, DetectedIssue element) throws IOException { 35312 if (element != null) { 35313 composeDomainResourceAttributes(element); 35314 xml.enter(FHIR_NS, name); 35315 composeDetectedIssueElements(element); 35316 composeElementClose(element); 35317 xml.exit(FHIR_NS, name); 35318 } 35319 } 35320 35321 protected void composeDetectedIssueElements(DetectedIssue element) throws IOException { 35322 composeDomainResourceElements(element); 35323 if (element.hasIdentifier()) { 35324 for (Identifier e : element.getIdentifier()) 35325 composeIdentifier("identifier", e); 35326 } 35327 if (element.hasStatusElement()) 35328 composeEnumeration("status", element.getStatusElement(), new DetectedIssue.DetectedIssueStatusEnumFactory()); 35329 if (element.hasCode()) { 35330 composeCodeableConcept("code", element.getCode()); 35331 } 35332 if (element.hasSeverityElement()) 35333 composeEnumeration("severity", element.getSeverityElement(), 35334 new DetectedIssue.DetectedIssueSeverityEnumFactory()); 35335 if (element.hasPatient()) { 35336 composeReference("patient", element.getPatient()); 35337 } 35338 if (element.hasIdentified()) { 35339 composeType("identified", element.getIdentified()); 35340 } 35341 if (element.hasAuthor()) { 35342 composeReference("author", element.getAuthor()); 35343 } 35344 if (element.hasImplicated()) { 35345 for (Reference e : element.getImplicated()) 35346 composeReference("implicated", e); 35347 } 35348 if (element.hasEvidence()) { 35349 for (DetectedIssue.DetectedIssueEvidenceComponent e : element.getEvidence()) 35350 composeDetectedIssueDetectedIssueEvidenceComponent("evidence", e); 35351 } 35352 if (element.hasDetailElement()) { 35353 composeString("detail", element.getDetailElement()); 35354 } 35355 if (element.hasReferenceElement()) { 35356 composeUri("reference", element.getReferenceElement()); 35357 } 35358 if (element.hasMitigation()) { 35359 for (DetectedIssue.DetectedIssueMitigationComponent e : element.getMitigation()) 35360 composeDetectedIssueDetectedIssueMitigationComponent("mitigation", e); 35361 } 35362 } 35363 35364 protected void composeDetectedIssueDetectedIssueEvidenceComponent(String name, 35365 DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException { 35366 if (element != null) { 35367 composeElementAttributes(element); 35368 xml.enter(FHIR_NS, name); 35369 composeDetectedIssueDetectedIssueEvidenceComponentElements(element); 35370 composeElementClose(element); 35371 xml.exit(FHIR_NS, name); 35372 } 35373 } 35374 35375 protected void composeDetectedIssueDetectedIssueEvidenceComponentElements( 35376 DetectedIssue.DetectedIssueEvidenceComponent element) throws IOException { 35377 composeBackboneElementElements(element); 35378 if (element.hasCode()) { 35379 for (CodeableConcept e : element.getCode()) 35380 composeCodeableConcept("code", e); 35381 } 35382 if (element.hasDetail()) { 35383 for (Reference e : element.getDetail()) 35384 composeReference("detail", e); 35385 } 35386 } 35387 35388 protected void composeDetectedIssueDetectedIssueMitigationComponent(String name, 35389 DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { 35390 if (element != null) { 35391 composeElementAttributes(element); 35392 xml.enter(FHIR_NS, name); 35393 composeDetectedIssueDetectedIssueMitigationComponentElements(element); 35394 composeElementClose(element); 35395 xml.exit(FHIR_NS, name); 35396 } 35397 } 35398 35399 protected void composeDetectedIssueDetectedIssueMitigationComponentElements( 35400 DetectedIssue.DetectedIssueMitigationComponent element) throws IOException { 35401 composeBackboneElementElements(element); 35402 if (element.hasAction()) { 35403 composeCodeableConcept("action", element.getAction()); 35404 } 35405 if (element.hasDateElement()) { 35406 composeDateTime("date", element.getDateElement()); 35407 } 35408 if (element.hasAuthor()) { 35409 composeReference("author", element.getAuthor()); 35410 } 35411 } 35412 35413 protected void composeDevice(String name, Device element) throws IOException { 35414 if (element != null) { 35415 composeDomainResourceAttributes(element); 35416 xml.enter(FHIR_NS, name); 35417 composeDeviceElements(element); 35418 composeElementClose(element); 35419 xml.exit(FHIR_NS, name); 35420 } 35421 } 35422 35423 protected void composeDeviceElements(Device element) throws IOException { 35424 composeDomainResourceElements(element); 35425 if (element.hasIdentifier()) { 35426 for (Identifier e : element.getIdentifier()) 35427 composeIdentifier("identifier", e); 35428 } 35429 if (element.hasDefinition()) { 35430 composeReference("definition", element.getDefinition()); 35431 } 35432 if (element.hasUdiCarrier()) { 35433 for (Device.DeviceUdiCarrierComponent e : element.getUdiCarrier()) 35434 composeDeviceDeviceUdiCarrierComponent("udiCarrier", e); 35435 } 35436 if (element.hasStatusElement()) 35437 composeEnumeration("status", element.getStatusElement(), new Device.FHIRDeviceStatusEnumFactory()); 35438 if (element.hasStatusReason()) { 35439 for (CodeableConcept e : element.getStatusReason()) 35440 composeCodeableConcept("statusReason", e); 35441 } 35442 if (element.hasDistinctIdentifierElement()) { 35443 composeString("distinctIdentifier", element.getDistinctIdentifierElement()); 35444 } 35445 if (element.hasManufacturerElement()) { 35446 composeString("manufacturer", element.getManufacturerElement()); 35447 } 35448 if (element.hasManufactureDateElement()) { 35449 composeDateTime("manufactureDate", element.getManufactureDateElement()); 35450 } 35451 if (element.hasExpirationDateElement()) { 35452 composeDateTime("expirationDate", element.getExpirationDateElement()); 35453 } 35454 if (element.hasLotNumberElement()) { 35455 composeString("lotNumber", element.getLotNumberElement()); 35456 } 35457 if (element.hasSerialNumberElement()) { 35458 composeString("serialNumber", element.getSerialNumberElement()); 35459 } 35460 if (element.hasDeviceName()) { 35461 for (Device.DeviceDeviceNameComponent e : element.getDeviceName()) 35462 composeDeviceDeviceDeviceNameComponent("deviceName", e); 35463 } 35464 if (element.hasModelNumberElement()) { 35465 composeString("modelNumber", element.getModelNumberElement()); 35466 } 35467 if (element.hasPartNumberElement()) { 35468 composeString("partNumber", element.getPartNumberElement()); 35469 } 35470 if (element.hasType()) { 35471 composeCodeableConcept("type", element.getType()); 35472 } 35473 if (element.hasSpecialization()) { 35474 for (Device.DeviceSpecializationComponent e : element.getSpecialization()) 35475 composeDeviceDeviceSpecializationComponent("specialization", e); 35476 } 35477 if (element.hasVersion()) { 35478 for (Device.DeviceVersionComponent e : element.getVersion()) 35479 composeDeviceDeviceVersionComponent("version", e); 35480 } 35481 if (element.hasProperty()) { 35482 for (Device.DevicePropertyComponent e : element.getProperty()) 35483 composeDeviceDevicePropertyComponent("property", e); 35484 } 35485 if (element.hasPatient()) { 35486 composeReference("patient", element.getPatient()); 35487 } 35488 if (element.hasOwner()) { 35489 composeReference("owner", element.getOwner()); 35490 } 35491 if (element.hasContact()) { 35492 for (ContactPoint e : element.getContact()) 35493 composeContactPoint("contact", e); 35494 } 35495 if (element.hasLocation()) { 35496 composeReference("location", element.getLocation()); 35497 } 35498 if (element.hasUrlElement()) { 35499 composeUri("url", element.getUrlElement()); 35500 } 35501 if (element.hasNote()) { 35502 for (Annotation e : element.getNote()) 35503 composeAnnotation("note", e); 35504 } 35505 if (element.hasSafety()) { 35506 for (CodeableConcept e : element.getSafety()) 35507 composeCodeableConcept("safety", e); 35508 } 35509 if (element.hasParent()) { 35510 composeReference("parent", element.getParent()); 35511 } 35512 } 35513 35514 protected void composeDeviceDeviceUdiCarrierComponent(String name, Device.DeviceUdiCarrierComponent element) 35515 throws IOException { 35516 if (element != null) { 35517 composeElementAttributes(element); 35518 xml.enter(FHIR_NS, name); 35519 composeDeviceDeviceUdiCarrierComponentElements(element); 35520 composeElementClose(element); 35521 xml.exit(FHIR_NS, name); 35522 } 35523 } 35524 35525 protected void composeDeviceDeviceUdiCarrierComponentElements(Device.DeviceUdiCarrierComponent element) 35526 throws IOException { 35527 composeBackboneElementElements(element); 35528 if (element.hasDeviceIdentifierElement()) { 35529 composeString("deviceIdentifier", element.getDeviceIdentifierElement()); 35530 } 35531 if (element.hasIssuerElement()) { 35532 composeUri("issuer", element.getIssuerElement()); 35533 } 35534 if (element.hasJurisdictionElement()) { 35535 composeUri("jurisdiction", element.getJurisdictionElement()); 35536 } 35537 if (element.hasCarrierAIDCElement()) { 35538 composeBase64Binary("carrierAIDC", element.getCarrierAIDCElement()); 35539 } 35540 if (element.hasCarrierHRFElement()) { 35541 composeString("carrierHRF", element.getCarrierHRFElement()); 35542 } 35543 if (element.hasEntryTypeElement()) 35544 composeEnumeration("entryType", element.getEntryTypeElement(), new Device.UDIEntryTypeEnumFactory()); 35545 } 35546 35547 protected void composeDeviceDeviceDeviceNameComponent(String name, Device.DeviceDeviceNameComponent element) 35548 throws IOException { 35549 if (element != null) { 35550 composeElementAttributes(element); 35551 xml.enter(FHIR_NS, name); 35552 composeDeviceDeviceDeviceNameComponentElements(element); 35553 composeElementClose(element); 35554 xml.exit(FHIR_NS, name); 35555 } 35556 } 35557 35558 protected void composeDeviceDeviceDeviceNameComponentElements(Device.DeviceDeviceNameComponent element) 35559 throws IOException { 35560 composeBackboneElementElements(element); 35561 if (element.hasNameElement()) { 35562 composeString("name", element.getNameElement()); 35563 } 35564 if (element.hasTypeElement()) 35565 composeEnumeration("type", element.getTypeElement(), new Device.DeviceNameTypeEnumFactory()); 35566 } 35567 35568 protected void composeDeviceDeviceSpecializationComponent(String name, Device.DeviceSpecializationComponent element) 35569 throws IOException { 35570 if (element != null) { 35571 composeElementAttributes(element); 35572 xml.enter(FHIR_NS, name); 35573 composeDeviceDeviceSpecializationComponentElements(element); 35574 composeElementClose(element); 35575 xml.exit(FHIR_NS, name); 35576 } 35577 } 35578 35579 protected void composeDeviceDeviceSpecializationComponentElements(Device.DeviceSpecializationComponent element) 35580 throws IOException { 35581 composeBackboneElementElements(element); 35582 if (element.hasSystemType()) { 35583 composeCodeableConcept("systemType", element.getSystemType()); 35584 } 35585 if (element.hasVersionElement()) { 35586 composeString("version", element.getVersionElement()); 35587 } 35588 } 35589 35590 protected void composeDeviceDeviceVersionComponent(String name, Device.DeviceVersionComponent element) 35591 throws IOException { 35592 if (element != null) { 35593 composeElementAttributes(element); 35594 xml.enter(FHIR_NS, name); 35595 composeDeviceDeviceVersionComponentElements(element); 35596 composeElementClose(element); 35597 xml.exit(FHIR_NS, name); 35598 } 35599 } 35600 35601 protected void composeDeviceDeviceVersionComponentElements(Device.DeviceVersionComponent element) throws IOException { 35602 composeBackboneElementElements(element); 35603 if (element.hasType()) { 35604 composeCodeableConcept("type", element.getType()); 35605 } 35606 if (element.hasComponent()) { 35607 composeIdentifier("component", element.getComponent()); 35608 } 35609 if (element.hasValueElement()) { 35610 composeString("value", element.getValueElement()); 35611 } 35612 } 35613 35614 protected void composeDeviceDevicePropertyComponent(String name, Device.DevicePropertyComponent element) 35615 throws IOException { 35616 if (element != null) { 35617 composeElementAttributes(element); 35618 xml.enter(FHIR_NS, name); 35619 composeDeviceDevicePropertyComponentElements(element); 35620 composeElementClose(element); 35621 xml.exit(FHIR_NS, name); 35622 } 35623 } 35624 35625 protected void composeDeviceDevicePropertyComponentElements(Device.DevicePropertyComponent element) 35626 throws IOException { 35627 composeBackboneElementElements(element); 35628 if (element.hasType()) { 35629 composeCodeableConcept("type", element.getType()); 35630 } 35631 if (element.hasValueQuantity()) { 35632 for (Quantity e : element.getValueQuantity()) 35633 composeQuantity("valueQuantity", e); 35634 } 35635 if (element.hasValueCode()) { 35636 for (CodeableConcept e : element.getValueCode()) 35637 composeCodeableConcept("valueCode", e); 35638 } 35639 } 35640 35641 protected void composeDeviceDefinition(String name, DeviceDefinition element) throws IOException { 35642 if (element != null) { 35643 composeDomainResourceAttributes(element); 35644 xml.enter(FHIR_NS, name); 35645 composeDeviceDefinitionElements(element); 35646 composeElementClose(element); 35647 xml.exit(FHIR_NS, name); 35648 } 35649 } 35650 35651 protected void composeDeviceDefinitionElements(DeviceDefinition element) throws IOException { 35652 composeDomainResourceElements(element); 35653 if (element.hasIdentifier()) { 35654 for (Identifier e : element.getIdentifier()) 35655 composeIdentifier("identifier", e); 35656 } 35657 if (element.hasUdiDeviceIdentifier()) { 35658 for (DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent e : element.getUdiDeviceIdentifier()) 35659 composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent("udiDeviceIdentifier", e); 35660 } 35661 if (element.hasManufacturer()) { 35662 composeType("manufacturer", element.getManufacturer()); 35663 } 35664 if (element.hasDeviceName()) { 35665 for (DeviceDefinition.DeviceDefinitionDeviceNameComponent e : element.getDeviceName()) 35666 composeDeviceDefinitionDeviceDefinitionDeviceNameComponent("deviceName", e); 35667 } 35668 if (element.hasModelNumberElement()) { 35669 composeString("modelNumber", element.getModelNumberElement()); 35670 } 35671 if (element.hasType()) { 35672 composeCodeableConcept("type", element.getType()); 35673 } 35674 if (element.hasSpecialization()) { 35675 for (DeviceDefinition.DeviceDefinitionSpecializationComponent e : element.getSpecialization()) 35676 composeDeviceDefinitionDeviceDefinitionSpecializationComponent("specialization", e); 35677 } 35678 if (element.hasVersion()) { 35679 for (StringType e : element.getVersion()) 35680 composeString("version", e); 35681 } 35682 if (element.hasSafety()) { 35683 for (CodeableConcept e : element.getSafety()) 35684 composeCodeableConcept("safety", e); 35685 } 35686 if (element.hasShelfLifeStorage()) { 35687 for (ProductShelfLife e : element.getShelfLifeStorage()) 35688 composeProductShelfLife("shelfLifeStorage", e); 35689 } 35690 if (element.hasPhysicalCharacteristics()) { 35691 composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics()); 35692 } 35693 if (element.hasLanguageCode()) { 35694 for (CodeableConcept e : element.getLanguageCode()) 35695 composeCodeableConcept("languageCode", e); 35696 } 35697 if (element.hasCapability()) { 35698 for (DeviceDefinition.DeviceDefinitionCapabilityComponent e : element.getCapability()) 35699 composeDeviceDefinitionDeviceDefinitionCapabilityComponent("capability", e); 35700 } 35701 if (element.hasProperty()) { 35702 for (DeviceDefinition.DeviceDefinitionPropertyComponent e : element.getProperty()) 35703 composeDeviceDefinitionDeviceDefinitionPropertyComponent("property", e); 35704 } 35705 if (element.hasOwner()) { 35706 composeReference("owner", element.getOwner()); 35707 } 35708 if (element.hasContact()) { 35709 for (ContactPoint e : element.getContact()) 35710 composeContactPoint("contact", e); 35711 } 35712 if (element.hasUrlElement()) { 35713 composeUri("url", element.getUrlElement()); 35714 } 35715 if (element.hasOnlineInformationElement()) { 35716 composeUri("onlineInformation", element.getOnlineInformationElement()); 35717 } 35718 if (element.hasNote()) { 35719 for (Annotation e : element.getNote()) 35720 composeAnnotation("note", e); 35721 } 35722 if (element.hasQuantity()) { 35723 composeQuantity("quantity", element.getQuantity()); 35724 } 35725 if (element.hasParentDevice()) { 35726 composeReference("parentDevice", element.getParentDevice()); 35727 } 35728 if (element.hasMaterial()) { 35729 for (DeviceDefinition.DeviceDefinitionMaterialComponent e : element.getMaterial()) 35730 composeDeviceDefinitionDeviceDefinitionMaterialComponent("material", e); 35731 } 35732 } 35733 35734 protected void composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponent(String name, 35735 DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException { 35736 if (element != null) { 35737 composeElementAttributes(element); 35738 xml.enter(FHIR_NS, name); 35739 composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentElements(element); 35740 composeElementClose(element); 35741 xml.exit(FHIR_NS, name); 35742 } 35743 } 35744 35745 protected void composeDeviceDefinitionDeviceDefinitionUdiDeviceIdentifierComponentElements( 35746 DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent element) throws IOException { 35747 composeBackboneElementElements(element); 35748 if (element.hasDeviceIdentifierElement()) { 35749 composeString("deviceIdentifier", element.getDeviceIdentifierElement()); 35750 } 35751 if (element.hasIssuerElement()) { 35752 composeUri("issuer", element.getIssuerElement()); 35753 } 35754 if (element.hasJurisdictionElement()) { 35755 composeUri("jurisdiction", element.getJurisdictionElement()); 35756 } 35757 } 35758 35759 protected void composeDeviceDefinitionDeviceDefinitionDeviceNameComponent(String name, 35760 DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException { 35761 if (element != null) { 35762 composeElementAttributes(element); 35763 xml.enter(FHIR_NS, name); 35764 composeDeviceDefinitionDeviceDefinitionDeviceNameComponentElements(element); 35765 composeElementClose(element); 35766 xml.exit(FHIR_NS, name); 35767 } 35768 } 35769 35770 protected void composeDeviceDefinitionDeviceDefinitionDeviceNameComponentElements( 35771 DeviceDefinition.DeviceDefinitionDeviceNameComponent element) throws IOException { 35772 composeBackboneElementElements(element); 35773 if (element.hasNameElement()) { 35774 composeString("name", element.getNameElement()); 35775 } 35776 if (element.hasTypeElement()) 35777 composeEnumeration("type", element.getTypeElement(), new DeviceDefinition.DeviceNameTypeEnumFactory()); 35778 } 35779 35780 protected void composeDeviceDefinitionDeviceDefinitionSpecializationComponent(String name, 35781 DeviceDefinition.DeviceDefinitionSpecializationComponent element) throws IOException { 35782 if (element != null) { 35783 composeElementAttributes(element); 35784 xml.enter(FHIR_NS, name); 35785 composeDeviceDefinitionDeviceDefinitionSpecializationComponentElements(element); 35786 composeElementClose(element); 35787 xml.exit(FHIR_NS, name); 35788 } 35789 } 35790 35791 protected void composeDeviceDefinitionDeviceDefinitionSpecializationComponentElements( 35792 DeviceDefinition.DeviceDefinitionSpecializationComponent element) throws IOException { 35793 composeBackboneElementElements(element); 35794 if (element.hasSystemTypeElement()) { 35795 composeString("systemType", element.getSystemTypeElement()); 35796 } 35797 if (element.hasVersionElement()) { 35798 composeString("version", element.getVersionElement()); 35799 } 35800 } 35801 35802 protected void composeDeviceDefinitionDeviceDefinitionCapabilityComponent(String name, 35803 DeviceDefinition.DeviceDefinitionCapabilityComponent element) throws IOException { 35804 if (element != null) { 35805 composeElementAttributes(element); 35806 xml.enter(FHIR_NS, name); 35807 composeDeviceDefinitionDeviceDefinitionCapabilityComponentElements(element); 35808 composeElementClose(element); 35809 xml.exit(FHIR_NS, name); 35810 } 35811 } 35812 35813 protected void composeDeviceDefinitionDeviceDefinitionCapabilityComponentElements( 35814 DeviceDefinition.DeviceDefinitionCapabilityComponent element) throws IOException { 35815 composeBackboneElementElements(element); 35816 if (element.hasType()) { 35817 composeCodeableConcept("type", element.getType()); 35818 } 35819 if (element.hasDescription()) { 35820 for (CodeableConcept e : element.getDescription()) 35821 composeCodeableConcept("description", e); 35822 } 35823 } 35824 35825 protected void composeDeviceDefinitionDeviceDefinitionPropertyComponent(String name, 35826 DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException { 35827 if (element != null) { 35828 composeElementAttributes(element); 35829 xml.enter(FHIR_NS, name); 35830 composeDeviceDefinitionDeviceDefinitionPropertyComponentElements(element); 35831 composeElementClose(element); 35832 xml.exit(FHIR_NS, name); 35833 } 35834 } 35835 35836 protected void composeDeviceDefinitionDeviceDefinitionPropertyComponentElements( 35837 DeviceDefinition.DeviceDefinitionPropertyComponent element) throws IOException { 35838 composeBackboneElementElements(element); 35839 if (element.hasType()) { 35840 composeCodeableConcept("type", element.getType()); 35841 } 35842 if (element.hasValueQuantity()) { 35843 for (Quantity e : element.getValueQuantity()) 35844 composeQuantity("valueQuantity", e); 35845 } 35846 if (element.hasValueCode()) { 35847 for (CodeableConcept e : element.getValueCode()) 35848 composeCodeableConcept("valueCode", e); 35849 } 35850 } 35851 35852 protected void composeDeviceDefinitionDeviceDefinitionMaterialComponent(String name, 35853 DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException { 35854 if (element != null) { 35855 composeElementAttributes(element); 35856 xml.enter(FHIR_NS, name); 35857 composeDeviceDefinitionDeviceDefinitionMaterialComponentElements(element); 35858 composeElementClose(element); 35859 xml.exit(FHIR_NS, name); 35860 } 35861 } 35862 35863 protected void composeDeviceDefinitionDeviceDefinitionMaterialComponentElements( 35864 DeviceDefinition.DeviceDefinitionMaterialComponent element) throws IOException { 35865 composeBackboneElementElements(element); 35866 if (element.hasSubstance()) { 35867 composeCodeableConcept("substance", element.getSubstance()); 35868 } 35869 if (element.hasAlternateElement()) { 35870 composeBoolean("alternate", element.getAlternateElement()); 35871 } 35872 if (element.hasAllergenicIndicatorElement()) { 35873 composeBoolean("allergenicIndicator", element.getAllergenicIndicatorElement()); 35874 } 35875 } 35876 35877 protected void composeDeviceMetric(String name, DeviceMetric element) throws IOException { 35878 if (element != null) { 35879 composeDomainResourceAttributes(element); 35880 xml.enter(FHIR_NS, name); 35881 composeDeviceMetricElements(element); 35882 composeElementClose(element); 35883 xml.exit(FHIR_NS, name); 35884 } 35885 } 35886 35887 protected void composeDeviceMetricElements(DeviceMetric element) throws IOException { 35888 composeDomainResourceElements(element); 35889 if (element.hasIdentifier()) { 35890 for (Identifier e : element.getIdentifier()) 35891 composeIdentifier("identifier", e); 35892 } 35893 if (element.hasType()) { 35894 composeCodeableConcept("type", element.getType()); 35895 } 35896 if (element.hasUnit()) { 35897 composeCodeableConcept("unit", element.getUnit()); 35898 } 35899 if (element.hasSource()) { 35900 composeReference("source", element.getSource()); 35901 } 35902 if (element.hasParent()) { 35903 composeReference("parent", element.getParent()); 35904 } 35905 if (element.hasOperationalStatusElement()) 35906 composeEnumeration("operationalStatus", element.getOperationalStatusElement(), 35907 new DeviceMetric.DeviceMetricOperationalStatusEnumFactory()); 35908 if (element.hasColorElement()) 35909 composeEnumeration("color", element.getColorElement(), new DeviceMetric.DeviceMetricColorEnumFactory()); 35910 if (element.hasCategoryElement()) 35911 composeEnumeration("category", element.getCategoryElement(), new DeviceMetric.DeviceMetricCategoryEnumFactory()); 35912 if (element.hasMeasurementPeriod()) { 35913 composeTiming("measurementPeriod", element.getMeasurementPeriod()); 35914 } 35915 if (element.hasCalibration()) { 35916 for (DeviceMetric.DeviceMetricCalibrationComponent e : element.getCalibration()) 35917 composeDeviceMetricDeviceMetricCalibrationComponent("calibration", e); 35918 } 35919 } 35920 35921 protected void composeDeviceMetricDeviceMetricCalibrationComponent(String name, 35922 DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { 35923 if (element != null) { 35924 composeElementAttributes(element); 35925 xml.enter(FHIR_NS, name); 35926 composeDeviceMetricDeviceMetricCalibrationComponentElements(element); 35927 composeElementClose(element); 35928 xml.exit(FHIR_NS, name); 35929 } 35930 } 35931 35932 protected void composeDeviceMetricDeviceMetricCalibrationComponentElements( 35933 DeviceMetric.DeviceMetricCalibrationComponent element) throws IOException { 35934 composeBackboneElementElements(element); 35935 if (element.hasTypeElement()) 35936 composeEnumeration("type", element.getTypeElement(), new DeviceMetric.DeviceMetricCalibrationTypeEnumFactory()); 35937 if (element.hasStateElement()) 35938 composeEnumeration("state", element.getStateElement(), 35939 new DeviceMetric.DeviceMetricCalibrationStateEnumFactory()); 35940 if (element.hasTimeElement()) { 35941 composeInstant("time", element.getTimeElement()); 35942 } 35943 } 35944 35945 protected void composeDeviceRequest(String name, DeviceRequest element) throws IOException { 35946 if (element != null) { 35947 composeDomainResourceAttributes(element); 35948 xml.enter(FHIR_NS, name); 35949 composeDeviceRequestElements(element); 35950 composeElementClose(element); 35951 xml.exit(FHIR_NS, name); 35952 } 35953 } 35954 35955 protected void composeDeviceRequestElements(DeviceRequest element) throws IOException { 35956 composeDomainResourceElements(element); 35957 if (element.hasIdentifier()) { 35958 for (Identifier e : element.getIdentifier()) 35959 composeIdentifier("identifier", e); 35960 } 35961 if (element.hasInstantiatesCanonical()) { 35962 for (CanonicalType e : element.getInstantiatesCanonical()) 35963 composeCanonical("instantiatesCanonical", e); 35964 } 35965 if (element.hasInstantiatesUri()) { 35966 for (UriType e : element.getInstantiatesUri()) 35967 composeUri("instantiatesUri", e); 35968 } 35969 if (element.hasBasedOn()) { 35970 for (Reference e : element.getBasedOn()) 35971 composeReference("basedOn", e); 35972 } 35973 if (element.hasPriorRequest()) { 35974 for (Reference e : element.getPriorRequest()) 35975 composeReference("priorRequest", e); 35976 } 35977 if (element.hasGroupIdentifier()) { 35978 composeIdentifier("groupIdentifier", element.getGroupIdentifier()); 35979 } 35980 if (element.hasStatusElement()) 35981 composeEnumeration("status", element.getStatusElement(), new DeviceRequest.DeviceRequestStatusEnumFactory()); 35982 if (element.hasIntentElement()) 35983 composeEnumeration("intent", element.getIntentElement(), new DeviceRequest.RequestIntentEnumFactory()); 35984 if (element.hasPriorityElement()) 35985 composeEnumeration("priority", element.getPriorityElement(), new DeviceRequest.RequestPriorityEnumFactory()); 35986 if (element.hasCode()) { 35987 composeType("code", element.getCode()); 35988 } 35989 if (element.hasParameter()) { 35990 for (DeviceRequest.DeviceRequestParameterComponent e : element.getParameter()) 35991 composeDeviceRequestDeviceRequestParameterComponent("parameter", e); 35992 } 35993 if (element.hasSubject()) { 35994 composeReference("subject", element.getSubject()); 35995 } 35996 if (element.hasEncounter()) { 35997 composeReference("encounter", element.getEncounter()); 35998 } 35999 if (element.hasOccurrence()) { 36000 composeType("occurrence", element.getOccurrence()); 36001 } 36002 if (element.hasAuthoredOnElement()) { 36003 composeDateTime("authoredOn", element.getAuthoredOnElement()); 36004 } 36005 if (element.hasRequester()) { 36006 composeReference("requester", element.getRequester()); 36007 } 36008 if (element.hasPerformerType()) { 36009 composeCodeableConcept("performerType", element.getPerformerType()); 36010 } 36011 if (element.hasPerformer()) { 36012 composeReference("performer", element.getPerformer()); 36013 } 36014 if (element.hasReasonCode()) { 36015 for (CodeableConcept e : element.getReasonCode()) 36016 composeCodeableConcept("reasonCode", e); 36017 } 36018 if (element.hasReasonReference()) { 36019 for (Reference e : element.getReasonReference()) 36020 composeReference("reasonReference", e); 36021 } 36022 if (element.hasInsurance()) { 36023 for (Reference e : element.getInsurance()) 36024 composeReference("insurance", e); 36025 } 36026 if (element.hasSupportingInfo()) { 36027 for (Reference e : element.getSupportingInfo()) 36028 composeReference("supportingInfo", e); 36029 } 36030 if (element.hasNote()) { 36031 for (Annotation e : element.getNote()) 36032 composeAnnotation("note", e); 36033 } 36034 if (element.hasRelevantHistory()) { 36035 for (Reference e : element.getRelevantHistory()) 36036 composeReference("relevantHistory", e); 36037 } 36038 } 36039 36040 protected void composeDeviceRequestDeviceRequestParameterComponent(String name, 36041 DeviceRequest.DeviceRequestParameterComponent element) throws IOException { 36042 if (element != null) { 36043 composeElementAttributes(element); 36044 xml.enter(FHIR_NS, name); 36045 composeDeviceRequestDeviceRequestParameterComponentElements(element); 36046 composeElementClose(element); 36047 xml.exit(FHIR_NS, name); 36048 } 36049 } 36050 36051 protected void composeDeviceRequestDeviceRequestParameterComponentElements( 36052 DeviceRequest.DeviceRequestParameterComponent element) throws IOException { 36053 composeBackboneElementElements(element); 36054 if (element.hasCode()) { 36055 composeCodeableConcept("code", element.getCode()); 36056 } 36057 if (element.hasValue()) { 36058 composeType("value", element.getValue()); 36059 } 36060 } 36061 36062 protected void composeDeviceUseStatement(String name, DeviceUseStatement element) throws IOException { 36063 if (element != null) { 36064 composeDomainResourceAttributes(element); 36065 xml.enter(FHIR_NS, name); 36066 composeDeviceUseStatementElements(element); 36067 composeElementClose(element); 36068 xml.exit(FHIR_NS, name); 36069 } 36070 } 36071 36072 protected void composeDeviceUseStatementElements(DeviceUseStatement element) throws IOException { 36073 composeDomainResourceElements(element); 36074 if (element.hasIdentifier()) { 36075 for (Identifier e : element.getIdentifier()) 36076 composeIdentifier("identifier", e); 36077 } 36078 if (element.hasBasedOn()) { 36079 for (Reference e : element.getBasedOn()) 36080 composeReference("basedOn", e); 36081 } 36082 if (element.hasStatusElement()) 36083 composeEnumeration("status", element.getStatusElement(), 36084 new DeviceUseStatement.DeviceUseStatementStatusEnumFactory()); 36085 if (element.hasSubject()) { 36086 composeReference("subject", element.getSubject()); 36087 } 36088 if (element.hasDerivedFrom()) { 36089 for (Reference e : element.getDerivedFrom()) 36090 composeReference("derivedFrom", e); 36091 } 36092 if (element.hasTiming()) { 36093 composeType("timing", element.getTiming()); 36094 } 36095 if (element.hasRecordedOnElement()) { 36096 composeDateTime("recordedOn", element.getRecordedOnElement()); 36097 } 36098 if (element.hasSource()) { 36099 composeReference("source", element.getSource()); 36100 } 36101 if (element.hasDevice()) { 36102 composeReference("device", element.getDevice()); 36103 } 36104 if (element.hasReasonCode()) { 36105 for (CodeableConcept e : element.getReasonCode()) 36106 composeCodeableConcept("reasonCode", e); 36107 } 36108 if (element.hasReasonReference()) { 36109 for (Reference e : element.getReasonReference()) 36110 composeReference("reasonReference", e); 36111 } 36112 if (element.hasBodySite()) { 36113 composeCodeableConcept("bodySite", element.getBodySite()); 36114 } 36115 if (element.hasNote()) { 36116 for (Annotation e : element.getNote()) 36117 composeAnnotation("note", e); 36118 } 36119 } 36120 36121 protected void composeDiagnosticReport(String name, DiagnosticReport element) throws IOException { 36122 if (element != null) { 36123 composeDomainResourceAttributes(element); 36124 xml.enter(FHIR_NS, name); 36125 composeDiagnosticReportElements(element); 36126 composeElementClose(element); 36127 xml.exit(FHIR_NS, name); 36128 } 36129 } 36130 36131 protected void composeDiagnosticReportElements(DiagnosticReport element) throws IOException { 36132 composeDomainResourceElements(element); 36133 if (element.hasIdentifier()) { 36134 for (Identifier e : element.getIdentifier()) 36135 composeIdentifier("identifier", e); 36136 } 36137 if (element.hasBasedOn()) { 36138 for (Reference e : element.getBasedOn()) 36139 composeReference("basedOn", e); 36140 } 36141 if (element.hasStatusElement()) 36142 composeEnumeration("status", element.getStatusElement(), 36143 new DiagnosticReport.DiagnosticReportStatusEnumFactory()); 36144 if (element.hasCategory()) { 36145 for (CodeableConcept e : element.getCategory()) 36146 composeCodeableConcept("category", e); 36147 } 36148 if (element.hasCode()) { 36149 composeCodeableConcept("code", element.getCode()); 36150 } 36151 if (element.hasSubject()) { 36152 composeReference("subject", element.getSubject()); 36153 } 36154 if (element.hasEncounter()) { 36155 composeReference("encounter", element.getEncounter()); 36156 } 36157 if (element.hasEffective()) { 36158 composeType("effective", element.getEffective()); 36159 } 36160 if (element.hasIssuedElement()) { 36161 composeInstant("issued", element.getIssuedElement()); 36162 } 36163 if (element.hasPerformer()) { 36164 for (Reference e : element.getPerformer()) 36165 composeReference("performer", e); 36166 } 36167 if (element.hasResultsInterpreter()) { 36168 for (Reference e : element.getResultsInterpreter()) 36169 composeReference("resultsInterpreter", e); 36170 } 36171 if (element.hasSpecimen()) { 36172 for (Reference e : element.getSpecimen()) 36173 composeReference("specimen", e); 36174 } 36175 if (element.hasResult()) { 36176 for (Reference e : element.getResult()) 36177 composeReference("result", e); 36178 } 36179 if (element.hasImagingStudy()) { 36180 for (Reference e : element.getImagingStudy()) 36181 composeReference("imagingStudy", e); 36182 } 36183 if (element.hasMedia()) { 36184 for (DiagnosticReport.DiagnosticReportMediaComponent e : element.getMedia()) 36185 composeDiagnosticReportDiagnosticReportMediaComponent("media", e); 36186 } 36187 if (element.hasConclusionElement()) { 36188 composeString("conclusion", element.getConclusionElement()); 36189 } 36190 if (element.hasConclusionCode()) { 36191 for (CodeableConcept e : element.getConclusionCode()) 36192 composeCodeableConcept("conclusionCode", e); 36193 } 36194 if (element.hasPresentedForm()) { 36195 for (Attachment e : element.getPresentedForm()) 36196 composeAttachment("presentedForm", e); 36197 } 36198 } 36199 36200 protected void composeDiagnosticReportDiagnosticReportMediaComponent(String name, 36201 DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException { 36202 if (element != null) { 36203 composeElementAttributes(element); 36204 xml.enter(FHIR_NS, name); 36205 composeDiagnosticReportDiagnosticReportMediaComponentElements(element); 36206 composeElementClose(element); 36207 xml.exit(FHIR_NS, name); 36208 } 36209 } 36210 36211 protected void composeDiagnosticReportDiagnosticReportMediaComponentElements( 36212 DiagnosticReport.DiagnosticReportMediaComponent element) throws IOException { 36213 composeBackboneElementElements(element); 36214 if (element.hasCommentElement()) { 36215 composeString("comment", element.getCommentElement()); 36216 } 36217 if (element.hasLink()) { 36218 composeReference("link", element.getLink()); 36219 } 36220 } 36221 36222 protected void composeDocumentManifest(String name, DocumentManifest element) throws IOException { 36223 if (element != null) { 36224 composeDomainResourceAttributes(element); 36225 xml.enter(FHIR_NS, name); 36226 composeDocumentManifestElements(element); 36227 composeElementClose(element); 36228 xml.exit(FHIR_NS, name); 36229 } 36230 } 36231 36232 protected void composeDocumentManifestElements(DocumentManifest element) throws IOException { 36233 composeDomainResourceElements(element); 36234 if (element.hasMasterIdentifier()) { 36235 composeIdentifier("masterIdentifier", element.getMasterIdentifier()); 36236 } 36237 if (element.hasIdentifier()) { 36238 for (Identifier e : element.getIdentifier()) 36239 composeIdentifier("identifier", e); 36240 } 36241 if (element.hasStatusElement()) 36242 composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); 36243 if (element.hasType()) { 36244 composeCodeableConcept("type", element.getType()); 36245 } 36246 if (element.hasSubject()) { 36247 composeReference("subject", element.getSubject()); 36248 } 36249 if (element.hasCreatedElement()) { 36250 composeDateTime("created", element.getCreatedElement()); 36251 } 36252 if (element.hasAuthor()) { 36253 for (Reference e : element.getAuthor()) 36254 composeReference("author", e); 36255 } 36256 if (element.hasRecipient()) { 36257 for (Reference e : element.getRecipient()) 36258 composeReference("recipient", e); 36259 } 36260 if (element.hasSourceElement()) { 36261 composeUri("source", element.getSourceElement()); 36262 } 36263 if (element.hasDescriptionElement()) { 36264 composeString("description", element.getDescriptionElement()); 36265 } 36266 if (element.hasContent()) { 36267 for (Reference e : element.getContent()) 36268 composeReference("content", e); 36269 } 36270 if (element.hasRelated()) { 36271 for (DocumentManifest.DocumentManifestRelatedComponent e : element.getRelated()) 36272 composeDocumentManifestDocumentManifestRelatedComponent("related", e); 36273 } 36274 } 36275 36276 protected void composeDocumentManifestDocumentManifestRelatedComponent(String name, 36277 DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { 36278 if (element != null) { 36279 composeElementAttributes(element); 36280 xml.enter(FHIR_NS, name); 36281 composeDocumentManifestDocumentManifestRelatedComponentElements(element); 36282 composeElementClose(element); 36283 xml.exit(FHIR_NS, name); 36284 } 36285 } 36286 36287 protected void composeDocumentManifestDocumentManifestRelatedComponentElements( 36288 DocumentManifest.DocumentManifestRelatedComponent element) throws IOException { 36289 composeBackboneElementElements(element); 36290 if (element.hasIdentifier()) { 36291 composeIdentifier("identifier", element.getIdentifier()); 36292 } 36293 if (element.hasRef()) { 36294 composeReference("ref", element.getRef()); 36295 } 36296 } 36297 36298 protected void composeDocumentReference(String name, DocumentReference element) throws IOException { 36299 if (element != null) { 36300 composeDomainResourceAttributes(element); 36301 xml.enter(FHIR_NS, name); 36302 composeDocumentReferenceElements(element); 36303 composeElementClose(element); 36304 xml.exit(FHIR_NS, name); 36305 } 36306 } 36307 36308 protected void composeDocumentReferenceElements(DocumentReference element) throws IOException { 36309 composeDomainResourceElements(element); 36310 if (element.hasMasterIdentifier()) { 36311 composeIdentifier("masterIdentifier", element.getMasterIdentifier()); 36312 } 36313 if (element.hasIdentifier()) { 36314 for (Identifier e : element.getIdentifier()) 36315 composeIdentifier("identifier", e); 36316 } 36317 if (element.hasStatusElement()) 36318 composeEnumeration("status", element.getStatusElement(), new Enumerations.DocumentReferenceStatusEnumFactory()); 36319 if (element.hasDocStatusElement()) 36320 composeEnumeration("docStatus", element.getDocStatusElement(), 36321 new DocumentReference.ReferredDocumentStatusEnumFactory()); 36322 if (element.hasType()) { 36323 composeCodeableConcept("type", element.getType()); 36324 } 36325 if (element.hasCategory()) { 36326 for (CodeableConcept e : element.getCategory()) 36327 composeCodeableConcept("category", e); 36328 } 36329 if (element.hasSubject()) { 36330 composeReference("subject", element.getSubject()); 36331 } 36332 if (element.hasDateElement()) { 36333 composeInstant("date", element.getDateElement()); 36334 } 36335 if (element.hasAuthor()) { 36336 for (Reference e : element.getAuthor()) 36337 composeReference("author", e); 36338 } 36339 if (element.hasAuthenticator()) { 36340 composeReference("authenticator", element.getAuthenticator()); 36341 } 36342 if (element.hasCustodian()) { 36343 composeReference("custodian", element.getCustodian()); 36344 } 36345 if (element.hasRelatesTo()) { 36346 for (DocumentReference.DocumentReferenceRelatesToComponent e : element.getRelatesTo()) 36347 composeDocumentReferenceDocumentReferenceRelatesToComponent("relatesTo", e); 36348 } 36349 if (element.hasDescriptionElement()) { 36350 composeString("description", element.getDescriptionElement()); 36351 } 36352 if (element.hasSecurityLabel()) { 36353 for (CodeableConcept e : element.getSecurityLabel()) 36354 composeCodeableConcept("securityLabel", e); 36355 } 36356 if (element.hasContent()) { 36357 for (DocumentReference.DocumentReferenceContentComponent e : element.getContent()) 36358 composeDocumentReferenceDocumentReferenceContentComponent("content", e); 36359 } 36360 if (element.hasContext()) { 36361 composeDocumentReferenceDocumentReferenceContextComponent("context", element.getContext()); 36362 } 36363 } 36364 36365 protected void composeDocumentReferenceDocumentReferenceRelatesToComponent(String name, 36366 DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { 36367 if (element != null) { 36368 composeElementAttributes(element); 36369 xml.enter(FHIR_NS, name); 36370 composeDocumentReferenceDocumentReferenceRelatesToComponentElements(element); 36371 composeElementClose(element); 36372 xml.exit(FHIR_NS, name); 36373 } 36374 } 36375 36376 protected void composeDocumentReferenceDocumentReferenceRelatesToComponentElements( 36377 DocumentReference.DocumentReferenceRelatesToComponent element) throws IOException { 36378 composeBackboneElementElements(element); 36379 if (element.hasCodeElement()) 36380 composeEnumeration("code", element.getCodeElement(), new DocumentReference.DocumentRelationshipTypeEnumFactory()); 36381 if (element.hasTarget()) { 36382 composeReference("target", element.getTarget()); 36383 } 36384 } 36385 36386 protected void composeDocumentReferenceDocumentReferenceContentComponent(String name, 36387 DocumentReference.DocumentReferenceContentComponent element) throws IOException { 36388 if (element != null) { 36389 composeElementAttributes(element); 36390 xml.enter(FHIR_NS, name); 36391 composeDocumentReferenceDocumentReferenceContentComponentElements(element); 36392 composeElementClose(element); 36393 xml.exit(FHIR_NS, name); 36394 } 36395 } 36396 36397 protected void composeDocumentReferenceDocumentReferenceContentComponentElements( 36398 DocumentReference.DocumentReferenceContentComponent element) throws IOException { 36399 composeBackboneElementElements(element); 36400 if (element.hasAttachment()) { 36401 composeAttachment("attachment", element.getAttachment()); 36402 } 36403 if (element.hasFormat()) { 36404 composeCoding("format", element.getFormat()); 36405 } 36406 } 36407 36408 protected void composeDocumentReferenceDocumentReferenceContextComponent(String name, 36409 DocumentReference.DocumentReferenceContextComponent element) throws IOException { 36410 if (element != null) { 36411 composeElementAttributes(element); 36412 xml.enter(FHIR_NS, name); 36413 composeDocumentReferenceDocumentReferenceContextComponentElements(element); 36414 composeElementClose(element); 36415 xml.exit(FHIR_NS, name); 36416 } 36417 } 36418 36419 protected void composeDocumentReferenceDocumentReferenceContextComponentElements( 36420 DocumentReference.DocumentReferenceContextComponent element) throws IOException { 36421 composeBackboneElementElements(element); 36422 if (element.hasEncounter()) { 36423 for (Reference e : element.getEncounter()) 36424 composeReference("encounter", e); 36425 } 36426 if (element.hasEvent()) { 36427 for (CodeableConcept e : element.getEvent()) 36428 composeCodeableConcept("event", e); 36429 } 36430 if (element.hasPeriod()) { 36431 composePeriod("period", element.getPeriod()); 36432 } 36433 if (element.hasFacilityType()) { 36434 composeCodeableConcept("facilityType", element.getFacilityType()); 36435 } 36436 if (element.hasPracticeSetting()) { 36437 composeCodeableConcept("practiceSetting", element.getPracticeSetting()); 36438 } 36439 if (element.hasSourcePatientInfo()) { 36440 composeReference("sourcePatientInfo", element.getSourcePatientInfo()); 36441 } 36442 if (element.hasRelated()) { 36443 for (Reference e : element.getRelated()) 36444 composeReference("related", e); 36445 } 36446 } 36447 36448 protected void composeEffectEvidenceSynthesis(String name, EffectEvidenceSynthesis element) throws IOException { 36449 if (element != null) { 36450 composeDomainResourceAttributes(element); 36451 xml.enter(FHIR_NS, name); 36452 composeEffectEvidenceSynthesisElements(element); 36453 composeElementClose(element); 36454 xml.exit(FHIR_NS, name); 36455 } 36456 } 36457 36458 protected void composeEffectEvidenceSynthesisElements(EffectEvidenceSynthesis element) throws IOException { 36459 composeDomainResourceElements(element); 36460 if (element.hasUrlElement()) { 36461 composeUri("url", element.getUrlElement()); 36462 } 36463 if (element.hasIdentifier()) { 36464 for (Identifier e : element.getIdentifier()) 36465 composeIdentifier("identifier", e); 36466 } 36467 if (element.hasVersionElement()) { 36468 composeString("version", element.getVersionElement()); 36469 } 36470 if (element.hasNameElement()) { 36471 composeString("name", element.getNameElement()); 36472 } 36473 if (element.hasTitleElement()) { 36474 composeString("title", element.getTitleElement()); 36475 } 36476 if (element.hasStatusElement()) 36477 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 36478 if (element.hasDateElement()) { 36479 composeDateTime("date", element.getDateElement()); 36480 } 36481 if (element.hasPublisherElement()) { 36482 composeString("publisher", element.getPublisherElement()); 36483 } 36484 if (element.hasContact()) { 36485 for (ContactDetail e : element.getContact()) 36486 composeContactDetail("contact", e); 36487 } 36488 if (element.hasDescriptionElement()) { 36489 composeMarkdown("description", element.getDescriptionElement()); 36490 } 36491 if (element.hasNote()) { 36492 for (Annotation e : element.getNote()) 36493 composeAnnotation("note", e); 36494 } 36495 if (element.hasUseContext()) { 36496 for (UsageContext e : element.getUseContext()) 36497 composeUsageContext("useContext", e); 36498 } 36499 if (element.hasJurisdiction()) { 36500 for (CodeableConcept e : element.getJurisdiction()) 36501 composeCodeableConcept("jurisdiction", e); 36502 } 36503 if (element.hasCopyrightElement()) { 36504 composeMarkdown("copyright", element.getCopyrightElement()); 36505 } 36506 if (element.hasApprovalDateElement()) { 36507 composeDate("approvalDate", element.getApprovalDateElement()); 36508 } 36509 if (element.hasLastReviewDateElement()) { 36510 composeDate("lastReviewDate", element.getLastReviewDateElement()); 36511 } 36512 if (element.hasEffectivePeriod()) { 36513 composePeriod("effectivePeriod", element.getEffectivePeriod()); 36514 } 36515 if (element.hasTopic()) { 36516 for (CodeableConcept e : element.getTopic()) 36517 composeCodeableConcept("topic", e); 36518 } 36519 if (element.hasAuthor()) { 36520 for (ContactDetail e : element.getAuthor()) 36521 composeContactDetail("author", e); 36522 } 36523 if (element.hasEditor()) { 36524 for (ContactDetail e : element.getEditor()) 36525 composeContactDetail("editor", e); 36526 } 36527 if (element.hasReviewer()) { 36528 for (ContactDetail e : element.getReviewer()) 36529 composeContactDetail("reviewer", e); 36530 } 36531 if (element.hasEndorser()) { 36532 for (ContactDetail e : element.getEndorser()) 36533 composeContactDetail("endorser", e); 36534 } 36535 if (element.hasRelatedArtifact()) { 36536 for (RelatedArtifact e : element.getRelatedArtifact()) 36537 composeRelatedArtifact("relatedArtifact", e); 36538 } 36539 if (element.hasSynthesisType()) { 36540 composeCodeableConcept("synthesisType", element.getSynthesisType()); 36541 } 36542 if (element.hasStudyType()) { 36543 composeCodeableConcept("studyType", element.getStudyType()); 36544 } 36545 if (element.hasPopulation()) { 36546 composeReference("population", element.getPopulation()); 36547 } 36548 if (element.hasExposure()) { 36549 composeReference("exposure", element.getExposure()); 36550 } 36551 if (element.hasExposureAlternative()) { 36552 composeReference("exposureAlternative", element.getExposureAlternative()); 36553 } 36554 if (element.hasOutcome()) { 36555 composeReference("outcome", element.getOutcome()); 36556 } 36557 if (element.hasSampleSize()) { 36558 composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent("sampleSize", element.getSampleSize()); 36559 } 36560 if (element.hasResultsByExposure()) { 36561 for (EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent e : element.getResultsByExposure()) 36562 composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent("resultsByExposure", e); 36563 } 36564 if (element.hasEffectEstimate()) { 36565 for (EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent e : element.getEffectEstimate()) 36566 composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent("effectEstimate", e); 36567 } 36568 if (element.hasCertainty()) { 36569 for (EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent e : element.getCertainty()) 36570 composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent("certainty", e); 36571 } 36572 } 36573 36574 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponent(String name, 36575 EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent element) throws IOException { 36576 if (element != null) { 36577 composeElementAttributes(element); 36578 xml.enter(FHIR_NS, name); 36579 composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentElements(element); 36580 composeElementClose(element); 36581 xml.exit(FHIR_NS, name); 36582 } 36583 } 36584 36585 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisSampleSizeComponentElements( 36586 EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent element) throws IOException { 36587 composeBackboneElementElements(element); 36588 if (element.hasDescriptionElement()) { 36589 composeString("description", element.getDescriptionElement()); 36590 } 36591 if (element.hasNumberOfStudiesElement()) { 36592 composeInteger("numberOfStudies", element.getNumberOfStudiesElement()); 36593 } 36594 if (element.hasNumberOfParticipantsElement()) { 36595 composeInteger("numberOfParticipants", element.getNumberOfParticipantsElement()); 36596 } 36597 } 36598 36599 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponent(String name, 36600 EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent element) throws IOException { 36601 if (element != null) { 36602 composeElementAttributes(element); 36603 xml.enter(FHIR_NS, name); 36604 composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentElements(element); 36605 composeElementClose(element); 36606 xml.exit(FHIR_NS, name); 36607 } 36608 } 36609 36610 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisResultsByExposureComponentElements( 36611 EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent element) throws IOException { 36612 composeBackboneElementElements(element); 36613 if (element.hasDescriptionElement()) { 36614 composeString("description", element.getDescriptionElement()); 36615 } 36616 if (element.hasExposureStateElement()) 36617 composeEnumeration("exposureState", element.getExposureStateElement(), 36618 new EffectEvidenceSynthesis.ExposureStateEnumFactory()); 36619 if (element.hasVariantState()) { 36620 composeCodeableConcept("variantState", element.getVariantState()); 36621 } 36622 if (element.hasRiskEvidenceSynthesis()) { 36623 composeReference("riskEvidenceSynthesis", element.getRiskEvidenceSynthesis()); 36624 } 36625 } 36626 36627 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponent(String name, 36628 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent element) throws IOException { 36629 if (element != null) { 36630 composeElementAttributes(element); 36631 xml.enter(FHIR_NS, name); 36632 composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentElements(element); 36633 composeElementClose(element); 36634 xml.exit(FHIR_NS, name); 36635 } 36636 } 36637 36638 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimateComponentElements( 36639 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent element) throws IOException { 36640 composeBackboneElementElements(element); 36641 if (element.hasDescriptionElement()) { 36642 composeString("description", element.getDescriptionElement()); 36643 } 36644 if (element.hasType()) { 36645 composeCodeableConcept("type", element.getType()); 36646 } 36647 if (element.hasVariantState()) { 36648 composeCodeableConcept("variantState", element.getVariantState()); 36649 } 36650 if (element.hasValueElement()) { 36651 composeDecimal("value", element.getValueElement()); 36652 } 36653 if (element.hasUnitOfMeasure()) { 36654 composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure()); 36655 } 36656 if (element.hasPrecisionEstimate()) { 36657 for (EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent e : element 36658 .getPrecisionEstimate()) 36659 composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent( 36660 "precisionEstimate", e); 36661 } 36662 } 36663 36664 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent( 36665 String name, EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent element) 36666 throws IOException { 36667 if (element != null) { 36668 composeElementAttributes(element); 36669 xml.enter(FHIR_NS, name); 36670 composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentElements(element); 36671 composeElementClose(element); 36672 xml.exit(FHIR_NS, name); 36673 } 36674 } 36675 36676 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponentElements( 36677 EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent element) 36678 throws IOException { 36679 composeBackboneElementElements(element); 36680 if (element.hasType()) { 36681 composeCodeableConcept("type", element.getType()); 36682 } 36683 if (element.hasLevelElement()) { 36684 composeDecimal("level", element.getLevelElement()); 36685 } 36686 if (element.hasFromElement()) { 36687 composeDecimal("from", element.getFromElement()); 36688 } 36689 if (element.hasToElement()) { 36690 composeDecimal("to", element.getToElement()); 36691 } 36692 } 36693 36694 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponent(String name, 36695 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent element) throws IOException { 36696 if (element != null) { 36697 composeElementAttributes(element); 36698 xml.enter(FHIR_NS, name); 36699 composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentElements(element); 36700 composeElementClose(element); 36701 xml.exit(FHIR_NS, name); 36702 } 36703 } 36704 36705 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyComponentElements( 36706 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent element) throws IOException { 36707 composeBackboneElementElements(element); 36708 if (element.hasRating()) { 36709 for (CodeableConcept e : element.getRating()) 36710 composeCodeableConcept("rating", e); 36711 } 36712 if (element.hasNote()) { 36713 for (Annotation e : element.getNote()) 36714 composeAnnotation("note", e); 36715 } 36716 if (element.hasCertaintySubcomponent()) { 36717 for (EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent e : element 36718 .getCertaintySubcomponent()) 36719 composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent( 36720 "certaintySubcomponent", e); 36721 } 36722 } 36723 36724 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent( 36725 String name, EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) 36726 throws IOException { 36727 if (element != null) { 36728 composeElementAttributes(element); 36729 xml.enter(FHIR_NS, name); 36730 composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentElements(element); 36731 composeElementClose(element); 36732 xml.exit(FHIR_NS, name); 36733 } 36734 } 36735 36736 protected void composeEffectEvidenceSynthesisEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponentElements( 36737 EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) 36738 throws IOException { 36739 composeBackboneElementElements(element); 36740 if (element.hasType()) { 36741 composeCodeableConcept("type", element.getType()); 36742 } 36743 if (element.hasRating()) { 36744 for (CodeableConcept e : element.getRating()) 36745 composeCodeableConcept("rating", e); 36746 } 36747 if (element.hasNote()) { 36748 for (Annotation e : element.getNote()) 36749 composeAnnotation("note", e); 36750 } 36751 } 36752 36753 protected void composeEncounter(String name, Encounter element) throws IOException { 36754 if (element != null) { 36755 composeDomainResourceAttributes(element); 36756 xml.enter(FHIR_NS, name); 36757 composeEncounterElements(element); 36758 composeElementClose(element); 36759 xml.exit(FHIR_NS, name); 36760 } 36761 } 36762 36763 protected void composeEncounterElements(Encounter element) throws IOException { 36764 composeDomainResourceElements(element); 36765 if (element.hasIdentifier()) { 36766 for (Identifier e : element.getIdentifier()) 36767 composeIdentifier("identifier", e); 36768 } 36769 if (element.hasStatusElement()) 36770 composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); 36771 if (element.hasStatusHistory()) { 36772 for (Encounter.StatusHistoryComponent e : element.getStatusHistory()) 36773 composeEncounterStatusHistoryComponent("statusHistory", e); 36774 } 36775 if (element.hasClass_()) { 36776 composeCoding("class", element.getClass_()); 36777 } 36778 if (element.hasClassHistory()) { 36779 for (Encounter.ClassHistoryComponent e : element.getClassHistory()) 36780 composeEncounterClassHistoryComponent("classHistory", e); 36781 } 36782 if (element.hasType()) { 36783 for (CodeableConcept e : element.getType()) 36784 composeCodeableConcept("type", e); 36785 } 36786 if (element.hasServiceType()) { 36787 composeCodeableConcept("serviceType", element.getServiceType()); 36788 } 36789 if (element.hasPriority()) { 36790 composeCodeableConcept("priority", element.getPriority()); 36791 } 36792 if (element.hasSubject()) { 36793 composeReference("subject", element.getSubject()); 36794 } 36795 if (element.hasEpisodeOfCare()) { 36796 for (Reference e : element.getEpisodeOfCare()) 36797 composeReference("episodeOfCare", e); 36798 } 36799 if (element.hasBasedOn()) { 36800 for (Reference e : element.getBasedOn()) 36801 composeReference("basedOn", e); 36802 } 36803 if (element.hasParticipant()) { 36804 for (Encounter.EncounterParticipantComponent e : element.getParticipant()) 36805 composeEncounterEncounterParticipantComponent("participant", e); 36806 } 36807 if (element.hasAppointment()) { 36808 for (Reference e : element.getAppointment()) 36809 composeReference("appointment", e); 36810 } 36811 if (element.hasPeriod()) { 36812 composePeriod("period", element.getPeriod()); 36813 } 36814 if (element.hasLength()) { 36815 composeDuration("length", element.getLength()); 36816 } 36817 if (element.hasReasonCode()) { 36818 for (CodeableConcept e : element.getReasonCode()) 36819 composeCodeableConcept("reasonCode", e); 36820 } 36821 if (element.hasReasonReference()) { 36822 for (Reference e : element.getReasonReference()) 36823 composeReference("reasonReference", e); 36824 } 36825 if (element.hasDiagnosis()) { 36826 for (Encounter.DiagnosisComponent e : element.getDiagnosis()) 36827 composeEncounterDiagnosisComponent("diagnosis", e); 36828 } 36829 if (element.hasAccount()) { 36830 for (Reference e : element.getAccount()) 36831 composeReference("account", e); 36832 } 36833 if (element.hasHospitalization()) { 36834 composeEncounterEncounterHospitalizationComponent("hospitalization", element.getHospitalization()); 36835 } 36836 if (element.hasLocation()) { 36837 for (Encounter.EncounterLocationComponent e : element.getLocation()) 36838 composeEncounterEncounterLocationComponent("location", e); 36839 } 36840 if (element.hasServiceProvider()) { 36841 composeReference("serviceProvider", element.getServiceProvider()); 36842 } 36843 if (element.hasPartOf()) { 36844 composeReference("partOf", element.getPartOf()); 36845 } 36846 } 36847 36848 protected void composeEncounterStatusHistoryComponent(String name, Encounter.StatusHistoryComponent element) 36849 throws IOException { 36850 if (element != null) { 36851 composeElementAttributes(element); 36852 xml.enter(FHIR_NS, name); 36853 composeEncounterStatusHistoryComponentElements(element); 36854 composeElementClose(element); 36855 xml.exit(FHIR_NS, name); 36856 } 36857 } 36858 36859 protected void composeEncounterStatusHistoryComponentElements(Encounter.StatusHistoryComponent element) 36860 throws IOException { 36861 composeBackboneElementElements(element); 36862 if (element.hasStatusElement()) 36863 composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterStatusEnumFactory()); 36864 if (element.hasPeriod()) { 36865 composePeriod("period", element.getPeriod()); 36866 } 36867 } 36868 36869 protected void composeEncounterClassHistoryComponent(String name, Encounter.ClassHistoryComponent element) 36870 throws IOException { 36871 if (element != null) { 36872 composeElementAttributes(element); 36873 xml.enter(FHIR_NS, name); 36874 composeEncounterClassHistoryComponentElements(element); 36875 composeElementClose(element); 36876 xml.exit(FHIR_NS, name); 36877 } 36878 } 36879 36880 protected void composeEncounterClassHistoryComponentElements(Encounter.ClassHistoryComponent element) 36881 throws IOException { 36882 composeBackboneElementElements(element); 36883 if (element.hasClass_()) { 36884 composeCoding("class", element.getClass_()); 36885 } 36886 if (element.hasPeriod()) { 36887 composePeriod("period", element.getPeriod()); 36888 } 36889 } 36890 36891 protected void composeEncounterEncounterParticipantComponent(String name, 36892 Encounter.EncounterParticipantComponent element) throws IOException { 36893 if (element != null) { 36894 composeElementAttributes(element); 36895 xml.enter(FHIR_NS, name); 36896 composeEncounterEncounterParticipantComponentElements(element); 36897 composeElementClose(element); 36898 xml.exit(FHIR_NS, name); 36899 } 36900 } 36901 36902 protected void composeEncounterEncounterParticipantComponentElements(Encounter.EncounterParticipantComponent element) 36903 throws IOException { 36904 composeBackboneElementElements(element); 36905 if (element.hasType()) { 36906 for (CodeableConcept e : element.getType()) 36907 composeCodeableConcept("type", e); 36908 } 36909 if (element.hasPeriod()) { 36910 composePeriod("period", element.getPeriod()); 36911 } 36912 if (element.hasIndividual()) { 36913 composeReference("individual", element.getIndividual()); 36914 } 36915 } 36916 36917 protected void composeEncounterDiagnosisComponent(String name, Encounter.DiagnosisComponent element) 36918 throws IOException { 36919 if (element != null) { 36920 composeElementAttributes(element); 36921 xml.enter(FHIR_NS, name); 36922 composeEncounterDiagnosisComponentElements(element); 36923 composeElementClose(element); 36924 xml.exit(FHIR_NS, name); 36925 } 36926 } 36927 36928 protected void composeEncounterDiagnosisComponentElements(Encounter.DiagnosisComponent element) throws IOException { 36929 composeBackboneElementElements(element); 36930 if (element.hasCondition()) { 36931 composeReference("condition", element.getCondition()); 36932 } 36933 if (element.hasUse()) { 36934 composeCodeableConcept("use", element.getUse()); 36935 } 36936 if (element.hasRankElement()) { 36937 composePositiveInt("rank", element.getRankElement()); 36938 } 36939 } 36940 36941 protected void composeEncounterEncounterHospitalizationComponent(String name, 36942 Encounter.EncounterHospitalizationComponent element) throws IOException { 36943 if (element != null) { 36944 composeElementAttributes(element); 36945 xml.enter(FHIR_NS, name); 36946 composeEncounterEncounterHospitalizationComponentElements(element); 36947 composeElementClose(element); 36948 xml.exit(FHIR_NS, name); 36949 } 36950 } 36951 36952 protected void composeEncounterEncounterHospitalizationComponentElements( 36953 Encounter.EncounterHospitalizationComponent element) throws IOException { 36954 composeBackboneElementElements(element); 36955 if (element.hasPreAdmissionIdentifier()) { 36956 composeIdentifier("preAdmissionIdentifier", element.getPreAdmissionIdentifier()); 36957 } 36958 if (element.hasOrigin()) { 36959 composeReference("origin", element.getOrigin()); 36960 } 36961 if (element.hasAdmitSource()) { 36962 composeCodeableConcept("admitSource", element.getAdmitSource()); 36963 } 36964 if (element.hasReAdmission()) { 36965 composeCodeableConcept("reAdmission", element.getReAdmission()); 36966 } 36967 if (element.hasDietPreference()) { 36968 for (CodeableConcept e : element.getDietPreference()) 36969 composeCodeableConcept("dietPreference", e); 36970 } 36971 if (element.hasSpecialCourtesy()) { 36972 for (CodeableConcept e : element.getSpecialCourtesy()) 36973 composeCodeableConcept("specialCourtesy", e); 36974 } 36975 if (element.hasSpecialArrangement()) { 36976 for (CodeableConcept e : element.getSpecialArrangement()) 36977 composeCodeableConcept("specialArrangement", e); 36978 } 36979 if (element.hasDestination()) { 36980 composeReference("destination", element.getDestination()); 36981 } 36982 if (element.hasDischargeDisposition()) { 36983 composeCodeableConcept("dischargeDisposition", element.getDischargeDisposition()); 36984 } 36985 } 36986 36987 protected void composeEncounterEncounterLocationComponent(String name, Encounter.EncounterLocationComponent element) 36988 throws IOException { 36989 if (element != null) { 36990 composeElementAttributes(element); 36991 xml.enter(FHIR_NS, name); 36992 composeEncounterEncounterLocationComponentElements(element); 36993 composeElementClose(element); 36994 xml.exit(FHIR_NS, name); 36995 } 36996 } 36997 36998 protected void composeEncounterEncounterLocationComponentElements(Encounter.EncounterLocationComponent element) 36999 throws IOException { 37000 composeBackboneElementElements(element); 37001 if (element.hasLocation()) { 37002 composeReference("location", element.getLocation()); 37003 } 37004 if (element.hasStatusElement()) 37005 composeEnumeration("status", element.getStatusElement(), new Encounter.EncounterLocationStatusEnumFactory()); 37006 if (element.hasPhysicalType()) { 37007 composeCodeableConcept("physicalType", element.getPhysicalType()); 37008 } 37009 if (element.hasPeriod()) { 37010 composePeriod("period", element.getPeriod()); 37011 } 37012 } 37013 37014 protected void composeEndpoint(String name, Endpoint element) throws IOException { 37015 if (element != null) { 37016 composeDomainResourceAttributes(element); 37017 xml.enter(FHIR_NS, name); 37018 composeEndpointElements(element); 37019 composeElementClose(element); 37020 xml.exit(FHIR_NS, name); 37021 } 37022 } 37023 37024 protected void composeEndpointElements(Endpoint element) throws IOException { 37025 composeDomainResourceElements(element); 37026 if (element.hasIdentifier()) { 37027 for (Identifier e : element.getIdentifier()) 37028 composeIdentifier("identifier", e); 37029 } 37030 if (element.hasStatusElement()) 37031 composeEnumeration("status", element.getStatusElement(), new Endpoint.EndpointStatusEnumFactory()); 37032 if (element.hasConnectionType()) { 37033 composeCoding("connectionType", element.getConnectionType()); 37034 } 37035 if (element.hasNameElement()) { 37036 composeString("name", element.getNameElement()); 37037 } 37038 if (element.hasManagingOrganization()) { 37039 composeReference("managingOrganization", element.getManagingOrganization()); 37040 } 37041 if (element.hasContact()) { 37042 for (ContactPoint e : element.getContact()) 37043 composeContactPoint("contact", e); 37044 } 37045 if (element.hasPeriod()) { 37046 composePeriod("period", element.getPeriod()); 37047 } 37048 if (element.hasPayloadType()) { 37049 for (CodeableConcept e : element.getPayloadType()) 37050 composeCodeableConcept("payloadType", e); 37051 } 37052 if (element.hasPayloadMimeType()) { 37053 for (CodeType e : element.getPayloadMimeType()) 37054 composeCode("payloadMimeType", e); 37055 } 37056 if (element.hasAddressElement()) { 37057 composeUrl("address", element.getAddressElement()); 37058 } 37059 if (element.hasHeader()) { 37060 for (StringType e : element.getHeader()) 37061 composeString("header", e); 37062 } 37063 } 37064 37065 protected void composeEnrollmentRequest(String name, EnrollmentRequest element) throws IOException { 37066 if (element != null) { 37067 composeDomainResourceAttributes(element); 37068 xml.enter(FHIR_NS, name); 37069 composeEnrollmentRequestElements(element); 37070 composeElementClose(element); 37071 xml.exit(FHIR_NS, name); 37072 } 37073 } 37074 37075 protected void composeEnrollmentRequestElements(EnrollmentRequest element) throws IOException { 37076 composeDomainResourceElements(element); 37077 if (element.hasIdentifier()) { 37078 for (Identifier e : element.getIdentifier()) 37079 composeIdentifier("identifier", e); 37080 } 37081 if (element.hasStatusElement()) 37082 composeEnumeration("status", element.getStatusElement(), 37083 new EnrollmentRequest.EnrollmentRequestStatusEnumFactory()); 37084 if (element.hasCreatedElement()) { 37085 composeDateTime("created", element.getCreatedElement()); 37086 } 37087 if (element.hasInsurer()) { 37088 composeReference("insurer", element.getInsurer()); 37089 } 37090 if (element.hasProvider()) { 37091 composeReference("provider", element.getProvider()); 37092 } 37093 if (element.hasCandidate()) { 37094 composeReference("candidate", element.getCandidate()); 37095 } 37096 if (element.hasCoverage()) { 37097 composeReference("coverage", element.getCoverage()); 37098 } 37099 } 37100 37101 protected void composeEnrollmentResponse(String name, EnrollmentResponse element) throws IOException { 37102 if (element != null) { 37103 composeDomainResourceAttributes(element); 37104 xml.enter(FHIR_NS, name); 37105 composeEnrollmentResponseElements(element); 37106 composeElementClose(element); 37107 xml.exit(FHIR_NS, name); 37108 } 37109 } 37110 37111 protected void composeEnrollmentResponseElements(EnrollmentResponse element) throws IOException { 37112 composeDomainResourceElements(element); 37113 if (element.hasIdentifier()) { 37114 for (Identifier e : element.getIdentifier()) 37115 composeIdentifier("identifier", e); 37116 } 37117 if (element.hasStatusElement()) 37118 composeEnumeration("status", element.getStatusElement(), 37119 new EnrollmentResponse.EnrollmentResponseStatusEnumFactory()); 37120 if (element.hasRequest()) { 37121 composeReference("request", element.getRequest()); 37122 } 37123 if (element.hasOutcomeElement()) 37124 composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); 37125 if (element.hasDispositionElement()) { 37126 composeString("disposition", element.getDispositionElement()); 37127 } 37128 if (element.hasCreatedElement()) { 37129 composeDateTime("created", element.getCreatedElement()); 37130 } 37131 if (element.hasOrganization()) { 37132 composeReference("organization", element.getOrganization()); 37133 } 37134 if (element.hasRequestProvider()) { 37135 composeReference("requestProvider", element.getRequestProvider()); 37136 } 37137 } 37138 37139 protected void composeEpisodeOfCare(String name, EpisodeOfCare element) throws IOException { 37140 if (element != null) { 37141 composeDomainResourceAttributes(element); 37142 xml.enter(FHIR_NS, name); 37143 composeEpisodeOfCareElements(element); 37144 composeElementClose(element); 37145 xml.exit(FHIR_NS, name); 37146 } 37147 } 37148 37149 protected void composeEpisodeOfCareElements(EpisodeOfCare element) throws IOException { 37150 composeDomainResourceElements(element); 37151 if (element.hasIdentifier()) { 37152 for (Identifier e : element.getIdentifier()) 37153 composeIdentifier("identifier", e); 37154 } 37155 if (element.hasStatusElement()) 37156 composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); 37157 if (element.hasStatusHistory()) { 37158 for (EpisodeOfCare.EpisodeOfCareStatusHistoryComponent e : element.getStatusHistory()) 37159 composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent("statusHistory", e); 37160 } 37161 if (element.hasType()) { 37162 for (CodeableConcept e : element.getType()) 37163 composeCodeableConcept("type", e); 37164 } 37165 if (element.hasDiagnosis()) { 37166 for (EpisodeOfCare.DiagnosisComponent e : element.getDiagnosis()) 37167 composeEpisodeOfCareDiagnosisComponent("diagnosis", e); 37168 } 37169 if (element.hasPatient()) { 37170 composeReference("patient", element.getPatient()); 37171 } 37172 if (element.hasManagingOrganization()) { 37173 composeReference("managingOrganization", element.getManagingOrganization()); 37174 } 37175 if (element.hasPeriod()) { 37176 composePeriod("period", element.getPeriod()); 37177 } 37178 if (element.hasReferralRequest()) { 37179 for (Reference e : element.getReferralRequest()) 37180 composeReference("referralRequest", e); 37181 } 37182 if (element.hasCareManager()) { 37183 composeReference("careManager", element.getCareManager()); 37184 } 37185 if (element.hasTeam()) { 37186 for (Reference e : element.getTeam()) 37187 composeReference("team", e); 37188 } 37189 if (element.hasAccount()) { 37190 for (Reference e : element.getAccount()) 37191 composeReference("account", e); 37192 } 37193 } 37194 37195 protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(String name, 37196 EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { 37197 if (element != null) { 37198 composeElementAttributes(element); 37199 xml.enter(FHIR_NS, name); 37200 composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements(element); 37201 composeElementClose(element); 37202 xml.exit(FHIR_NS, name); 37203 } 37204 } 37205 37206 protected void composeEpisodeOfCareEpisodeOfCareStatusHistoryComponentElements( 37207 EpisodeOfCare.EpisodeOfCareStatusHistoryComponent element) throws IOException { 37208 composeBackboneElementElements(element); 37209 if (element.hasStatusElement()) 37210 composeEnumeration("status", element.getStatusElement(), new EpisodeOfCare.EpisodeOfCareStatusEnumFactory()); 37211 if (element.hasPeriod()) { 37212 composePeriod("period", element.getPeriod()); 37213 } 37214 } 37215 37216 protected void composeEpisodeOfCareDiagnosisComponent(String name, EpisodeOfCare.DiagnosisComponent element) 37217 throws IOException { 37218 if (element != null) { 37219 composeElementAttributes(element); 37220 xml.enter(FHIR_NS, name); 37221 composeEpisodeOfCareDiagnosisComponentElements(element); 37222 composeElementClose(element); 37223 xml.exit(FHIR_NS, name); 37224 } 37225 } 37226 37227 protected void composeEpisodeOfCareDiagnosisComponentElements(EpisodeOfCare.DiagnosisComponent element) 37228 throws IOException { 37229 composeBackboneElementElements(element); 37230 if (element.hasCondition()) { 37231 composeReference("condition", element.getCondition()); 37232 } 37233 if (element.hasRole()) { 37234 composeCodeableConcept("role", element.getRole()); 37235 } 37236 if (element.hasRankElement()) { 37237 composePositiveInt("rank", element.getRankElement()); 37238 } 37239 } 37240 37241 protected void composeEventDefinition(String name, EventDefinition element) throws IOException { 37242 if (element != null) { 37243 composeDomainResourceAttributes(element); 37244 xml.enter(FHIR_NS, name); 37245 composeEventDefinitionElements(element); 37246 composeElementClose(element); 37247 xml.exit(FHIR_NS, name); 37248 } 37249 } 37250 37251 protected void composeEventDefinitionElements(EventDefinition element) throws IOException { 37252 composeDomainResourceElements(element); 37253 if (element.hasUrlElement()) { 37254 composeUri("url", element.getUrlElement()); 37255 } 37256 if (element.hasIdentifier()) { 37257 for (Identifier e : element.getIdentifier()) 37258 composeIdentifier("identifier", e); 37259 } 37260 if (element.hasVersionElement()) { 37261 composeString("version", element.getVersionElement()); 37262 } 37263 if (element.hasNameElement()) { 37264 composeString("name", element.getNameElement()); 37265 } 37266 if (element.hasTitleElement()) { 37267 composeString("title", element.getTitleElement()); 37268 } 37269 if (element.hasSubtitleElement()) { 37270 composeString("subtitle", element.getSubtitleElement()); 37271 } 37272 if (element.hasStatusElement()) 37273 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 37274 if (element.hasExperimentalElement()) { 37275 composeBoolean("experimental", element.getExperimentalElement()); 37276 } 37277 if (element.hasSubject()) { 37278 composeType("subject", element.getSubject()); 37279 } 37280 if (element.hasDateElement()) { 37281 composeDateTime("date", element.getDateElement()); 37282 } 37283 if (element.hasPublisherElement()) { 37284 composeString("publisher", element.getPublisherElement()); 37285 } 37286 if (element.hasContact()) { 37287 for (ContactDetail e : element.getContact()) 37288 composeContactDetail("contact", e); 37289 } 37290 if (element.hasDescriptionElement()) { 37291 composeMarkdown("description", element.getDescriptionElement()); 37292 } 37293 if (element.hasUseContext()) { 37294 for (UsageContext e : element.getUseContext()) 37295 composeUsageContext("useContext", e); 37296 } 37297 if (element.hasJurisdiction()) { 37298 for (CodeableConcept e : element.getJurisdiction()) 37299 composeCodeableConcept("jurisdiction", e); 37300 } 37301 if (element.hasPurposeElement()) { 37302 composeMarkdown("purpose", element.getPurposeElement()); 37303 } 37304 if (element.hasUsageElement()) { 37305 composeString("usage", element.getUsageElement()); 37306 } 37307 if (element.hasCopyrightElement()) { 37308 composeMarkdown("copyright", element.getCopyrightElement()); 37309 } 37310 if (element.hasApprovalDateElement()) { 37311 composeDate("approvalDate", element.getApprovalDateElement()); 37312 } 37313 if (element.hasLastReviewDateElement()) { 37314 composeDate("lastReviewDate", element.getLastReviewDateElement()); 37315 } 37316 if (element.hasEffectivePeriod()) { 37317 composePeriod("effectivePeriod", element.getEffectivePeriod()); 37318 } 37319 if (element.hasTopic()) { 37320 for (CodeableConcept e : element.getTopic()) 37321 composeCodeableConcept("topic", e); 37322 } 37323 if (element.hasAuthor()) { 37324 for (ContactDetail e : element.getAuthor()) 37325 composeContactDetail("author", e); 37326 } 37327 if (element.hasEditor()) { 37328 for (ContactDetail e : element.getEditor()) 37329 composeContactDetail("editor", e); 37330 } 37331 if (element.hasReviewer()) { 37332 for (ContactDetail e : element.getReviewer()) 37333 composeContactDetail("reviewer", e); 37334 } 37335 if (element.hasEndorser()) { 37336 for (ContactDetail e : element.getEndorser()) 37337 composeContactDetail("endorser", e); 37338 } 37339 if (element.hasRelatedArtifact()) { 37340 for (RelatedArtifact e : element.getRelatedArtifact()) 37341 composeRelatedArtifact("relatedArtifact", e); 37342 } 37343 if (element.hasTrigger()) { 37344 for (TriggerDefinition e : element.getTrigger()) 37345 composeTriggerDefinition("trigger", e); 37346 } 37347 } 37348 37349 protected void composeEvidence(String name, Evidence element) throws IOException { 37350 if (element != null) { 37351 composeDomainResourceAttributes(element); 37352 xml.enter(FHIR_NS, name); 37353 composeEvidenceElements(element); 37354 composeElementClose(element); 37355 xml.exit(FHIR_NS, name); 37356 } 37357 } 37358 37359 protected void composeEvidenceElements(Evidence element) throws IOException { 37360 composeDomainResourceElements(element); 37361 if (element.hasUrlElement()) { 37362 composeUri("url", element.getUrlElement()); 37363 } 37364 if (element.hasIdentifier()) { 37365 for (Identifier e : element.getIdentifier()) 37366 composeIdentifier("identifier", e); 37367 } 37368 if (element.hasVersionElement()) { 37369 composeString("version", element.getVersionElement()); 37370 } 37371 if (element.hasNameElement()) { 37372 composeString("name", element.getNameElement()); 37373 } 37374 if (element.hasTitleElement()) { 37375 composeString("title", element.getTitleElement()); 37376 } 37377 if (element.hasShortTitleElement()) { 37378 composeString("shortTitle", element.getShortTitleElement()); 37379 } 37380 if (element.hasSubtitleElement()) { 37381 composeString("subtitle", element.getSubtitleElement()); 37382 } 37383 if (element.hasStatusElement()) 37384 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 37385 if (element.hasDateElement()) { 37386 composeDateTime("date", element.getDateElement()); 37387 } 37388 if (element.hasPublisherElement()) { 37389 composeString("publisher", element.getPublisherElement()); 37390 } 37391 if (element.hasContact()) { 37392 for (ContactDetail e : element.getContact()) 37393 composeContactDetail("contact", e); 37394 } 37395 if (element.hasDescriptionElement()) { 37396 composeMarkdown("description", element.getDescriptionElement()); 37397 } 37398 if (element.hasNote()) { 37399 for (Annotation e : element.getNote()) 37400 composeAnnotation("note", e); 37401 } 37402 if (element.hasUseContext()) { 37403 for (UsageContext e : element.getUseContext()) 37404 composeUsageContext("useContext", e); 37405 } 37406 if (element.hasJurisdiction()) { 37407 for (CodeableConcept e : element.getJurisdiction()) 37408 composeCodeableConcept("jurisdiction", e); 37409 } 37410 if (element.hasCopyrightElement()) { 37411 composeMarkdown("copyright", element.getCopyrightElement()); 37412 } 37413 if (element.hasApprovalDateElement()) { 37414 composeDate("approvalDate", element.getApprovalDateElement()); 37415 } 37416 if (element.hasLastReviewDateElement()) { 37417 composeDate("lastReviewDate", element.getLastReviewDateElement()); 37418 } 37419 if (element.hasEffectivePeriod()) { 37420 composePeriod("effectivePeriod", element.getEffectivePeriod()); 37421 } 37422 if (element.hasTopic()) { 37423 for (CodeableConcept e : element.getTopic()) 37424 composeCodeableConcept("topic", e); 37425 } 37426 if (element.hasAuthor()) { 37427 for (ContactDetail e : element.getAuthor()) 37428 composeContactDetail("author", e); 37429 } 37430 if (element.hasEditor()) { 37431 for (ContactDetail e : element.getEditor()) 37432 composeContactDetail("editor", e); 37433 } 37434 if (element.hasReviewer()) { 37435 for (ContactDetail e : element.getReviewer()) 37436 composeContactDetail("reviewer", e); 37437 } 37438 if (element.hasEndorser()) { 37439 for (ContactDetail e : element.getEndorser()) 37440 composeContactDetail("endorser", e); 37441 } 37442 if (element.hasRelatedArtifact()) { 37443 for (RelatedArtifact e : element.getRelatedArtifact()) 37444 composeRelatedArtifact("relatedArtifact", e); 37445 } 37446 if (element.hasExposureBackground()) { 37447 composeReference("exposureBackground", element.getExposureBackground()); 37448 } 37449 if (element.hasExposureVariant()) { 37450 for (Reference e : element.getExposureVariant()) 37451 composeReference("exposureVariant", e); 37452 } 37453 if (element.hasOutcome()) { 37454 for (Reference e : element.getOutcome()) 37455 composeReference("outcome", e); 37456 } 37457 } 37458 37459 protected void composeEvidenceVariable(String name, EvidenceVariable element) throws IOException { 37460 if (element != null) { 37461 composeDomainResourceAttributes(element); 37462 xml.enter(FHIR_NS, name); 37463 composeEvidenceVariableElements(element); 37464 composeElementClose(element); 37465 xml.exit(FHIR_NS, name); 37466 } 37467 } 37468 37469 protected void composeEvidenceVariableElements(EvidenceVariable element) throws IOException { 37470 composeDomainResourceElements(element); 37471 if (element.hasUrlElement()) { 37472 composeUri("url", element.getUrlElement()); 37473 } 37474 if (element.hasIdentifier()) { 37475 for (Identifier e : element.getIdentifier()) 37476 composeIdentifier("identifier", e); 37477 } 37478 if (element.hasVersionElement()) { 37479 composeString("version", element.getVersionElement()); 37480 } 37481 if (element.hasNameElement()) { 37482 composeString("name", element.getNameElement()); 37483 } 37484 if (element.hasTitleElement()) { 37485 composeString("title", element.getTitleElement()); 37486 } 37487 if (element.hasShortTitleElement()) { 37488 composeString("shortTitle", element.getShortTitleElement()); 37489 } 37490 if (element.hasSubtitleElement()) { 37491 composeString("subtitle", element.getSubtitleElement()); 37492 } 37493 if (element.hasStatusElement()) 37494 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 37495 if (element.hasDateElement()) { 37496 composeDateTime("date", element.getDateElement()); 37497 } 37498 if (element.hasPublisherElement()) { 37499 composeString("publisher", element.getPublisherElement()); 37500 } 37501 if (element.hasContact()) { 37502 for (ContactDetail e : element.getContact()) 37503 composeContactDetail("contact", e); 37504 } 37505 if (element.hasDescriptionElement()) { 37506 composeMarkdown("description", element.getDescriptionElement()); 37507 } 37508 if (element.hasNote()) { 37509 for (Annotation e : element.getNote()) 37510 composeAnnotation("note", e); 37511 } 37512 if (element.hasUseContext()) { 37513 for (UsageContext e : element.getUseContext()) 37514 composeUsageContext("useContext", e); 37515 } 37516 if (element.hasJurisdiction()) { 37517 for (CodeableConcept e : element.getJurisdiction()) 37518 composeCodeableConcept("jurisdiction", e); 37519 } 37520 if (element.hasCopyrightElement()) { 37521 composeMarkdown("copyright", element.getCopyrightElement()); 37522 } 37523 if (element.hasApprovalDateElement()) { 37524 composeDate("approvalDate", element.getApprovalDateElement()); 37525 } 37526 if (element.hasLastReviewDateElement()) { 37527 composeDate("lastReviewDate", element.getLastReviewDateElement()); 37528 } 37529 if (element.hasEffectivePeriod()) { 37530 composePeriod("effectivePeriod", element.getEffectivePeriod()); 37531 } 37532 if (element.hasTopic()) { 37533 for (CodeableConcept e : element.getTopic()) 37534 composeCodeableConcept("topic", e); 37535 } 37536 if (element.hasAuthor()) { 37537 for (ContactDetail e : element.getAuthor()) 37538 composeContactDetail("author", e); 37539 } 37540 if (element.hasEditor()) { 37541 for (ContactDetail e : element.getEditor()) 37542 composeContactDetail("editor", e); 37543 } 37544 if (element.hasReviewer()) { 37545 for (ContactDetail e : element.getReviewer()) 37546 composeContactDetail("reviewer", e); 37547 } 37548 if (element.hasEndorser()) { 37549 for (ContactDetail e : element.getEndorser()) 37550 composeContactDetail("endorser", e); 37551 } 37552 if (element.hasRelatedArtifact()) { 37553 for (RelatedArtifact e : element.getRelatedArtifact()) 37554 composeRelatedArtifact("relatedArtifact", e); 37555 } 37556 if (element.hasTypeElement()) 37557 composeEnumeration("type", element.getTypeElement(), new EvidenceVariable.EvidenceVariableTypeEnumFactory()); 37558 if (element.hasCharacteristic()) { 37559 for (EvidenceVariable.EvidenceVariableCharacteristicComponent e : element.getCharacteristic()) 37560 composeEvidenceVariableEvidenceVariableCharacteristicComponent("characteristic", e); 37561 } 37562 } 37563 37564 protected void composeEvidenceVariableEvidenceVariableCharacteristicComponent(String name, 37565 EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException { 37566 if (element != null) { 37567 composeElementAttributes(element); 37568 xml.enter(FHIR_NS, name); 37569 composeEvidenceVariableEvidenceVariableCharacteristicComponentElements(element); 37570 composeElementClose(element); 37571 xml.exit(FHIR_NS, name); 37572 } 37573 } 37574 37575 protected void composeEvidenceVariableEvidenceVariableCharacteristicComponentElements( 37576 EvidenceVariable.EvidenceVariableCharacteristicComponent element) throws IOException { 37577 composeBackboneElementElements(element); 37578 if (element.hasDescriptionElement()) { 37579 composeString("description", element.getDescriptionElement()); 37580 } 37581 if (element.hasDefinition()) { 37582 composeType("definition", element.getDefinition()); 37583 } 37584 if (element.hasUsageContext()) { 37585 for (UsageContext e : element.getUsageContext()) 37586 composeUsageContext("usageContext", e); 37587 } 37588 if (element.hasExcludeElement()) { 37589 composeBoolean("exclude", element.getExcludeElement()); 37590 } 37591 if (element.hasParticipantEffective()) { 37592 composeType("participantEffective", element.getParticipantEffective()); 37593 } 37594 if (element.hasTimeFromStart()) { 37595 composeDuration("timeFromStart", element.getTimeFromStart()); 37596 } 37597 if (element.hasGroupMeasureElement()) 37598 composeEnumeration("groupMeasure", element.getGroupMeasureElement(), 37599 new EvidenceVariable.GroupMeasureEnumFactory()); 37600 } 37601 37602 protected void composeExampleScenario(String name, ExampleScenario element) throws IOException { 37603 if (element != null) { 37604 composeDomainResourceAttributes(element); 37605 xml.enter(FHIR_NS, name); 37606 composeExampleScenarioElements(element); 37607 composeElementClose(element); 37608 xml.exit(FHIR_NS, name); 37609 } 37610 } 37611 37612 protected void composeExampleScenarioElements(ExampleScenario element) throws IOException { 37613 composeDomainResourceElements(element); 37614 if (element.hasUrlElement()) { 37615 composeUri("url", element.getUrlElement()); 37616 } 37617 if (element.hasIdentifier()) { 37618 for (Identifier e : element.getIdentifier()) 37619 composeIdentifier("identifier", e); 37620 } 37621 if (element.hasVersionElement()) { 37622 composeString("version", element.getVersionElement()); 37623 } 37624 if (element.hasNameElement()) { 37625 composeString("name", element.getNameElement()); 37626 } 37627 if (element.hasStatusElement()) 37628 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 37629 if (element.hasExperimentalElement()) { 37630 composeBoolean("experimental", element.getExperimentalElement()); 37631 } 37632 if (element.hasDateElement()) { 37633 composeDateTime("date", element.getDateElement()); 37634 } 37635 if (element.hasPublisherElement()) { 37636 composeString("publisher", element.getPublisherElement()); 37637 } 37638 if (element.hasContact()) { 37639 for (ContactDetail e : element.getContact()) 37640 composeContactDetail("contact", e); 37641 } 37642 if (element.hasUseContext()) { 37643 for (UsageContext e : element.getUseContext()) 37644 composeUsageContext("useContext", e); 37645 } 37646 if (element.hasJurisdiction()) { 37647 for (CodeableConcept e : element.getJurisdiction()) 37648 composeCodeableConcept("jurisdiction", e); 37649 } 37650 if (element.hasCopyrightElement()) { 37651 composeMarkdown("copyright", element.getCopyrightElement()); 37652 } 37653 if (element.hasPurposeElement()) { 37654 composeMarkdown("purpose", element.getPurposeElement()); 37655 } 37656 if (element.hasActor()) { 37657 for (ExampleScenario.ExampleScenarioActorComponent e : element.getActor()) 37658 composeExampleScenarioExampleScenarioActorComponent("actor", e); 37659 } 37660 if (element.hasInstance()) { 37661 for (ExampleScenario.ExampleScenarioInstanceComponent e : element.getInstance()) 37662 composeExampleScenarioExampleScenarioInstanceComponent("instance", e); 37663 } 37664 if (element.hasProcess()) { 37665 for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess()) 37666 composeExampleScenarioExampleScenarioProcessComponent("process", e); 37667 } 37668 if (element.hasWorkflow()) { 37669 for (CanonicalType e : element.getWorkflow()) 37670 composeCanonical("workflow", e); 37671 } 37672 } 37673 37674 protected void composeExampleScenarioExampleScenarioActorComponent(String name, 37675 ExampleScenario.ExampleScenarioActorComponent element) throws IOException { 37676 if (element != null) { 37677 composeElementAttributes(element); 37678 xml.enter(FHIR_NS, name); 37679 composeExampleScenarioExampleScenarioActorComponentElements(element); 37680 composeElementClose(element); 37681 xml.exit(FHIR_NS, name); 37682 } 37683 } 37684 37685 protected void composeExampleScenarioExampleScenarioActorComponentElements( 37686 ExampleScenario.ExampleScenarioActorComponent element) throws IOException { 37687 composeBackboneElementElements(element); 37688 if (element.hasActorIdElement()) { 37689 composeString("actorId", element.getActorIdElement()); 37690 } 37691 if (element.hasTypeElement()) 37692 composeEnumeration("type", element.getTypeElement(), new ExampleScenario.ExampleScenarioActorTypeEnumFactory()); 37693 if (element.hasNameElement()) { 37694 composeString("name", element.getNameElement()); 37695 } 37696 if (element.hasDescriptionElement()) { 37697 composeMarkdown("description", element.getDescriptionElement()); 37698 } 37699 } 37700 37701 protected void composeExampleScenarioExampleScenarioInstanceComponent(String name, 37702 ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { 37703 if (element != null) { 37704 composeElementAttributes(element); 37705 xml.enter(FHIR_NS, name); 37706 composeExampleScenarioExampleScenarioInstanceComponentElements(element); 37707 composeElementClose(element); 37708 xml.exit(FHIR_NS, name); 37709 } 37710 } 37711 37712 protected void composeExampleScenarioExampleScenarioInstanceComponentElements( 37713 ExampleScenario.ExampleScenarioInstanceComponent element) throws IOException { 37714 composeBackboneElementElements(element); 37715 if (element.hasResourceIdElement()) { 37716 composeString("resourceId", element.getResourceIdElement()); 37717 } 37718 if (element.hasResourceTypeElement()) 37719 composeEnumeration("resourceType", element.getResourceTypeElement(), 37720 new ExampleScenario.FHIRResourceTypeEnumFactory()); 37721 if (element.hasNameElement()) { 37722 composeString("name", element.getNameElement()); 37723 } 37724 if (element.hasDescriptionElement()) { 37725 composeMarkdown("description", element.getDescriptionElement()); 37726 } 37727 if (element.hasVersion()) { 37728 for (ExampleScenario.ExampleScenarioInstanceVersionComponent e : element.getVersion()) 37729 composeExampleScenarioExampleScenarioInstanceVersionComponent("version", e); 37730 } 37731 if (element.hasContainedInstance()) { 37732 for (ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent e : element.getContainedInstance()) 37733 composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("containedInstance", e); 37734 } 37735 } 37736 37737 protected void composeExampleScenarioExampleScenarioInstanceVersionComponent(String name, 37738 ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { 37739 if (element != null) { 37740 composeElementAttributes(element); 37741 xml.enter(FHIR_NS, name); 37742 composeExampleScenarioExampleScenarioInstanceVersionComponentElements(element); 37743 composeElementClose(element); 37744 xml.exit(FHIR_NS, name); 37745 } 37746 } 37747 37748 protected void composeExampleScenarioExampleScenarioInstanceVersionComponentElements( 37749 ExampleScenario.ExampleScenarioInstanceVersionComponent element) throws IOException { 37750 composeBackboneElementElements(element); 37751 if (element.hasVersionIdElement()) { 37752 composeString("versionId", element.getVersionIdElement()); 37753 } 37754 if (element.hasDescriptionElement()) { 37755 composeMarkdown("description", element.getDescriptionElement()); 37756 } 37757 } 37758 37759 protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent(String name, 37760 ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { 37761 if (element != null) { 37762 composeElementAttributes(element); 37763 xml.enter(FHIR_NS, name); 37764 composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentElements(element); 37765 composeElementClose(element); 37766 xml.exit(FHIR_NS, name); 37767 } 37768 } 37769 37770 protected void composeExampleScenarioExampleScenarioInstanceContainedInstanceComponentElements( 37771 ExampleScenario.ExampleScenarioInstanceContainedInstanceComponent element) throws IOException { 37772 composeBackboneElementElements(element); 37773 if (element.hasResourceIdElement()) { 37774 composeString("resourceId", element.getResourceIdElement()); 37775 } 37776 if (element.hasVersionIdElement()) { 37777 composeString("versionId", element.getVersionIdElement()); 37778 } 37779 } 37780 37781 protected void composeExampleScenarioExampleScenarioProcessComponent(String name, 37782 ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { 37783 if (element != null) { 37784 composeElementAttributes(element); 37785 xml.enter(FHIR_NS, name); 37786 composeExampleScenarioExampleScenarioProcessComponentElements(element); 37787 composeElementClose(element); 37788 xml.exit(FHIR_NS, name); 37789 } 37790 } 37791 37792 protected void composeExampleScenarioExampleScenarioProcessComponentElements( 37793 ExampleScenario.ExampleScenarioProcessComponent element) throws IOException { 37794 composeBackboneElementElements(element); 37795 if (element.hasTitleElement()) { 37796 composeString("title", element.getTitleElement()); 37797 } 37798 if (element.hasDescriptionElement()) { 37799 composeMarkdown("description", element.getDescriptionElement()); 37800 } 37801 if (element.hasPreConditionsElement()) { 37802 composeMarkdown("preConditions", element.getPreConditionsElement()); 37803 } 37804 if (element.hasPostConditionsElement()) { 37805 composeMarkdown("postConditions", element.getPostConditionsElement()); 37806 } 37807 if (element.hasStep()) { 37808 for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) 37809 composeExampleScenarioExampleScenarioProcessStepComponent("step", e); 37810 } 37811 } 37812 37813 protected void composeExampleScenarioExampleScenarioProcessStepComponent(String name, 37814 ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { 37815 if (element != null) { 37816 composeElementAttributes(element); 37817 xml.enter(FHIR_NS, name); 37818 composeExampleScenarioExampleScenarioProcessStepComponentElements(element); 37819 composeElementClose(element); 37820 xml.exit(FHIR_NS, name); 37821 } 37822 } 37823 37824 protected void composeExampleScenarioExampleScenarioProcessStepComponentElements( 37825 ExampleScenario.ExampleScenarioProcessStepComponent element) throws IOException { 37826 composeBackboneElementElements(element); 37827 if (element.hasProcess()) { 37828 for (ExampleScenario.ExampleScenarioProcessComponent e : element.getProcess()) 37829 composeExampleScenarioExampleScenarioProcessComponent("process", e); 37830 } 37831 if (element.hasPauseElement()) { 37832 composeBoolean("pause", element.getPauseElement()); 37833 } 37834 if (element.hasOperation()) { 37835 composeExampleScenarioExampleScenarioProcessStepOperationComponent("operation", element.getOperation()); 37836 } 37837 if (element.hasAlternative()) { 37838 for (ExampleScenario.ExampleScenarioProcessStepAlternativeComponent e : element.getAlternative()) 37839 composeExampleScenarioExampleScenarioProcessStepAlternativeComponent("alternative", e); 37840 } 37841 } 37842 37843 protected void composeExampleScenarioExampleScenarioProcessStepOperationComponent(String name, 37844 ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { 37845 if (element != null) { 37846 composeElementAttributes(element); 37847 xml.enter(FHIR_NS, name); 37848 composeExampleScenarioExampleScenarioProcessStepOperationComponentElements(element); 37849 composeElementClose(element); 37850 xml.exit(FHIR_NS, name); 37851 } 37852 } 37853 37854 protected void composeExampleScenarioExampleScenarioProcessStepOperationComponentElements( 37855 ExampleScenario.ExampleScenarioProcessStepOperationComponent element) throws IOException { 37856 composeBackboneElementElements(element); 37857 if (element.hasNumberElement()) { 37858 composeString("number", element.getNumberElement()); 37859 } 37860 if (element.hasTypeElement()) { 37861 composeString("type", element.getTypeElement()); 37862 } 37863 if (element.hasNameElement()) { 37864 composeString("name", element.getNameElement()); 37865 } 37866 if (element.hasInitiatorElement()) { 37867 composeString("initiator", element.getInitiatorElement()); 37868 } 37869 if (element.hasReceiverElement()) { 37870 composeString("receiver", element.getReceiverElement()); 37871 } 37872 if (element.hasDescriptionElement()) { 37873 composeMarkdown("description", element.getDescriptionElement()); 37874 } 37875 if (element.hasInitiatorActiveElement()) { 37876 composeBoolean("initiatorActive", element.getInitiatorActiveElement()); 37877 } 37878 if (element.hasReceiverActiveElement()) { 37879 composeBoolean("receiverActive", element.getReceiverActiveElement()); 37880 } 37881 if (element.hasRequest()) { 37882 composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("request", element.getRequest()); 37883 } 37884 if (element.hasResponse()) { 37885 composeExampleScenarioExampleScenarioInstanceContainedInstanceComponent("response", element.getResponse()); 37886 } 37887 } 37888 37889 protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponent(String name, 37890 ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { 37891 if (element != null) { 37892 composeElementAttributes(element); 37893 xml.enter(FHIR_NS, name); 37894 composeExampleScenarioExampleScenarioProcessStepAlternativeComponentElements(element); 37895 composeElementClose(element); 37896 xml.exit(FHIR_NS, name); 37897 } 37898 } 37899 37900 protected void composeExampleScenarioExampleScenarioProcessStepAlternativeComponentElements( 37901 ExampleScenario.ExampleScenarioProcessStepAlternativeComponent element) throws IOException { 37902 composeBackboneElementElements(element); 37903 if (element.hasTitleElement()) { 37904 composeString("title", element.getTitleElement()); 37905 } 37906 if (element.hasDescriptionElement()) { 37907 composeMarkdown("description", element.getDescriptionElement()); 37908 } 37909 if (element.hasStep()) { 37910 for (ExampleScenario.ExampleScenarioProcessStepComponent e : element.getStep()) 37911 composeExampleScenarioExampleScenarioProcessStepComponent("step", e); 37912 } 37913 } 37914 37915 protected void composeExplanationOfBenefit(String name, ExplanationOfBenefit element) throws IOException { 37916 if (element != null) { 37917 composeDomainResourceAttributes(element); 37918 xml.enter(FHIR_NS, name); 37919 composeExplanationOfBenefitElements(element); 37920 composeElementClose(element); 37921 xml.exit(FHIR_NS, name); 37922 } 37923 } 37924 37925 protected void composeExplanationOfBenefitElements(ExplanationOfBenefit element) throws IOException { 37926 composeDomainResourceElements(element); 37927 if (element.hasIdentifier()) { 37928 for (Identifier e : element.getIdentifier()) 37929 composeIdentifier("identifier", e); 37930 } 37931 if (element.hasStatusElement()) 37932 composeEnumeration("status", element.getStatusElement(), 37933 new ExplanationOfBenefit.ExplanationOfBenefitStatusEnumFactory()); 37934 if (element.hasType()) { 37935 composeCodeableConcept("type", element.getType()); 37936 } 37937 if (element.hasSubType()) { 37938 composeCodeableConcept("subType", element.getSubType()); 37939 } 37940 if (element.hasUseElement()) 37941 composeEnumeration("use", element.getUseElement(), new ExplanationOfBenefit.UseEnumFactory()); 37942 if (element.hasPatient()) { 37943 composeReference("patient", element.getPatient()); 37944 } 37945 if (element.hasBillablePeriod()) { 37946 composePeriod("billablePeriod", element.getBillablePeriod()); 37947 } 37948 if (element.hasCreatedElement()) { 37949 composeDateTime("created", element.getCreatedElement()); 37950 } 37951 if (element.hasEnterer()) { 37952 composeReference("enterer", element.getEnterer()); 37953 } 37954 if (element.hasInsurer()) { 37955 composeReference("insurer", element.getInsurer()); 37956 } 37957 if (element.hasProvider()) { 37958 composeReference("provider", element.getProvider()); 37959 } 37960 if (element.hasPriority()) { 37961 composeCodeableConcept("priority", element.getPriority()); 37962 } 37963 if (element.hasFundsReserveRequested()) { 37964 composeCodeableConcept("fundsReserveRequested", element.getFundsReserveRequested()); 37965 } 37966 if (element.hasFundsReserve()) { 37967 composeCodeableConcept("fundsReserve", element.getFundsReserve()); 37968 } 37969 if (element.hasRelated()) { 37970 for (ExplanationOfBenefit.RelatedClaimComponent e : element.getRelated()) 37971 composeExplanationOfBenefitRelatedClaimComponent("related", e); 37972 } 37973 if (element.hasPrescription()) { 37974 composeReference("prescription", element.getPrescription()); 37975 } 37976 if (element.hasOriginalPrescription()) { 37977 composeReference("originalPrescription", element.getOriginalPrescription()); 37978 } 37979 if (element.hasPayee()) { 37980 composeExplanationOfBenefitPayeeComponent("payee", element.getPayee()); 37981 } 37982 if (element.hasReferral()) { 37983 composeReference("referral", element.getReferral()); 37984 } 37985 if (element.hasFacility()) { 37986 composeReference("facility", element.getFacility()); 37987 } 37988 if (element.hasClaim()) { 37989 composeReference("claim", element.getClaim()); 37990 } 37991 if (element.hasClaimResponse()) { 37992 composeReference("claimResponse", element.getClaimResponse()); 37993 } 37994 if (element.hasOutcomeElement()) 37995 composeEnumeration("outcome", element.getOutcomeElement(), 37996 new ExplanationOfBenefit.RemittanceOutcomeEnumFactory()); 37997 if (element.hasDispositionElement()) { 37998 composeString("disposition", element.getDispositionElement()); 37999 } 38000 if (element.hasPreAuthRef()) { 38001 for (StringType e : element.getPreAuthRef()) 38002 composeString("preAuthRef", e); 38003 } 38004 if (element.hasPreAuthRefPeriod()) { 38005 for (Period e : element.getPreAuthRefPeriod()) 38006 composePeriod("preAuthRefPeriod", e); 38007 } 38008 if (element.hasCareTeam()) { 38009 for (ExplanationOfBenefit.CareTeamComponent e : element.getCareTeam()) 38010 composeExplanationOfBenefitCareTeamComponent("careTeam", e); 38011 } 38012 if (element.hasSupportingInfo()) { 38013 for (ExplanationOfBenefit.SupportingInformationComponent e : element.getSupportingInfo()) 38014 composeExplanationOfBenefitSupportingInformationComponent("supportingInfo", e); 38015 } 38016 if (element.hasDiagnosis()) { 38017 for (ExplanationOfBenefit.DiagnosisComponent e : element.getDiagnosis()) 38018 composeExplanationOfBenefitDiagnosisComponent("diagnosis", e); 38019 } 38020 if (element.hasProcedure()) { 38021 for (ExplanationOfBenefit.ProcedureComponent e : element.getProcedure()) 38022 composeExplanationOfBenefitProcedureComponent("procedure", e); 38023 } 38024 if (element.hasPrecedenceElement()) { 38025 composePositiveInt("precedence", element.getPrecedenceElement()); 38026 } 38027 if (element.hasInsurance()) { 38028 for (ExplanationOfBenefit.InsuranceComponent e : element.getInsurance()) 38029 composeExplanationOfBenefitInsuranceComponent("insurance", e); 38030 } 38031 if (element.hasAccident()) { 38032 composeExplanationOfBenefitAccidentComponent("accident", element.getAccident()); 38033 } 38034 if (element.hasItem()) { 38035 for (ExplanationOfBenefit.ItemComponent e : element.getItem()) 38036 composeExplanationOfBenefitItemComponent("item", e); 38037 } 38038 if (element.hasAddItem()) { 38039 for (ExplanationOfBenefit.AddedItemComponent e : element.getAddItem()) 38040 composeExplanationOfBenefitAddedItemComponent("addItem", e); 38041 } 38042 if (element.hasAdjudication()) { 38043 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38044 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38045 } 38046 if (element.hasTotal()) { 38047 for (ExplanationOfBenefit.TotalComponent e : element.getTotal()) 38048 composeExplanationOfBenefitTotalComponent("total", e); 38049 } 38050 if (element.hasPayment()) { 38051 composeExplanationOfBenefitPaymentComponent("payment", element.getPayment()); 38052 } 38053 if (element.hasFormCode()) { 38054 composeCodeableConcept("formCode", element.getFormCode()); 38055 } 38056 if (element.hasForm()) { 38057 composeAttachment("form", element.getForm()); 38058 } 38059 if (element.hasProcessNote()) { 38060 for (ExplanationOfBenefit.NoteComponent e : element.getProcessNote()) 38061 composeExplanationOfBenefitNoteComponent("processNote", e); 38062 } 38063 if (element.hasBenefitPeriod()) { 38064 composePeriod("benefitPeriod", element.getBenefitPeriod()); 38065 } 38066 if (element.hasBenefitBalance()) { 38067 for (ExplanationOfBenefit.BenefitBalanceComponent e : element.getBenefitBalance()) 38068 composeExplanationOfBenefitBenefitBalanceComponent("benefitBalance", e); 38069 } 38070 } 38071 38072 protected void composeExplanationOfBenefitRelatedClaimComponent(String name, 38073 ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { 38074 if (element != null) { 38075 composeElementAttributes(element); 38076 xml.enter(FHIR_NS, name); 38077 composeExplanationOfBenefitRelatedClaimComponentElements(element); 38078 composeElementClose(element); 38079 xml.exit(FHIR_NS, name); 38080 } 38081 } 38082 38083 protected void composeExplanationOfBenefitRelatedClaimComponentElements( 38084 ExplanationOfBenefit.RelatedClaimComponent element) throws IOException { 38085 composeBackboneElementElements(element); 38086 if (element.hasClaim()) { 38087 composeReference("claim", element.getClaim()); 38088 } 38089 if (element.hasRelationship()) { 38090 composeCodeableConcept("relationship", element.getRelationship()); 38091 } 38092 if (element.hasReference()) { 38093 composeIdentifier("reference", element.getReference()); 38094 } 38095 } 38096 38097 protected void composeExplanationOfBenefitPayeeComponent(String name, ExplanationOfBenefit.PayeeComponent element) 38098 throws IOException { 38099 if (element != null) { 38100 composeElementAttributes(element); 38101 xml.enter(FHIR_NS, name); 38102 composeExplanationOfBenefitPayeeComponentElements(element); 38103 composeElementClose(element); 38104 xml.exit(FHIR_NS, name); 38105 } 38106 } 38107 38108 protected void composeExplanationOfBenefitPayeeComponentElements(ExplanationOfBenefit.PayeeComponent element) 38109 throws IOException { 38110 composeBackboneElementElements(element); 38111 if (element.hasType()) { 38112 composeCodeableConcept("type", element.getType()); 38113 } 38114 if (element.hasParty()) { 38115 composeReference("party", element.getParty()); 38116 } 38117 } 38118 38119 protected void composeExplanationOfBenefitCareTeamComponent(String name, 38120 ExplanationOfBenefit.CareTeamComponent element) throws IOException { 38121 if (element != null) { 38122 composeElementAttributes(element); 38123 xml.enter(FHIR_NS, name); 38124 composeExplanationOfBenefitCareTeamComponentElements(element); 38125 composeElementClose(element); 38126 xml.exit(FHIR_NS, name); 38127 } 38128 } 38129 38130 protected void composeExplanationOfBenefitCareTeamComponentElements(ExplanationOfBenefit.CareTeamComponent element) 38131 throws IOException { 38132 composeBackboneElementElements(element); 38133 if (element.hasSequenceElement()) { 38134 composePositiveInt("sequence", element.getSequenceElement()); 38135 } 38136 if (element.hasProvider()) { 38137 composeReference("provider", element.getProvider()); 38138 } 38139 if (element.hasResponsibleElement()) { 38140 composeBoolean("responsible", element.getResponsibleElement()); 38141 } 38142 if (element.hasRole()) { 38143 composeCodeableConcept("role", element.getRole()); 38144 } 38145 if (element.hasQualification()) { 38146 composeCodeableConcept("qualification", element.getQualification()); 38147 } 38148 } 38149 38150 protected void composeExplanationOfBenefitSupportingInformationComponent(String name, 38151 ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { 38152 if (element != null) { 38153 composeElementAttributes(element); 38154 xml.enter(FHIR_NS, name); 38155 composeExplanationOfBenefitSupportingInformationComponentElements(element); 38156 composeElementClose(element); 38157 xml.exit(FHIR_NS, name); 38158 } 38159 } 38160 38161 protected void composeExplanationOfBenefitSupportingInformationComponentElements( 38162 ExplanationOfBenefit.SupportingInformationComponent element) throws IOException { 38163 composeBackboneElementElements(element); 38164 if (element.hasSequenceElement()) { 38165 composePositiveInt("sequence", element.getSequenceElement()); 38166 } 38167 if (element.hasCategory()) { 38168 composeCodeableConcept("category", element.getCategory()); 38169 } 38170 if (element.hasCode()) { 38171 composeCodeableConcept("code", element.getCode()); 38172 } 38173 if (element.hasTiming()) { 38174 composeType("timing", element.getTiming()); 38175 } 38176 if (element.hasValue()) { 38177 composeType("value", element.getValue()); 38178 } 38179 if (element.hasReason()) { 38180 composeCoding("reason", element.getReason()); 38181 } 38182 } 38183 38184 protected void composeExplanationOfBenefitDiagnosisComponent(String name, 38185 ExplanationOfBenefit.DiagnosisComponent element) throws IOException { 38186 if (element != null) { 38187 composeElementAttributes(element); 38188 xml.enter(FHIR_NS, name); 38189 composeExplanationOfBenefitDiagnosisComponentElements(element); 38190 composeElementClose(element); 38191 xml.exit(FHIR_NS, name); 38192 } 38193 } 38194 38195 protected void composeExplanationOfBenefitDiagnosisComponentElements(ExplanationOfBenefit.DiagnosisComponent element) 38196 throws IOException { 38197 composeBackboneElementElements(element); 38198 if (element.hasSequenceElement()) { 38199 composePositiveInt("sequence", element.getSequenceElement()); 38200 } 38201 if (element.hasDiagnosis()) { 38202 composeType("diagnosis", element.getDiagnosis()); 38203 } 38204 if (element.hasType()) { 38205 for (CodeableConcept e : element.getType()) 38206 composeCodeableConcept("type", e); 38207 } 38208 if (element.hasOnAdmission()) { 38209 composeCodeableConcept("onAdmission", element.getOnAdmission()); 38210 } 38211 if (element.hasPackageCode()) { 38212 composeCodeableConcept("packageCode", element.getPackageCode()); 38213 } 38214 } 38215 38216 protected void composeExplanationOfBenefitProcedureComponent(String name, 38217 ExplanationOfBenefit.ProcedureComponent element) throws IOException { 38218 if (element != null) { 38219 composeElementAttributes(element); 38220 xml.enter(FHIR_NS, name); 38221 composeExplanationOfBenefitProcedureComponentElements(element); 38222 composeElementClose(element); 38223 xml.exit(FHIR_NS, name); 38224 } 38225 } 38226 38227 protected void composeExplanationOfBenefitProcedureComponentElements(ExplanationOfBenefit.ProcedureComponent element) 38228 throws IOException { 38229 composeBackboneElementElements(element); 38230 if (element.hasSequenceElement()) { 38231 composePositiveInt("sequence", element.getSequenceElement()); 38232 } 38233 if (element.hasType()) { 38234 for (CodeableConcept e : element.getType()) 38235 composeCodeableConcept("type", e); 38236 } 38237 if (element.hasDateElement()) { 38238 composeDateTime("date", element.getDateElement()); 38239 } 38240 if (element.hasProcedure()) { 38241 composeType("procedure", element.getProcedure()); 38242 } 38243 if (element.hasUdi()) { 38244 for (Reference e : element.getUdi()) 38245 composeReference("udi", e); 38246 } 38247 } 38248 38249 protected void composeExplanationOfBenefitInsuranceComponent(String name, 38250 ExplanationOfBenefit.InsuranceComponent element) throws IOException { 38251 if (element != null) { 38252 composeElementAttributes(element); 38253 xml.enter(FHIR_NS, name); 38254 composeExplanationOfBenefitInsuranceComponentElements(element); 38255 composeElementClose(element); 38256 xml.exit(FHIR_NS, name); 38257 } 38258 } 38259 38260 protected void composeExplanationOfBenefitInsuranceComponentElements(ExplanationOfBenefit.InsuranceComponent element) 38261 throws IOException { 38262 composeBackboneElementElements(element); 38263 if (element.hasFocalElement()) { 38264 composeBoolean("focal", element.getFocalElement()); 38265 } 38266 if (element.hasCoverage()) { 38267 composeReference("coverage", element.getCoverage()); 38268 } 38269 if (element.hasPreAuthRef()) { 38270 for (StringType e : element.getPreAuthRef()) 38271 composeString("preAuthRef", e); 38272 } 38273 } 38274 38275 protected void composeExplanationOfBenefitAccidentComponent(String name, 38276 ExplanationOfBenefit.AccidentComponent element) throws IOException { 38277 if (element != null) { 38278 composeElementAttributes(element); 38279 xml.enter(FHIR_NS, name); 38280 composeExplanationOfBenefitAccidentComponentElements(element); 38281 composeElementClose(element); 38282 xml.exit(FHIR_NS, name); 38283 } 38284 } 38285 38286 protected void composeExplanationOfBenefitAccidentComponentElements(ExplanationOfBenefit.AccidentComponent element) 38287 throws IOException { 38288 composeBackboneElementElements(element); 38289 if (element.hasDateElement()) { 38290 composeDate("date", element.getDateElement()); 38291 } 38292 if (element.hasType()) { 38293 composeCodeableConcept("type", element.getType()); 38294 } 38295 if (element.hasLocation()) { 38296 composeType("location", element.getLocation()); 38297 } 38298 } 38299 38300 protected void composeExplanationOfBenefitItemComponent(String name, ExplanationOfBenefit.ItemComponent element) 38301 throws IOException { 38302 if (element != null) { 38303 composeElementAttributes(element); 38304 xml.enter(FHIR_NS, name); 38305 composeExplanationOfBenefitItemComponentElements(element); 38306 composeElementClose(element); 38307 xml.exit(FHIR_NS, name); 38308 } 38309 } 38310 38311 protected void composeExplanationOfBenefitItemComponentElements(ExplanationOfBenefit.ItemComponent element) 38312 throws IOException { 38313 composeBackboneElementElements(element); 38314 if (element.hasSequenceElement()) { 38315 composePositiveInt("sequence", element.getSequenceElement()); 38316 } 38317 if (element.hasCareTeamSequence()) { 38318 for (PositiveIntType e : element.getCareTeamSequence()) 38319 composePositiveInt("careTeamSequence", e); 38320 } 38321 if (element.hasDiagnosisSequence()) { 38322 for (PositiveIntType e : element.getDiagnosisSequence()) 38323 composePositiveInt("diagnosisSequence", e); 38324 } 38325 if (element.hasProcedureSequence()) { 38326 for (PositiveIntType e : element.getProcedureSequence()) 38327 composePositiveInt("procedureSequence", e); 38328 } 38329 if (element.hasInformationSequence()) { 38330 for (PositiveIntType e : element.getInformationSequence()) 38331 composePositiveInt("informationSequence", e); 38332 } 38333 if (element.hasRevenue()) { 38334 composeCodeableConcept("revenue", element.getRevenue()); 38335 } 38336 if (element.hasCategory()) { 38337 composeCodeableConcept("category", element.getCategory()); 38338 } 38339 if (element.hasProductOrService()) { 38340 composeCodeableConcept("productOrService", element.getProductOrService()); 38341 } 38342 if (element.hasModifier()) { 38343 for (CodeableConcept e : element.getModifier()) 38344 composeCodeableConcept("modifier", e); 38345 } 38346 if (element.hasProgramCode()) { 38347 for (CodeableConcept e : element.getProgramCode()) 38348 composeCodeableConcept("programCode", e); 38349 } 38350 if (element.hasServiced()) { 38351 composeType("serviced", element.getServiced()); 38352 } 38353 if (element.hasLocation()) { 38354 composeType("location", element.getLocation()); 38355 } 38356 if (element.hasQuantity()) { 38357 composeQuantity("quantity", element.getQuantity()); 38358 } 38359 if (element.hasUnitPrice()) { 38360 composeMoney("unitPrice", element.getUnitPrice()); 38361 } 38362 if (element.hasFactorElement()) { 38363 composeDecimal("factor", element.getFactorElement()); 38364 } 38365 if (element.hasNet()) { 38366 composeMoney("net", element.getNet()); 38367 } 38368 if (element.hasUdi()) { 38369 for (Reference e : element.getUdi()) 38370 composeReference("udi", e); 38371 } 38372 if (element.hasBodySite()) { 38373 composeCodeableConcept("bodySite", element.getBodySite()); 38374 } 38375 if (element.hasSubSite()) { 38376 for (CodeableConcept e : element.getSubSite()) 38377 composeCodeableConcept("subSite", e); 38378 } 38379 if (element.hasEncounter()) { 38380 for (Reference e : element.getEncounter()) 38381 composeReference("encounter", e); 38382 } 38383 if (element.hasNoteNumber()) { 38384 for (PositiveIntType e : element.getNoteNumber()) 38385 composePositiveInt("noteNumber", e); 38386 } 38387 if (element.hasAdjudication()) { 38388 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38389 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38390 } 38391 if (element.hasDetail()) { 38392 for (ExplanationOfBenefit.DetailComponent e : element.getDetail()) 38393 composeExplanationOfBenefitDetailComponent("detail", e); 38394 } 38395 } 38396 38397 protected void composeExplanationOfBenefitAdjudicationComponent(String name, 38398 ExplanationOfBenefit.AdjudicationComponent element) throws IOException { 38399 if (element != null) { 38400 composeElementAttributes(element); 38401 xml.enter(FHIR_NS, name); 38402 composeExplanationOfBenefitAdjudicationComponentElements(element); 38403 composeElementClose(element); 38404 xml.exit(FHIR_NS, name); 38405 } 38406 } 38407 38408 protected void composeExplanationOfBenefitAdjudicationComponentElements( 38409 ExplanationOfBenefit.AdjudicationComponent element) throws IOException { 38410 composeBackboneElementElements(element); 38411 if (element.hasCategory()) { 38412 composeCodeableConcept("category", element.getCategory()); 38413 } 38414 if (element.hasReason()) { 38415 composeCodeableConcept("reason", element.getReason()); 38416 } 38417 if (element.hasAmount()) { 38418 composeMoney("amount", element.getAmount()); 38419 } 38420 if (element.hasValueElement()) { 38421 composeDecimal("value", element.getValueElement()); 38422 } 38423 } 38424 38425 protected void composeExplanationOfBenefitDetailComponent(String name, ExplanationOfBenefit.DetailComponent element) 38426 throws IOException { 38427 if (element != null) { 38428 composeElementAttributes(element); 38429 xml.enter(FHIR_NS, name); 38430 composeExplanationOfBenefitDetailComponentElements(element); 38431 composeElementClose(element); 38432 xml.exit(FHIR_NS, name); 38433 } 38434 } 38435 38436 protected void composeExplanationOfBenefitDetailComponentElements(ExplanationOfBenefit.DetailComponent element) 38437 throws IOException { 38438 composeBackboneElementElements(element); 38439 if (element.hasSequenceElement()) { 38440 composePositiveInt("sequence", element.getSequenceElement()); 38441 } 38442 if (element.hasRevenue()) { 38443 composeCodeableConcept("revenue", element.getRevenue()); 38444 } 38445 if (element.hasCategory()) { 38446 composeCodeableConcept("category", element.getCategory()); 38447 } 38448 if (element.hasProductOrService()) { 38449 composeCodeableConcept("productOrService", element.getProductOrService()); 38450 } 38451 if (element.hasModifier()) { 38452 for (CodeableConcept e : element.getModifier()) 38453 composeCodeableConcept("modifier", e); 38454 } 38455 if (element.hasProgramCode()) { 38456 for (CodeableConcept e : element.getProgramCode()) 38457 composeCodeableConcept("programCode", e); 38458 } 38459 if (element.hasQuantity()) { 38460 composeQuantity("quantity", element.getQuantity()); 38461 } 38462 if (element.hasUnitPrice()) { 38463 composeMoney("unitPrice", element.getUnitPrice()); 38464 } 38465 if (element.hasFactorElement()) { 38466 composeDecimal("factor", element.getFactorElement()); 38467 } 38468 if (element.hasNet()) { 38469 composeMoney("net", element.getNet()); 38470 } 38471 if (element.hasUdi()) { 38472 for (Reference e : element.getUdi()) 38473 composeReference("udi", e); 38474 } 38475 if (element.hasNoteNumber()) { 38476 for (PositiveIntType e : element.getNoteNumber()) 38477 composePositiveInt("noteNumber", e); 38478 } 38479 if (element.hasAdjudication()) { 38480 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38481 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38482 } 38483 if (element.hasSubDetail()) { 38484 for (ExplanationOfBenefit.SubDetailComponent e : element.getSubDetail()) 38485 composeExplanationOfBenefitSubDetailComponent("subDetail", e); 38486 } 38487 } 38488 38489 protected void composeExplanationOfBenefitSubDetailComponent(String name, 38490 ExplanationOfBenefit.SubDetailComponent element) throws IOException { 38491 if (element != null) { 38492 composeElementAttributes(element); 38493 xml.enter(FHIR_NS, name); 38494 composeExplanationOfBenefitSubDetailComponentElements(element); 38495 composeElementClose(element); 38496 xml.exit(FHIR_NS, name); 38497 } 38498 } 38499 38500 protected void composeExplanationOfBenefitSubDetailComponentElements(ExplanationOfBenefit.SubDetailComponent element) 38501 throws IOException { 38502 composeBackboneElementElements(element); 38503 if (element.hasSequenceElement()) { 38504 composePositiveInt("sequence", element.getSequenceElement()); 38505 } 38506 if (element.hasRevenue()) { 38507 composeCodeableConcept("revenue", element.getRevenue()); 38508 } 38509 if (element.hasCategory()) { 38510 composeCodeableConcept("category", element.getCategory()); 38511 } 38512 if (element.hasProductOrService()) { 38513 composeCodeableConcept("productOrService", element.getProductOrService()); 38514 } 38515 if (element.hasModifier()) { 38516 for (CodeableConcept e : element.getModifier()) 38517 composeCodeableConcept("modifier", e); 38518 } 38519 if (element.hasProgramCode()) { 38520 for (CodeableConcept e : element.getProgramCode()) 38521 composeCodeableConcept("programCode", e); 38522 } 38523 if (element.hasQuantity()) { 38524 composeQuantity("quantity", element.getQuantity()); 38525 } 38526 if (element.hasUnitPrice()) { 38527 composeMoney("unitPrice", element.getUnitPrice()); 38528 } 38529 if (element.hasFactorElement()) { 38530 composeDecimal("factor", element.getFactorElement()); 38531 } 38532 if (element.hasNet()) { 38533 composeMoney("net", element.getNet()); 38534 } 38535 if (element.hasUdi()) { 38536 for (Reference e : element.getUdi()) 38537 composeReference("udi", e); 38538 } 38539 if (element.hasNoteNumber()) { 38540 for (PositiveIntType e : element.getNoteNumber()) 38541 composePositiveInt("noteNumber", e); 38542 } 38543 if (element.hasAdjudication()) { 38544 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38545 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38546 } 38547 } 38548 38549 protected void composeExplanationOfBenefitAddedItemComponent(String name, 38550 ExplanationOfBenefit.AddedItemComponent element) throws IOException { 38551 if (element != null) { 38552 composeElementAttributes(element); 38553 xml.enter(FHIR_NS, name); 38554 composeExplanationOfBenefitAddedItemComponentElements(element); 38555 composeElementClose(element); 38556 xml.exit(FHIR_NS, name); 38557 } 38558 } 38559 38560 protected void composeExplanationOfBenefitAddedItemComponentElements(ExplanationOfBenefit.AddedItemComponent element) 38561 throws IOException { 38562 composeBackboneElementElements(element); 38563 if (element.hasItemSequence()) { 38564 for (PositiveIntType e : element.getItemSequence()) 38565 composePositiveInt("itemSequence", e); 38566 } 38567 if (element.hasDetailSequence()) { 38568 for (PositiveIntType e : element.getDetailSequence()) 38569 composePositiveInt("detailSequence", e); 38570 } 38571 if (element.hasSubDetailSequence()) { 38572 for (PositiveIntType e : element.getSubDetailSequence()) 38573 composePositiveInt("subDetailSequence", e); 38574 } 38575 if (element.hasProvider()) { 38576 for (Reference e : element.getProvider()) 38577 composeReference("provider", e); 38578 } 38579 if (element.hasProductOrService()) { 38580 composeCodeableConcept("productOrService", element.getProductOrService()); 38581 } 38582 if (element.hasModifier()) { 38583 for (CodeableConcept e : element.getModifier()) 38584 composeCodeableConcept("modifier", e); 38585 } 38586 if (element.hasProgramCode()) { 38587 for (CodeableConcept e : element.getProgramCode()) 38588 composeCodeableConcept("programCode", e); 38589 } 38590 if (element.hasServiced()) { 38591 composeType("serviced", element.getServiced()); 38592 } 38593 if (element.hasLocation()) { 38594 composeType("location", element.getLocation()); 38595 } 38596 if (element.hasQuantity()) { 38597 composeQuantity("quantity", element.getQuantity()); 38598 } 38599 if (element.hasUnitPrice()) { 38600 composeMoney("unitPrice", element.getUnitPrice()); 38601 } 38602 if (element.hasFactorElement()) { 38603 composeDecimal("factor", element.getFactorElement()); 38604 } 38605 if (element.hasNet()) { 38606 composeMoney("net", element.getNet()); 38607 } 38608 if (element.hasBodySite()) { 38609 composeCodeableConcept("bodySite", element.getBodySite()); 38610 } 38611 if (element.hasSubSite()) { 38612 for (CodeableConcept e : element.getSubSite()) 38613 composeCodeableConcept("subSite", e); 38614 } 38615 if (element.hasNoteNumber()) { 38616 for (PositiveIntType e : element.getNoteNumber()) 38617 composePositiveInt("noteNumber", e); 38618 } 38619 if (element.hasAdjudication()) { 38620 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38621 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38622 } 38623 if (element.hasDetail()) { 38624 for (ExplanationOfBenefit.AddedItemDetailComponent e : element.getDetail()) 38625 composeExplanationOfBenefitAddedItemDetailComponent("detail", e); 38626 } 38627 } 38628 38629 protected void composeExplanationOfBenefitAddedItemDetailComponent(String name, 38630 ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException { 38631 if (element != null) { 38632 composeElementAttributes(element); 38633 xml.enter(FHIR_NS, name); 38634 composeExplanationOfBenefitAddedItemDetailComponentElements(element); 38635 composeElementClose(element); 38636 xml.exit(FHIR_NS, name); 38637 } 38638 } 38639 38640 protected void composeExplanationOfBenefitAddedItemDetailComponentElements( 38641 ExplanationOfBenefit.AddedItemDetailComponent element) throws IOException { 38642 composeBackboneElementElements(element); 38643 if (element.hasProductOrService()) { 38644 composeCodeableConcept("productOrService", element.getProductOrService()); 38645 } 38646 if (element.hasModifier()) { 38647 for (CodeableConcept e : element.getModifier()) 38648 composeCodeableConcept("modifier", e); 38649 } 38650 if (element.hasQuantity()) { 38651 composeQuantity("quantity", element.getQuantity()); 38652 } 38653 if (element.hasUnitPrice()) { 38654 composeMoney("unitPrice", element.getUnitPrice()); 38655 } 38656 if (element.hasFactorElement()) { 38657 composeDecimal("factor", element.getFactorElement()); 38658 } 38659 if (element.hasNet()) { 38660 composeMoney("net", element.getNet()); 38661 } 38662 if (element.hasNoteNumber()) { 38663 for (PositiveIntType e : element.getNoteNumber()) 38664 composePositiveInt("noteNumber", e); 38665 } 38666 if (element.hasAdjudication()) { 38667 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38668 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38669 } 38670 if (element.hasSubDetail()) { 38671 for (ExplanationOfBenefit.AddedItemDetailSubDetailComponent e : element.getSubDetail()) 38672 composeExplanationOfBenefitAddedItemDetailSubDetailComponent("subDetail", e); 38673 } 38674 } 38675 38676 protected void composeExplanationOfBenefitAddedItemDetailSubDetailComponent(String name, 38677 ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException { 38678 if (element != null) { 38679 composeElementAttributes(element); 38680 xml.enter(FHIR_NS, name); 38681 composeExplanationOfBenefitAddedItemDetailSubDetailComponentElements(element); 38682 composeElementClose(element); 38683 xml.exit(FHIR_NS, name); 38684 } 38685 } 38686 38687 protected void composeExplanationOfBenefitAddedItemDetailSubDetailComponentElements( 38688 ExplanationOfBenefit.AddedItemDetailSubDetailComponent element) throws IOException { 38689 composeBackboneElementElements(element); 38690 if (element.hasProductOrService()) { 38691 composeCodeableConcept("productOrService", element.getProductOrService()); 38692 } 38693 if (element.hasModifier()) { 38694 for (CodeableConcept e : element.getModifier()) 38695 composeCodeableConcept("modifier", e); 38696 } 38697 if (element.hasQuantity()) { 38698 composeQuantity("quantity", element.getQuantity()); 38699 } 38700 if (element.hasUnitPrice()) { 38701 composeMoney("unitPrice", element.getUnitPrice()); 38702 } 38703 if (element.hasFactorElement()) { 38704 composeDecimal("factor", element.getFactorElement()); 38705 } 38706 if (element.hasNet()) { 38707 composeMoney("net", element.getNet()); 38708 } 38709 if (element.hasNoteNumber()) { 38710 for (PositiveIntType e : element.getNoteNumber()) 38711 composePositiveInt("noteNumber", e); 38712 } 38713 if (element.hasAdjudication()) { 38714 for (ExplanationOfBenefit.AdjudicationComponent e : element.getAdjudication()) 38715 composeExplanationOfBenefitAdjudicationComponent("adjudication", e); 38716 } 38717 } 38718 38719 protected void composeExplanationOfBenefitTotalComponent(String name, ExplanationOfBenefit.TotalComponent element) 38720 throws IOException { 38721 if (element != null) { 38722 composeElementAttributes(element); 38723 xml.enter(FHIR_NS, name); 38724 composeExplanationOfBenefitTotalComponentElements(element); 38725 composeElementClose(element); 38726 xml.exit(FHIR_NS, name); 38727 } 38728 } 38729 38730 protected void composeExplanationOfBenefitTotalComponentElements(ExplanationOfBenefit.TotalComponent element) 38731 throws IOException { 38732 composeBackboneElementElements(element); 38733 if (element.hasCategory()) { 38734 composeCodeableConcept("category", element.getCategory()); 38735 } 38736 if (element.hasAmount()) { 38737 composeMoney("amount", element.getAmount()); 38738 } 38739 } 38740 38741 protected void composeExplanationOfBenefitPaymentComponent(String name, ExplanationOfBenefit.PaymentComponent element) 38742 throws IOException { 38743 if (element != null) { 38744 composeElementAttributes(element); 38745 xml.enter(FHIR_NS, name); 38746 composeExplanationOfBenefitPaymentComponentElements(element); 38747 composeElementClose(element); 38748 xml.exit(FHIR_NS, name); 38749 } 38750 } 38751 38752 protected void composeExplanationOfBenefitPaymentComponentElements(ExplanationOfBenefit.PaymentComponent element) 38753 throws IOException { 38754 composeBackboneElementElements(element); 38755 if (element.hasType()) { 38756 composeCodeableConcept("type", element.getType()); 38757 } 38758 if (element.hasAdjustment()) { 38759 composeMoney("adjustment", element.getAdjustment()); 38760 } 38761 if (element.hasAdjustmentReason()) { 38762 composeCodeableConcept("adjustmentReason", element.getAdjustmentReason()); 38763 } 38764 if (element.hasDateElement()) { 38765 composeDate("date", element.getDateElement()); 38766 } 38767 if (element.hasAmount()) { 38768 composeMoney("amount", element.getAmount()); 38769 } 38770 if (element.hasIdentifier()) { 38771 composeIdentifier("identifier", element.getIdentifier()); 38772 } 38773 } 38774 38775 protected void composeExplanationOfBenefitNoteComponent(String name, ExplanationOfBenefit.NoteComponent element) 38776 throws IOException { 38777 if (element != null) { 38778 composeElementAttributes(element); 38779 xml.enter(FHIR_NS, name); 38780 composeExplanationOfBenefitNoteComponentElements(element); 38781 composeElementClose(element); 38782 xml.exit(FHIR_NS, name); 38783 } 38784 } 38785 38786 protected void composeExplanationOfBenefitNoteComponentElements(ExplanationOfBenefit.NoteComponent element) 38787 throws IOException { 38788 composeBackboneElementElements(element); 38789 if (element.hasNumberElement()) { 38790 composePositiveInt("number", element.getNumberElement()); 38791 } 38792 if (element.hasTypeElement()) 38793 composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); 38794 if (element.hasTextElement()) { 38795 composeString("text", element.getTextElement()); 38796 } 38797 if (element.hasLanguage()) { 38798 composeCodeableConcept("language", element.getLanguage()); 38799 } 38800 } 38801 38802 protected void composeExplanationOfBenefitBenefitBalanceComponent(String name, 38803 ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { 38804 if (element != null) { 38805 composeElementAttributes(element); 38806 xml.enter(FHIR_NS, name); 38807 composeExplanationOfBenefitBenefitBalanceComponentElements(element); 38808 composeElementClose(element); 38809 xml.exit(FHIR_NS, name); 38810 } 38811 } 38812 38813 protected void composeExplanationOfBenefitBenefitBalanceComponentElements( 38814 ExplanationOfBenefit.BenefitBalanceComponent element) throws IOException { 38815 composeBackboneElementElements(element); 38816 if (element.hasCategory()) { 38817 composeCodeableConcept("category", element.getCategory()); 38818 } 38819 if (element.hasExcludedElement()) { 38820 composeBoolean("excluded", element.getExcludedElement()); 38821 } 38822 if (element.hasNameElement()) { 38823 composeString("name", element.getNameElement()); 38824 } 38825 if (element.hasDescriptionElement()) { 38826 composeString("description", element.getDescriptionElement()); 38827 } 38828 if (element.hasNetwork()) { 38829 composeCodeableConcept("network", element.getNetwork()); 38830 } 38831 if (element.hasUnit()) { 38832 composeCodeableConcept("unit", element.getUnit()); 38833 } 38834 if (element.hasTerm()) { 38835 composeCodeableConcept("term", element.getTerm()); 38836 } 38837 if (element.hasFinancial()) { 38838 for (ExplanationOfBenefit.BenefitComponent e : element.getFinancial()) 38839 composeExplanationOfBenefitBenefitComponent("financial", e); 38840 } 38841 } 38842 38843 protected void composeExplanationOfBenefitBenefitComponent(String name, ExplanationOfBenefit.BenefitComponent element) 38844 throws IOException { 38845 if (element != null) { 38846 composeElementAttributes(element); 38847 xml.enter(FHIR_NS, name); 38848 composeExplanationOfBenefitBenefitComponentElements(element); 38849 composeElementClose(element); 38850 xml.exit(FHIR_NS, name); 38851 } 38852 } 38853 38854 protected void composeExplanationOfBenefitBenefitComponentElements(ExplanationOfBenefit.BenefitComponent element) 38855 throws IOException { 38856 composeBackboneElementElements(element); 38857 if (element.hasType()) { 38858 composeCodeableConcept("type", element.getType()); 38859 } 38860 if (element.hasAllowed()) { 38861 composeType("allowed", element.getAllowed()); 38862 } 38863 if (element.hasUsed()) { 38864 composeType("used", element.getUsed()); 38865 } 38866 } 38867 38868 protected void composeFamilyMemberHistory(String name, FamilyMemberHistory element) throws IOException { 38869 if (element != null) { 38870 composeDomainResourceAttributes(element); 38871 xml.enter(FHIR_NS, name); 38872 composeFamilyMemberHistoryElements(element); 38873 composeElementClose(element); 38874 xml.exit(FHIR_NS, name); 38875 } 38876 } 38877 38878 protected void composeFamilyMemberHistoryElements(FamilyMemberHistory element) throws IOException { 38879 composeDomainResourceElements(element); 38880 if (element.hasIdentifier()) { 38881 for (Identifier e : element.getIdentifier()) 38882 composeIdentifier("identifier", e); 38883 } 38884 if (element.hasInstantiatesCanonical()) { 38885 for (CanonicalType e : element.getInstantiatesCanonical()) 38886 composeCanonical("instantiatesCanonical", e); 38887 } 38888 if (element.hasInstantiatesUri()) { 38889 for (UriType e : element.getInstantiatesUri()) 38890 composeUri("instantiatesUri", e); 38891 } 38892 if (element.hasStatusElement()) 38893 composeEnumeration("status", element.getStatusElement(), 38894 new FamilyMemberHistory.FamilyHistoryStatusEnumFactory()); 38895 if (element.hasDataAbsentReason()) { 38896 composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); 38897 } 38898 if (element.hasPatient()) { 38899 composeReference("patient", element.getPatient()); 38900 } 38901 if (element.hasDateElement()) { 38902 composeDateTime("date", element.getDateElement()); 38903 } 38904 if (element.hasNameElement()) { 38905 composeString("name", element.getNameElement()); 38906 } 38907 if (element.hasRelationship()) { 38908 composeCodeableConcept("relationship", element.getRelationship()); 38909 } 38910 if (element.hasSex()) { 38911 composeCodeableConcept("sex", element.getSex()); 38912 } 38913 if (element.hasBorn()) { 38914 composeType("born", element.getBorn()); 38915 } 38916 if (element.hasAge()) { 38917 composeType("age", element.getAge()); 38918 } 38919 if (element.hasEstimatedAgeElement()) { 38920 composeBoolean("estimatedAge", element.getEstimatedAgeElement()); 38921 } 38922 if (element.hasDeceased()) { 38923 composeType("deceased", element.getDeceased()); 38924 } 38925 if (element.hasReasonCode()) { 38926 for (CodeableConcept e : element.getReasonCode()) 38927 composeCodeableConcept("reasonCode", e); 38928 } 38929 if (element.hasReasonReference()) { 38930 for (Reference e : element.getReasonReference()) 38931 composeReference("reasonReference", e); 38932 } 38933 if (element.hasNote()) { 38934 for (Annotation e : element.getNote()) 38935 composeAnnotation("note", e); 38936 } 38937 if (element.hasCondition()) { 38938 for (FamilyMemberHistory.FamilyMemberHistoryConditionComponent e : element.getCondition()) 38939 composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent("condition", e); 38940 } 38941 } 38942 38943 protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(String name, 38944 FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { 38945 if (element != null) { 38946 composeElementAttributes(element); 38947 xml.enter(FHIR_NS, name); 38948 composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements(element); 38949 composeElementClose(element); 38950 xml.exit(FHIR_NS, name); 38951 } 38952 } 38953 38954 protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponentElements( 38955 FamilyMemberHistory.FamilyMemberHistoryConditionComponent element) throws IOException { 38956 composeBackboneElementElements(element); 38957 if (element.hasCode()) { 38958 composeCodeableConcept("code", element.getCode()); 38959 } 38960 if (element.hasOutcome()) { 38961 composeCodeableConcept("outcome", element.getOutcome()); 38962 } 38963 if (element.hasContributedToDeathElement()) { 38964 composeBoolean("contributedToDeath", element.getContributedToDeathElement()); 38965 } 38966 if (element.hasOnset()) { 38967 composeType("onset", element.getOnset()); 38968 } 38969 if (element.hasNote()) { 38970 for (Annotation e : element.getNote()) 38971 composeAnnotation("note", e); 38972 } 38973 } 38974 38975 protected void composeFlag(String name, Flag element) throws IOException { 38976 if (element != null) { 38977 composeDomainResourceAttributes(element); 38978 xml.enter(FHIR_NS, name); 38979 composeFlagElements(element); 38980 composeElementClose(element); 38981 xml.exit(FHIR_NS, name); 38982 } 38983 } 38984 38985 protected void composeFlagElements(Flag element) throws IOException { 38986 composeDomainResourceElements(element); 38987 if (element.hasIdentifier()) { 38988 for (Identifier e : element.getIdentifier()) 38989 composeIdentifier("identifier", e); 38990 } 38991 if (element.hasStatusElement()) 38992 composeEnumeration("status", element.getStatusElement(), new Flag.FlagStatusEnumFactory()); 38993 if (element.hasCategory()) { 38994 for (CodeableConcept e : element.getCategory()) 38995 composeCodeableConcept("category", e); 38996 } 38997 if (element.hasCode()) { 38998 composeCodeableConcept("code", element.getCode()); 38999 } 39000 if (element.hasSubject()) { 39001 composeReference("subject", element.getSubject()); 39002 } 39003 if (element.hasPeriod()) { 39004 composePeriod("period", element.getPeriod()); 39005 } 39006 if (element.hasEncounter()) { 39007 composeReference("encounter", element.getEncounter()); 39008 } 39009 if (element.hasAuthor()) { 39010 composeReference("author", element.getAuthor()); 39011 } 39012 } 39013 39014 protected void composeGoal(String name, Goal element) throws IOException { 39015 if (element != null) { 39016 composeDomainResourceAttributes(element); 39017 xml.enter(FHIR_NS, name); 39018 composeGoalElements(element); 39019 composeElementClose(element); 39020 xml.exit(FHIR_NS, name); 39021 } 39022 } 39023 39024 protected void composeGoalElements(Goal element) throws IOException { 39025 composeDomainResourceElements(element); 39026 if (element.hasIdentifier()) { 39027 for (Identifier e : element.getIdentifier()) 39028 composeIdentifier("identifier", e); 39029 } 39030 if (element.hasLifecycleStatusElement()) 39031 composeEnumeration("lifecycleStatus", element.getLifecycleStatusElement(), 39032 new Goal.GoalLifecycleStatusEnumFactory()); 39033 if (element.hasAchievementStatus()) { 39034 composeCodeableConcept("achievementStatus", element.getAchievementStatus()); 39035 } 39036 if (element.hasCategory()) { 39037 for (CodeableConcept e : element.getCategory()) 39038 composeCodeableConcept("category", e); 39039 } 39040 if (element.hasPriority()) { 39041 composeCodeableConcept("priority", element.getPriority()); 39042 } 39043 if (element.hasDescription()) { 39044 composeCodeableConcept("description", element.getDescription()); 39045 } 39046 if (element.hasSubject()) { 39047 composeReference("subject", element.getSubject()); 39048 } 39049 if (element.hasStart()) { 39050 composeType("start", element.getStart()); 39051 } 39052 if (element.hasTarget()) { 39053 for (Goal.GoalTargetComponent e : element.getTarget()) 39054 composeGoalGoalTargetComponent("target", e); 39055 } 39056 if (element.hasStatusDateElement()) { 39057 composeDate("statusDate", element.getStatusDateElement()); 39058 } 39059 if (element.hasStatusReasonElement()) { 39060 composeString("statusReason", element.getStatusReasonElement()); 39061 } 39062 if (element.hasExpressedBy()) { 39063 composeReference("expressedBy", element.getExpressedBy()); 39064 } 39065 if (element.hasAddresses()) { 39066 for (Reference e : element.getAddresses()) 39067 composeReference("addresses", e); 39068 } 39069 if (element.hasNote()) { 39070 for (Annotation e : element.getNote()) 39071 composeAnnotation("note", e); 39072 } 39073 if (element.hasOutcomeCode()) { 39074 for (CodeableConcept e : element.getOutcomeCode()) 39075 composeCodeableConcept("outcomeCode", e); 39076 } 39077 if (element.hasOutcomeReference()) { 39078 for (Reference e : element.getOutcomeReference()) 39079 composeReference("outcomeReference", e); 39080 } 39081 } 39082 39083 protected void composeGoalGoalTargetComponent(String name, Goal.GoalTargetComponent element) throws IOException { 39084 if (element != null) { 39085 composeElementAttributes(element); 39086 xml.enter(FHIR_NS, name); 39087 composeGoalGoalTargetComponentElements(element); 39088 composeElementClose(element); 39089 xml.exit(FHIR_NS, name); 39090 } 39091 } 39092 39093 protected void composeGoalGoalTargetComponentElements(Goal.GoalTargetComponent element) throws IOException { 39094 composeBackboneElementElements(element); 39095 if (element.hasMeasure()) { 39096 composeCodeableConcept("measure", element.getMeasure()); 39097 } 39098 if (element.hasDetail()) { 39099 composeType("detail", element.getDetail()); 39100 } 39101 if (element.hasDue()) { 39102 composeType("due", element.getDue()); 39103 } 39104 } 39105 39106 protected void composeGraphDefinition(String name, GraphDefinition element) throws IOException { 39107 if (element != null) { 39108 composeDomainResourceAttributes(element); 39109 xml.enter(FHIR_NS, name); 39110 composeGraphDefinitionElements(element); 39111 composeElementClose(element); 39112 xml.exit(FHIR_NS, name); 39113 } 39114 } 39115 39116 protected void composeGraphDefinitionElements(GraphDefinition element) throws IOException { 39117 composeDomainResourceElements(element); 39118 if (element.hasUrlElement()) { 39119 composeUri("url", element.getUrlElement()); 39120 } 39121 if (element.hasVersionElement()) { 39122 composeString("version", element.getVersionElement()); 39123 } 39124 if (element.hasNameElement()) { 39125 composeString("name", element.getNameElement()); 39126 } 39127 if (element.hasStatusElement()) 39128 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 39129 if (element.hasExperimentalElement()) { 39130 composeBoolean("experimental", element.getExperimentalElement()); 39131 } 39132 if (element.hasDateElement()) { 39133 composeDateTime("date", element.getDateElement()); 39134 } 39135 if (element.hasPublisherElement()) { 39136 composeString("publisher", element.getPublisherElement()); 39137 } 39138 if (element.hasContact()) { 39139 for (ContactDetail e : element.getContact()) 39140 composeContactDetail("contact", e); 39141 } 39142 if (element.hasDescriptionElement()) { 39143 composeMarkdown("description", element.getDescriptionElement()); 39144 } 39145 if (element.hasUseContext()) { 39146 for (UsageContext e : element.getUseContext()) 39147 composeUsageContext("useContext", e); 39148 } 39149 if (element.hasJurisdiction()) { 39150 for (CodeableConcept e : element.getJurisdiction()) 39151 composeCodeableConcept("jurisdiction", e); 39152 } 39153 if (element.hasPurposeElement()) { 39154 composeMarkdown("purpose", element.getPurposeElement()); 39155 } 39156 if (element.hasStartElement()) { 39157 composeCode("start", element.getStartElement()); 39158 } 39159 if (element.hasProfileElement()) { 39160 composeCanonical("profile", element.getProfileElement()); 39161 } 39162 if (element.hasLink()) { 39163 for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) 39164 composeGraphDefinitionGraphDefinitionLinkComponent("link", e); 39165 } 39166 } 39167 39168 protected void composeGraphDefinitionGraphDefinitionLinkComponent(String name, 39169 GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { 39170 if (element != null) { 39171 composeElementAttributes(element); 39172 xml.enter(FHIR_NS, name); 39173 composeGraphDefinitionGraphDefinitionLinkComponentElements(element); 39174 composeElementClose(element); 39175 xml.exit(FHIR_NS, name); 39176 } 39177 } 39178 39179 protected void composeGraphDefinitionGraphDefinitionLinkComponentElements( 39180 GraphDefinition.GraphDefinitionLinkComponent element) throws IOException { 39181 composeBackboneElementElements(element); 39182 if (element.hasPathElement()) { 39183 composeString("path", element.getPathElement()); 39184 } 39185 if (element.hasSliceNameElement()) { 39186 composeString("sliceName", element.getSliceNameElement()); 39187 } 39188 if (element.hasMinElement()) { 39189 composeInteger("min", element.getMinElement()); 39190 } 39191 if (element.hasMaxElement()) { 39192 composeString("max", element.getMaxElement()); 39193 } 39194 if (element.hasDescriptionElement()) { 39195 composeString("description", element.getDescriptionElement()); 39196 } 39197 if (element.hasTarget()) { 39198 for (GraphDefinition.GraphDefinitionLinkTargetComponent e : element.getTarget()) 39199 composeGraphDefinitionGraphDefinitionLinkTargetComponent("target", e); 39200 } 39201 } 39202 39203 protected void composeGraphDefinitionGraphDefinitionLinkTargetComponent(String name, 39204 GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { 39205 if (element != null) { 39206 composeElementAttributes(element); 39207 xml.enter(FHIR_NS, name); 39208 composeGraphDefinitionGraphDefinitionLinkTargetComponentElements(element); 39209 composeElementClose(element); 39210 xml.exit(FHIR_NS, name); 39211 } 39212 } 39213 39214 protected void composeGraphDefinitionGraphDefinitionLinkTargetComponentElements( 39215 GraphDefinition.GraphDefinitionLinkTargetComponent element) throws IOException { 39216 composeBackboneElementElements(element); 39217 if (element.hasTypeElement()) { 39218 composeCode("type", element.getTypeElement()); 39219 } 39220 if (element.hasParamsElement()) { 39221 composeString("params", element.getParamsElement()); 39222 } 39223 if (element.hasProfileElement()) { 39224 composeCanonical("profile", element.getProfileElement()); 39225 } 39226 if (element.hasCompartment()) { 39227 for (GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent e : element.getCompartment()) 39228 composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent("compartment", e); 39229 } 39230 if (element.hasLink()) { 39231 for (GraphDefinition.GraphDefinitionLinkComponent e : element.getLink()) 39232 composeGraphDefinitionGraphDefinitionLinkComponent("link", e); 39233 } 39234 } 39235 39236 protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponent(String name, 39237 GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { 39238 if (element != null) { 39239 composeElementAttributes(element); 39240 xml.enter(FHIR_NS, name); 39241 composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements(element); 39242 composeElementClose(element); 39243 xml.exit(FHIR_NS, name); 39244 } 39245 } 39246 39247 protected void composeGraphDefinitionGraphDefinitionLinkTargetCompartmentComponentElements( 39248 GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent element) throws IOException { 39249 composeBackboneElementElements(element); 39250 if (element.hasUseElement()) 39251 composeEnumeration("use", element.getUseElement(), new GraphDefinition.GraphCompartmentUseEnumFactory()); 39252 if (element.hasCodeElement()) 39253 composeEnumeration("code", element.getCodeElement(), new GraphDefinition.CompartmentCodeEnumFactory()); 39254 if (element.hasRuleElement()) 39255 composeEnumeration("rule", element.getRuleElement(), new GraphDefinition.GraphCompartmentRuleEnumFactory()); 39256 if (element.hasExpressionElement()) { 39257 composeString("expression", element.getExpressionElement()); 39258 } 39259 if (element.hasDescriptionElement()) { 39260 composeString("description", element.getDescriptionElement()); 39261 } 39262 } 39263 39264 protected void composeGroup(String name, Group element) throws IOException { 39265 if (element != null) { 39266 composeDomainResourceAttributes(element); 39267 xml.enter(FHIR_NS, name); 39268 composeGroupElements(element); 39269 composeElementClose(element); 39270 xml.exit(FHIR_NS, name); 39271 } 39272 } 39273 39274 protected void composeGroupElements(Group element) throws IOException { 39275 composeDomainResourceElements(element); 39276 if (element.hasIdentifier()) { 39277 for (Identifier e : element.getIdentifier()) 39278 composeIdentifier("identifier", e); 39279 } 39280 if (element.hasActiveElement()) { 39281 composeBoolean("active", element.getActiveElement()); 39282 } 39283 if (element.hasTypeElement()) 39284 composeEnumeration("type", element.getTypeElement(), new Group.GroupTypeEnumFactory()); 39285 if (element.hasActualElement()) { 39286 composeBoolean("actual", element.getActualElement()); 39287 } 39288 if (element.hasCode()) { 39289 composeCodeableConcept("code", element.getCode()); 39290 } 39291 if (element.hasNameElement()) { 39292 composeString("name", element.getNameElement()); 39293 } 39294 if (element.hasQuantityElement()) { 39295 composeUnsignedInt("quantity", element.getQuantityElement()); 39296 } 39297 if (element.hasManagingEntity()) { 39298 composeReference("managingEntity", element.getManagingEntity()); 39299 } 39300 if (element.hasCharacteristic()) { 39301 for (Group.GroupCharacteristicComponent e : element.getCharacteristic()) 39302 composeGroupGroupCharacteristicComponent("characteristic", e); 39303 } 39304 if (element.hasMember()) { 39305 for (Group.GroupMemberComponent e : element.getMember()) 39306 composeGroupGroupMemberComponent("member", e); 39307 } 39308 } 39309 39310 protected void composeGroupGroupCharacteristicComponent(String name, Group.GroupCharacteristicComponent element) 39311 throws IOException { 39312 if (element != null) { 39313 composeElementAttributes(element); 39314 xml.enter(FHIR_NS, name); 39315 composeGroupGroupCharacteristicComponentElements(element); 39316 composeElementClose(element); 39317 xml.exit(FHIR_NS, name); 39318 } 39319 } 39320 39321 protected void composeGroupGroupCharacteristicComponentElements(Group.GroupCharacteristicComponent element) 39322 throws IOException { 39323 composeBackboneElementElements(element); 39324 if (element.hasCode()) { 39325 composeCodeableConcept("code", element.getCode()); 39326 } 39327 if (element.hasValue()) { 39328 composeType("value", element.getValue()); 39329 } 39330 if (element.hasExcludeElement()) { 39331 composeBoolean("exclude", element.getExcludeElement()); 39332 } 39333 if (element.hasPeriod()) { 39334 composePeriod("period", element.getPeriod()); 39335 } 39336 } 39337 39338 protected void composeGroupGroupMemberComponent(String name, Group.GroupMemberComponent element) throws IOException { 39339 if (element != null) { 39340 composeElementAttributes(element); 39341 xml.enter(FHIR_NS, name); 39342 composeGroupGroupMemberComponentElements(element); 39343 composeElementClose(element); 39344 xml.exit(FHIR_NS, name); 39345 } 39346 } 39347 39348 protected void composeGroupGroupMemberComponentElements(Group.GroupMemberComponent element) throws IOException { 39349 composeBackboneElementElements(element); 39350 if (element.hasEntity()) { 39351 composeReference("entity", element.getEntity()); 39352 } 39353 if (element.hasPeriod()) { 39354 composePeriod("period", element.getPeriod()); 39355 } 39356 if (element.hasInactiveElement()) { 39357 composeBoolean("inactive", element.getInactiveElement()); 39358 } 39359 } 39360 39361 protected void composeGuidanceResponse(String name, GuidanceResponse element) throws IOException { 39362 if (element != null) { 39363 composeDomainResourceAttributes(element); 39364 xml.enter(FHIR_NS, name); 39365 composeGuidanceResponseElements(element); 39366 composeElementClose(element); 39367 xml.exit(FHIR_NS, name); 39368 } 39369 } 39370 39371 protected void composeGuidanceResponseElements(GuidanceResponse element) throws IOException { 39372 composeDomainResourceElements(element); 39373 if (element.hasRequestIdentifier()) { 39374 composeIdentifier("requestIdentifier", element.getRequestIdentifier()); 39375 } 39376 if (element.hasIdentifier()) { 39377 for (Identifier e : element.getIdentifier()) 39378 composeIdentifier("identifier", e); 39379 } 39380 if (element.hasModule()) { 39381 composeType("module", element.getModule()); 39382 } 39383 if (element.hasStatusElement()) 39384 composeEnumeration("status", element.getStatusElement(), 39385 new GuidanceResponse.GuidanceResponseStatusEnumFactory()); 39386 if (element.hasSubject()) { 39387 composeReference("subject", element.getSubject()); 39388 } 39389 if (element.hasEncounter()) { 39390 composeReference("encounter", element.getEncounter()); 39391 } 39392 if (element.hasOccurrenceDateTimeElement()) { 39393 composeDateTime("occurrenceDateTime", element.getOccurrenceDateTimeElement()); 39394 } 39395 if (element.hasPerformer()) { 39396 composeReference("performer", element.getPerformer()); 39397 } 39398 if (element.hasReasonCode()) { 39399 for (CodeableConcept e : element.getReasonCode()) 39400 composeCodeableConcept("reasonCode", e); 39401 } 39402 if (element.hasReasonReference()) { 39403 for (Reference e : element.getReasonReference()) 39404 composeReference("reasonReference", e); 39405 } 39406 if (element.hasNote()) { 39407 for (Annotation e : element.getNote()) 39408 composeAnnotation("note", e); 39409 } 39410 if (element.hasEvaluationMessage()) { 39411 for (Reference e : element.getEvaluationMessage()) 39412 composeReference("evaluationMessage", e); 39413 } 39414 if (element.hasOutputParameters()) { 39415 composeReference("outputParameters", element.getOutputParameters()); 39416 } 39417 if (element.hasResult()) { 39418 composeReference("result", element.getResult()); 39419 } 39420 if (element.hasDataRequirement()) { 39421 for (DataRequirement e : element.getDataRequirement()) 39422 composeDataRequirement("dataRequirement", e); 39423 } 39424 } 39425 39426 protected void composeHealthcareService(String name, HealthcareService element) throws IOException { 39427 if (element != null) { 39428 composeDomainResourceAttributes(element); 39429 xml.enter(FHIR_NS, name); 39430 composeHealthcareServiceElements(element); 39431 composeElementClose(element); 39432 xml.exit(FHIR_NS, name); 39433 } 39434 } 39435 39436 protected void composeHealthcareServiceElements(HealthcareService element) throws IOException { 39437 composeDomainResourceElements(element); 39438 if (element.hasIdentifier()) { 39439 for (Identifier e : element.getIdentifier()) 39440 composeIdentifier("identifier", e); 39441 } 39442 if (element.hasActiveElement()) { 39443 composeBoolean("active", element.getActiveElement()); 39444 } 39445 if (element.hasProvidedBy()) { 39446 composeReference("providedBy", element.getProvidedBy()); 39447 } 39448 if (element.hasCategory()) { 39449 for (CodeableConcept e : element.getCategory()) 39450 composeCodeableConcept("category", e); 39451 } 39452 if (element.hasType()) { 39453 for (CodeableConcept e : element.getType()) 39454 composeCodeableConcept("type", e); 39455 } 39456 if (element.hasSpecialty()) { 39457 for (CodeableConcept e : element.getSpecialty()) 39458 composeCodeableConcept("specialty", e); 39459 } 39460 if (element.hasLocation()) { 39461 for (Reference e : element.getLocation()) 39462 composeReference("location", e); 39463 } 39464 if (element.hasNameElement()) { 39465 composeString("name", element.getNameElement()); 39466 } 39467 if (element.hasCommentElement()) { 39468 composeString("comment", element.getCommentElement()); 39469 } 39470 if (element.hasExtraDetailsElement()) { 39471 composeMarkdown("extraDetails", element.getExtraDetailsElement()); 39472 } 39473 if (element.hasPhoto()) { 39474 composeAttachment("photo", element.getPhoto()); 39475 } 39476 if (element.hasTelecom()) { 39477 for (ContactPoint e : element.getTelecom()) 39478 composeContactPoint("telecom", e); 39479 } 39480 if (element.hasCoverageArea()) { 39481 for (Reference e : element.getCoverageArea()) 39482 composeReference("coverageArea", e); 39483 } 39484 if (element.hasServiceProvisionCode()) { 39485 for (CodeableConcept e : element.getServiceProvisionCode()) 39486 composeCodeableConcept("serviceProvisionCode", e); 39487 } 39488 if (element.hasEligibility()) { 39489 for (HealthcareService.HealthcareServiceEligibilityComponent e : element.getEligibility()) 39490 composeHealthcareServiceHealthcareServiceEligibilityComponent("eligibility", e); 39491 } 39492 if (element.hasProgram()) { 39493 for (CodeableConcept e : element.getProgram()) 39494 composeCodeableConcept("program", e); 39495 } 39496 if (element.hasCharacteristic()) { 39497 for (CodeableConcept e : element.getCharacteristic()) 39498 composeCodeableConcept("characteristic", e); 39499 } 39500 if (element.hasCommunication()) { 39501 for (CodeableConcept e : element.getCommunication()) 39502 composeCodeableConcept("communication", e); 39503 } 39504 if (element.hasReferralMethod()) { 39505 for (CodeableConcept e : element.getReferralMethod()) 39506 composeCodeableConcept("referralMethod", e); 39507 } 39508 if (element.hasAppointmentRequiredElement()) { 39509 composeBoolean("appointmentRequired", element.getAppointmentRequiredElement()); 39510 } 39511 if (element.hasAvailableTime()) { 39512 for (HealthcareService.HealthcareServiceAvailableTimeComponent e : element.getAvailableTime()) 39513 composeHealthcareServiceHealthcareServiceAvailableTimeComponent("availableTime", e); 39514 } 39515 if (element.hasNotAvailable()) { 39516 for (HealthcareService.HealthcareServiceNotAvailableComponent e : element.getNotAvailable()) 39517 composeHealthcareServiceHealthcareServiceNotAvailableComponent("notAvailable", e); 39518 } 39519 if (element.hasAvailabilityExceptionsElement()) { 39520 composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); 39521 } 39522 if (element.hasEndpoint()) { 39523 for (Reference e : element.getEndpoint()) 39524 composeReference("endpoint", e); 39525 } 39526 } 39527 39528 protected void composeHealthcareServiceHealthcareServiceEligibilityComponent(String name, 39529 HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException { 39530 if (element != null) { 39531 composeElementAttributes(element); 39532 xml.enter(FHIR_NS, name); 39533 composeHealthcareServiceHealthcareServiceEligibilityComponentElements(element); 39534 composeElementClose(element); 39535 xml.exit(FHIR_NS, name); 39536 } 39537 } 39538 39539 protected void composeHealthcareServiceHealthcareServiceEligibilityComponentElements( 39540 HealthcareService.HealthcareServiceEligibilityComponent element) throws IOException { 39541 composeBackboneElementElements(element); 39542 if (element.hasCode()) { 39543 composeCodeableConcept("code", element.getCode()); 39544 } 39545 if (element.hasCommentElement()) { 39546 composeMarkdown("comment", element.getCommentElement()); 39547 } 39548 } 39549 39550 protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(String name, 39551 HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { 39552 if (element != null) { 39553 composeElementAttributes(element); 39554 xml.enter(FHIR_NS, name); 39555 composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements(element); 39556 composeElementClose(element); 39557 xml.exit(FHIR_NS, name); 39558 } 39559 } 39560 39561 protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponentElements( 39562 HealthcareService.HealthcareServiceAvailableTimeComponent element) throws IOException { 39563 composeBackboneElementElements(element); 39564 if (element.hasDaysOfWeek()) 39565 for (Enumeration<HealthcareService.DaysOfWeek> e : element.getDaysOfWeek()) 39566 composeEnumeration("daysOfWeek", e, new HealthcareService.DaysOfWeekEnumFactory()); 39567 if (element.hasAllDayElement()) { 39568 composeBoolean("allDay", element.getAllDayElement()); 39569 } 39570 if (element.hasAvailableStartTimeElement()) { 39571 composeTime("availableStartTime", element.getAvailableStartTimeElement()); 39572 } 39573 if (element.hasAvailableEndTimeElement()) { 39574 composeTime("availableEndTime", element.getAvailableEndTimeElement()); 39575 } 39576 } 39577 39578 protected void composeHealthcareServiceHealthcareServiceNotAvailableComponent(String name, 39579 HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { 39580 if (element != null) { 39581 composeElementAttributes(element); 39582 xml.enter(FHIR_NS, name); 39583 composeHealthcareServiceHealthcareServiceNotAvailableComponentElements(element); 39584 composeElementClose(element); 39585 xml.exit(FHIR_NS, name); 39586 } 39587 } 39588 39589 protected void composeHealthcareServiceHealthcareServiceNotAvailableComponentElements( 39590 HealthcareService.HealthcareServiceNotAvailableComponent element) throws IOException { 39591 composeBackboneElementElements(element); 39592 if (element.hasDescriptionElement()) { 39593 composeString("description", element.getDescriptionElement()); 39594 } 39595 if (element.hasDuring()) { 39596 composePeriod("during", element.getDuring()); 39597 } 39598 } 39599 39600 protected void composeImagingStudy(String name, ImagingStudy element) throws IOException { 39601 if (element != null) { 39602 composeDomainResourceAttributes(element); 39603 xml.enter(FHIR_NS, name); 39604 composeImagingStudyElements(element); 39605 composeElementClose(element); 39606 xml.exit(FHIR_NS, name); 39607 } 39608 } 39609 39610 protected void composeImagingStudyElements(ImagingStudy element) throws IOException { 39611 composeDomainResourceElements(element); 39612 if (element.hasIdentifier()) { 39613 for (Identifier e : element.getIdentifier()) 39614 composeIdentifier("identifier", e); 39615 } 39616 if (element.hasStatusElement()) 39617 composeEnumeration("status", element.getStatusElement(), new ImagingStudy.ImagingStudyStatusEnumFactory()); 39618 if (element.hasModality()) { 39619 for (Coding e : element.getModality()) 39620 composeCoding("modality", e); 39621 } 39622 if (element.hasSubject()) { 39623 composeReference("subject", element.getSubject()); 39624 } 39625 if (element.hasEncounter()) { 39626 composeReference("encounter", element.getEncounter()); 39627 } 39628 if (element.hasStartedElement()) { 39629 composeDateTime("started", element.getStartedElement()); 39630 } 39631 if (element.hasBasedOn()) { 39632 for (Reference e : element.getBasedOn()) 39633 composeReference("basedOn", e); 39634 } 39635 if (element.hasReferrer()) { 39636 composeReference("referrer", element.getReferrer()); 39637 } 39638 if (element.hasInterpreter()) { 39639 for (Reference e : element.getInterpreter()) 39640 composeReference("interpreter", e); 39641 } 39642 if (element.hasEndpoint()) { 39643 for (Reference e : element.getEndpoint()) 39644 composeReference("endpoint", e); 39645 } 39646 if (element.hasNumberOfSeriesElement()) { 39647 composeUnsignedInt("numberOfSeries", element.getNumberOfSeriesElement()); 39648 } 39649 if (element.hasNumberOfInstancesElement()) { 39650 composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); 39651 } 39652 if (element.hasProcedureReference()) { 39653 composeReference("procedureReference", element.getProcedureReference()); 39654 } 39655 if (element.hasProcedureCode()) { 39656 for (CodeableConcept e : element.getProcedureCode()) 39657 composeCodeableConcept("procedureCode", e); 39658 } 39659 if (element.hasLocation()) { 39660 composeReference("location", element.getLocation()); 39661 } 39662 if (element.hasReasonCode()) { 39663 for (CodeableConcept e : element.getReasonCode()) 39664 composeCodeableConcept("reasonCode", e); 39665 } 39666 if (element.hasReasonReference()) { 39667 for (Reference e : element.getReasonReference()) 39668 composeReference("reasonReference", e); 39669 } 39670 if (element.hasNote()) { 39671 for (Annotation e : element.getNote()) 39672 composeAnnotation("note", e); 39673 } 39674 if (element.hasDescriptionElement()) { 39675 composeString("description", element.getDescriptionElement()); 39676 } 39677 if (element.hasSeries()) { 39678 for (ImagingStudy.ImagingStudySeriesComponent e : element.getSeries()) 39679 composeImagingStudyImagingStudySeriesComponent("series", e); 39680 } 39681 } 39682 39683 protected void composeImagingStudyImagingStudySeriesComponent(String name, 39684 ImagingStudy.ImagingStudySeriesComponent element) throws IOException { 39685 if (element != null) { 39686 composeElementAttributes(element); 39687 xml.enter(FHIR_NS, name); 39688 composeImagingStudyImagingStudySeriesComponentElements(element); 39689 composeElementClose(element); 39690 xml.exit(FHIR_NS, name); 39691 } 39692 } 39693 39694 protected void composeImagingStudyImagingStudySeriesComponentElements( 39695 ImagingStudy.ImagingStudySeriesComponent element) throws IOException { 39696 composeBackboneElementElements(element); 39697 if (element.hasUidElement()) { 39698 composeId("uid", element.getUidElement()); 39699 } 39700 if (element.hasNumberElement()) { 39701 composeUnsignedInt("number", element.getNumberElement()); 39702 } 39703 if (element.hasModality()) { 39704 composeCoding("modality", element.getModality()); 39705 } 39706 if (element.hasDescriptionElement()) { 39707 composeString("description", element.getDescriptionElement()); 39708 } 39709 if (element.hasNumberOfInstancesElement()) { 39710 composeUnsignedInt("numberOfInstances", element.getNumberOfInstancesElement()); 39711 } 39712 if (element.hasEndpoint()) { 39713 for (Reference e : element.getEndpoint()) 39714 composeReference("endpoint", e); 39715 } 39716 if (element.hasBodySite()) { 39717 composeCoding("bodySite", element.getBodySite()); 39718 } 39719 if (element.hasLaterality()) { 39720 composeCoding("laterality", element.getLaterality()); 39721 } 39722 if (element.hasSpecimen()) { 39723 for (Reference e : element.getSpecimen()) 39724 composeReference("specimen", e); 39725 } 39726 if (element.hasStartedElement()) { 39727 composeDateTime("started", element.getStartedElement()); 39728 } 39729 if (element.hasPerformer()) { 39730 for (ImagingStudy.ImagingStudySeriesPerformerComponent e : element.getPerformer()) 39731 composeImagingStudyImagingStudySeriesPerformerComponent("performer", e); 39732 } 39733 if (element.hasInstance()) { 39734 for (ImagingStudy.ImagingStudySeriesInstanceComponent e : element.getInstance()) 39735 composeImagingStudyImagingStudySeriesInstanceComponent("instance", e); 39736 } 39737 } 39738 39739 protected void composeImagingStudyImagingStudySeriesPerformerComponent(String name, 39740 ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException { 39741 if (element != null) { 39742 composeElementAttributes(element); 39743 xml.enter(FHIR_NS, name); 39744 composeImagingStudyImagingStudySeriesPerformerComponentElements(element); 39745 composeElementClose(element); 39746 xml.exit(FHIR_NS, name); 39747 } 39748 } 39749 39750 protected void composeImagingStudyImagingStudySeriesPerformerComponentElements( 39751 ImagingStudy.ImagingStudySeriesPerformerComponent element) throws IOException { 39752 composeBackboneElementElements(element); 39753 if (element.hasFunction()) { 39754 composeCodeableConcept("function", element.getFunction()); 39755 } 39756 if (element.hasActor()) { 39757 composeReference("actor", element.getActor()); 39758 } 39759 } 39760 39761 protected void composeImagingStudyImagingStudySeriesInstanceComponent(String name, 39762 ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { 39763 if (element != null) { 39764 composeElementAttributes(element); 39765 xml.enter(FHIR_NS, name); 39766 composeImagingStudyImagingStudySeriesInstanceComponentElements(element); 39767 composeElementClose(element); 39768 xml.exit(FHIR_NS, name); 39769 } 39770 } 39771 39772 protected void composeImagingStudyImagingStudySeriesInstanceComponentElements( 39773 ImagingStudy.ImagingStudySeriesInstanceComponent element) throws IOException { 39774 composeBackboneElementElements(element); 39775 if (element.hasUidElement()) { 39776 composeId("uid", element.getUidElement()); 39777 } 39778 if (element.hasSopClass()) { 39779 composeCoding("sopClass", element.getSopClass()); 39780 } 39781 if (element.hasNumberElement()) { 39782 composeUnsignedInt("number", element.getNumberElement()); 39783 } 39784 if (element.hasTitleElement()) { 39785 composeString("title", element.getTitleElement()); 39786 } 39787 } 39788 39789 protected void composeImmunization(String name, Immunization element) throws IOException { 39790 if (element != null) { 39791 composeDomainResourceAttributes(element); 39792 xml.enter(FHIR_NS, name); 39793 composeImmunizationElements(element); 39794 composeElementClose(element); 39795 xml.exit(FHIR_NS, name); 39796 } 39797 } 39798 39799 protected void composeImmunizationElements(Immunization element) throws IOException { 39800 composeDomainResourceElements(element); 39801 if (element.hasIdentifier()) { 39802 for (Identifier e : element.getIdentifier()) 39803 composeIdentifier("identifier", e); 39804 } 39805 if (element.hasStatusElement()) 39806 composeEnumeration("status", element.getStatusElement(), new Immunization.ImmunizationStatusEnumFactory()); 39807 if (element.hasStatusReason()) { 39808 composeCodeableConcept("statusReason", element.getStatusReason()); 39809 } 39810 if (element.hasVaccineCode()) { 39811 composeCodeableConcept("vaccineCode", element.getVaccineCode()); 39812 } 39813 if (element.hasPatient()) { 39814 composeReference("patient", element.getPatient()); 39815 } 39816 if (element.hasEncounter()) { 39817 composeReference("encounter", element.getEncounter()); 39818 } 39819 if (element.hasOccurrence()) { 39820 composeType("occurrence", element.getOccurrence()); 39821 } 39822 if (element.hasRecordedElement()) { 39823 composeDateTime("recorded", element.getRecordedElement()); 39824 } 39825 if (element.hasPrimarySourceElement()) { 39826 composeBoolean("primarySource", element.getPrimarySourceElement()); 39827 } 39828 if (element.hasReportOrigin()) { 39829 composeCodeableConcept("reportOrigin", element.getReportOrigin()); 39830 } 39831 if (element.hasLocation()) { 39832 composeReference("location", element.getLocation()); 39833 } 39834 if (element.hasManufacturer()) { 39835 composeReference("manufacturer", element.getManufacturer()); 39836 } 39837 if (element.hasLotNumberElement()) { 39838 composeString("lotNumber", element.getLotNumberElement()); 39839 } 39840 if (element.hasExpirationDateElement()) { 39841 composeDate("expirationDate", element.getExpirationDateElement()); 39842 } 39843 if (element.hasSite()) { 39844 composeCodeableConcept("site", element.getSite()); 39845 } 39846 if (element.hasRoute()) { 39847 composeCodeableConcept("route", element.getRoute()); 39848 } 39849 if (element.hasDoseQuantity()) { 39850 composeQuantity("doseQuantity", element.getDoseQuantity()); 39851 } 39852 if (element.hasPerformer()) { 39853 for (Immunization.ImmunizationPerformerComponent e : element.getPerformer()) 39854 composeImmunizationImmunizationPerformerComponent("performer", e); 39855 } 39856 if (element.hasNote()) { 39857 for (Annotation e : element.getNote()) 39858 composeAnnotation("note", e); 39859 } 39860 if (element.hasReasonCode()) { 39861 for (CodeableConcept e : element.getReasonCode()) 39862 composeCodeableConcept("reasonCode", e); 39863 } 39864 if (element.hasReasonReference()) { 39865 for (Reference e : element.getReasonReference()) 39866 composeReference("reasonReference", e); 39867 } 39868 if (element.hasIsSubpotentElement()) { 39869 composeBoolean("isSubpotent", element.getIsSubpotentElement()); 39870 } 39871 if (element.hasSubpotentReason()) { 39872 for (CodeableConcept e : element.getSubpotentReason()) 39873 composeCodeableConcept("subpotentReason", e); 39874 } 39875 if (element.hasEducation()) { 39876 for (Immunization.ImmunizationEducationComponent e : element.getEducation()) 39877 composeImmunizationImmunizationEducationComponent("education", e); 39878 } 39879 if (element.hasProgramEligibility()) { 39880 for (CodeableConcept e : element.getProgramEligibility()) 39881 composeCodeableConcept("programEligibility", e); 39882 } 39883 if (element.hasFundingSource()) { 39884 composeCodeableConcept("fundingSource", element.getFundingSource()); 39885 } 39886 if (element.hasReaction()) { 39887 for (Immunization.ImmunizationReactionComponent e : element.getReaction()) 39888 composeImmunizationImmunizationReactionComponent("reaction", e); 39889 } 39890 if (element.hasProtocolApplied()) { 39891 for (Immunization.ImmunizationProtocolAppliedComponent e : element.getProtocolApplied()) 39892 composeImmunizationImmunizationProtocolAppliedComponent("protocolApplied", e); 39893 } 39894 } 39895 39896 protected void composeImmunizationImmunizationPerformerComponent(String name, 39897 Immunization.ImmunizationPerformerComponent element) throws IOException { 39898 if (element != null) { 39899 composeElementAttributes(element); 39900 xml.enter(FHIR_NS, name); 39901 composeImmunizationImmunizationPerformerComponentElements(element); 39902 composeElementClose(element); 39903 xml.exit(FHIR_NS, name); 39904 } 39905 } 39906 39907 protected void composeImmunizationImmunizationPerformerComponentElements( 39908 Immunization.ImmunizationPerformerComponent element) throws IOException { 39909 composeBackboneElementElements(element); 39910 if (element.hasFunction()) { 39911 composeCodeableConcept("function", element.getFunction()); 39912 } 39913 if (element.hasActor()) { 39914 composeReference("actor", element.getActor()); 39915 } 39916 } 39917 39918 protected void composeImmunizationImmunizationEducationComponent(String name, 39919 Immunization.ImmunizationEducationComponent element) throws IOException { 39920 if (element != null) { 39921 composeElementAttributes(element); 39922 xml.enter(FHIR_NS, name); 39923 composeImmunizationImmunizationEducationComponentElements(element); 39924 composeElementClose(element); 39925 xml.exit(FHIR_NS, name); 39926 } 39927 } 39928 39929 protected void composeImmunizationImmunizationEducationComponentElements( 39930 Immunization.ImmunizationEducationComponent element) throws IOException { 39931 composeBackboneElementElements(element); 39932 if (element.hasDocumentTypeElement()) { 39933 composeString("documentType", element.getDocumentTypeElement()); 39934 } 39935 if (element.hasReferenceElement()) { 39936 composeUri("reference", element.getReferenceElement()); 39937 } 39938 if (element.hasPublicationDateElement()) { 39939 composeDateTime("publicationDate", element.getPublicationDateElement()); 39940 } 39941 if (element.hasPresentationDateElement()) { 39942 composeDateTime("presentationDate", element.getPresentationDateElement()); 39943 } 39944 } 39945 39946 protected void composeImmunizationImmunizationReactionComponent(String name, 39947 Immunization.ImmunizationReactionComponent element) throws IOException { 39948 if (element != null) { 39949 composeElementAttributes(element); 39950 xml.enter(FHIR_NS, name); 39951 composeImmunizationImmunizationReactionComponentElements(element); 39952 composeElementClose(element); 39953 xml.exit(FHIR_NS, name); 39954 } 39955 } 39956 39957 protected void composeImmunizationImmunizationReactionComponentElements( 39958 Immunization.ImmunizationReactionComponent element) throws IOException { 39959 composeBackboneElementElements(element); 39960 if (element.hasDateElement()) { 39961 composeDateTime("date", element.getDateElement()); 39962 } 39963 if (element.hasDetail()) { 39964 composeReference("detail", element.getDetail()); 39965 } 39966 if (element.hasReportedElement()) { 39967 composeBoolean("reported", element.getReportedElement()); 39968 } 39969 } 39970 39971 protected void composeImmunizationImmunizationProtocolAppliedComponent(String name, 39972 Immunization.ImmunizationProtocolAppliedComponent element) throws IOException { 39973 if (element != null) { 39974 composeElementAttributes(element); 39975 xml.enter(FHIR_NS, name); 39976 composeImmunizationImmunizationProtocolAppliedComponentElements(element); 39977 composeElementClose(element); 39978 xml.exit(FHIR_NS, name); 39979 } 39980 } 39981 39982 protected void composeImmunizationImmunizationProtocolAppliedComponentElements( 39983 Immunization.ImmunizationProtocolAppliedComponent element) throws IOException { 39984 composeBackboneElementElements(element); 39985 if (element.hasSeriesElement()) { 39986 composeString("series", element.getSeriesElement()); 39987 } 39988 if (element.hasAuthority()) { 39989 composeReference("authority", element.getAuthority()); 39990 } 39991 if (element.hasTargetDisease()) { 39992 for (CodeableConcept e : element.getTargetDisease()) 39993 composeCodeableConcept("targetDisease", e); 39994 } 39995 if (element.hasDoseNumber()) { 39996 composeType("doseNumber", element.getDoseNumber()); 39997 } 39998 if (element.hasSeriesDoses()) { 39999 composeType("seriesDoses", element.getSeriesDoses()); 40000 } 40001 } 40002 40003 protected void composeImmunizationEvaluation(String name, ImmunizationEvaluation element) throws IOException { 40004 if (element != null) { 40005 composeDomainResourceAttributes(element); 40006 xml.enter(FHIR_NS, name); 40007 composeImmunizationEvaluationElements(element); 40008 composeElementClose(element); 40009 xml.exit(FHIR_NS, name); 40010 } 40011 } 40012 40013 protected void composeImmunizationEvaluationElements(ImmunizationEvaluation element) throws IOException { 40014 composeDomainResourceElements(element); 40015 if (element.hasIdentifier()) { 40016 for (Identifier e : element.getIdentifier()) 40017 composeIdentifier("identifier", e); 40018 } 40019 if (element.hasStatusElement()) 40020 composeEnumeration("status", element.getStatusElement(), 40021 new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory()); 40022 if (element.hasPatient()) { 40023 composeReference("patient", element.getPatient()); 40024 } 40025 if (element.hasDateElement()) { 40026 composeDateTime("date", element.getDateElement()); 40027 } 40028 if (element.hasAuthority()) { 40029 composeReference("authority", element.getAuthority()); 40030 } 40031 if (element.hasTargetDisease()) { 40032 composeCodeableConcept("targetDisease", element.getTargetDisease()); 40033 } 40034 if (element.hasImmunizationEvent()) { 40035 composeReference("immunizationEvent", element.getImmunizationEvent()); 40036 } 40037 if (element.hasDoseStatus()) { 40038 composeCodeableConcept("doseStatus", element.getDoseStatus()); 40039 } 40040 if (element.hasDoseStatusReason()) { 40041 for (CodeableConcept e : element.getDoseStatusReason()) 40042 composeCodeableConcept("doseStatusReason", e); 40043 } 40044 if (element.hasDescriptionElement()) { 40045 composeString("description", element.getDescriptionElement()); 40046 } 40047 if (element.hasSeriesElement()) { 40048 composeString("series", element.getSeriesElement()); 40049 } 40050 if (element.hasDoseNumber()) { 40051 composeType("doseNumber", element.getDoseNumber()); 40052 } 40053 if (element.hasSeriesDoses()) { 40054 composeType("seriesDoses", element.getSeriesDoses()); 40055 } 40056 } 40057 40058 protected void composeImmunizationRecommendation(String name, ImmunizationRecommendation element) throws IOException { 40059 if (element != null) { 40060 composeDomainResourceAttributes(element); 40061 xml.enter(FHIR_NS, name); 40062 composeImmunizationRecommendationElements(element); 40063 composeElementClose(element); 40064 xml.exit(FHIR_NS, name); 40065 } 40066 } 40067 40068 protected void composeImmunizationRecommendationElements(ImmunizationRecommendation element) throws IOException { 40069 composeDomainResourceElements(element); 40070 if (element.hasIdentifier()) { 40071 for (Identifier e : element.getIdentifier()) 40072 composeIdentifier("identifier", e); 40073 } 40074 if (element.hasPatient()) { 40075 composeReference("patient", element.getPatient()); 40076 } 40077 if (element.hasDateElement()) { 40078 composeDateTime("date", element.getDateElement()); 40079 } 40080 if (element.hasAuthority()) { 40081 composeReference("authority", element.getAuthority()); 40082 } 40083 if (element.hasRecommendation()) { 40084 for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent e : element.getRecommendation()) 40085 composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent("recommendation", e); 40086 } 40087 } 40088 40089 protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponent(String name, 40090 ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { 40091 if (element != null) { 40092 composeElementAttributes(element); 40093 xml.enter(FHIR_NS, name); 40094 composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements(element); 40095 composeElementClose(element); 40096 xml.exit(FHIR_NS, name); 40097 } 40098 } 40099 40100 protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentElements( 40101 ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException { 40102 composeBackboneElementElements(element); 40103 if (element.hasVaccineCode()) { 40104 for (CodeableConcept e : element.getVaccineCode()) 40105 composeCodeableConcept("vaccineCode", e); 40106 } 40107 if (element.hasTargetDisease()) { 40108 composeCodeableConcept("targetDisease", element.getTargetDisease()); 40109 } 40110 if (element.hasContraindicatedVaccineCode()) { 40111 for (CodeableConcept e : element.getContraindicatedVaccineCode()) 40112 composeCodeableConcept("contraindicatedVaccineCode", e); 40113 } 40114 if (element.hasForecastStatus()) { 40115 composeCodeableConcept("forecastStatus", element.getForecastStatus()); 40116 } 40117 if (element.hasForecastReason()) { 40118 for (CodeableConcept e : element.getForecastReason()) 40119 composeCodeableConcept("forecastReason", e); 40120 } 40121 if (element.hasDateCriterion()) { 40122 for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element 40123 .getDateCriterion()) 40124 composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent("dateCriterion", 40125 e); 40126 } 40127 if (element.hasDescriptionElement()) { 40128 composeString("description", element.getDescriptionElement()); 40129 } 40130 if (element.hasSeriesElement()) { 40131 composeString("series", element.getSeriesElement()); 40132 } 40133 if (element.hasDoseNumber()) { 40134 composeType("doseNumber", element.getDoseNumber()); 40135 } 40136 if (element.hasSeriesDoses()) { 40137 composeType("seriesDoses", element.getSeriesDoses()); 40138 } 40139 if (element.hasSupportingImmunization()) { 40140 for (Reference e : element.getSupportingImmunization()) 40141 composeReference("supportingImmunization", e); 40142 } 40143 if (element.hasSupportingPatientInformation()) { 40144 for (Reference e : element.getSupportingPatientInformation()) 40145 composeReference("supportingPatientInformation", e); 40146 } 40147 } 40148 40149 protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent( 40150 String name, ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) 40151 throws IOException { 40152 if (element != null) { 40153 composeElementAttributes(element); 40154 xml.enter(FHIR_NS, name); 40155 composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements(element); 40156 composeElementClose(element); 40157 xml.exit(FHIR_NS, name); 40158 } 40159 } 40160 40161 protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponentElements( 40162 ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent element) 40163 throws IOException { 40164 composeBackboneElementElements(element); 40165 if (element.hasCode()) { 40166 composeCodeableConcept("code", element.getCode()); 40167 } 40168 if (element.hasValueElement()) { 40169 composeDateTime("value", element.getValueElement()); 40170 } 40171 } 40172 40173 protected void composeImplementationGuide(String name, ImplementationGuide element) throws IOException { 40174 if (element != null) { 40175 composeDomainResourceAttributes(element); 40176 xml.enter(FHIR_NS, name); 40177 composeImplementationGuideElements(element); 40178 composeElementClose(element); 40179 xml.exit(FHIR_NS, name); 40180 } 40181 } 40182 40183 protected void composeImplementationGuideElements(ImplementationGuide element) throws IOException { 40184 composeDomainResourceElements(element); 40185 if (element.hasUrlElement()) { 40186 composeUri("url", element.getUrlElement()); 40187 } 40188 if (element.hasVersionElement()) { 40189 composeString("version", element.getVersionElement()); 40190 } 40191 if (element.hasNameElement()) { 40192 composeString("name", element.getNameElement()); 40193 } 40194 if (element.hasTitleElement()) { 40195 composeString("title", element.getTitleElement()); 40196 } 40197 if (element.hasStatusElement()) 40198 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 40199 if (element.hasExperimentalElement()) { 40200 composeBoolean("experimental", element.getExperimentalElement()); 40201 } 40202 if (element.hasDateElement()) { 40203 composeDateTime("date", element.getDateElement()); 40204 } 40205 if (element.hasPublisherElement()) { 40206 composeString("publisher", element.getPublisherElement()); 40207 } 40208 if (element.hasContact()) { 40209 for (ContactDetail e : element.getContact()) 40210 composeContactDetail("contact", e); 40211 } 40212 if (element.hasDescriptionElement()) { 40213 composeMarkdown("description", element.getDescriptionElement()); 40214 } 40215 if (element.hasUseContext()) { 40216 for (UsageContext e : element.getUseContext()) 40217 composeUsageContext("useContext", e); 40218 } 40219 if (element.hasJurisdiction()) { 40220 for (CodeableConcept e : element.getJurisdiction()) 40221 composeCodeableConcept("jurisdiction", e); 40222 } 40223 if (element.hasCopyrightElement()) { 40224 composeMarkdown("copyright", element.getCopyrightElement()); 40225 } 40226 if (element.hasPackageIdElement()) { 40227 composeId("packageId", element.getPackageIdElement()); 40228 } 40229 if (element.hasLicenseElement()) 40230 composeEnumeration("license", element.getLicenseElement(), new ImplementationGuide.SPDXLicenseEnumFactory()); 40231 if (element.hasFhirVersion()) 40232 for (Enumeration<Enumerations.FHIRVersion> e : element.getFhirVersion()) 40233 composeEnumeration("fhirVersion", e, new Enumerations.FHIRVersionEnumFactory()); 40234 if (element.hasDependsOn()) { 40235 for (ImplementationGuide.ImplementationGuideDependsOnComponent e : element.getDependsOn()) 40236 composeImplementationGuideImplementationGuideDependsOnComponent("dependsOn", e); 40237 } 40238 if (element.hasGlobal()) { 40239 for (ImplementationGuide.ImplementationGuideGlobalComponent e : element.getGlobal()) 40240 composeImplementationGuideImplementationGuideGlobalComponent("global", e); 40241 } 40242 if (element.hasDefinition()) { 40243 composeImplementationGuideImplementationGuideDefinitionComponent("definition", element.getDefinition()); 40244 } 40245 if (element.hasManifest()) { 40246 composeImplementationGuideImplementationGuideManifestComponent("manifest", element.getManifest()); 40247 } 40248 } 40249 40250 protected void composeImplementationGuideImplementationGuideDependsOnComponent(String name, 40251 ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException { 40252 if (element != null) { 40253 composeElementAttributes(element); 40254 xml.enter(FHIR_NS, name); 40255 composeImplementationGuideImplementationGuideDependsOnComponentElements(element); 40256 composeElementClose(element); 40257 xml.exit(FHIR_NS, name); 40258 } 40259 } 40260 40261 protected void composeImplementationGuideImplementationGuideDependsOnComponentElements( 40262 ImplementationGuide.ImplementationGuideDependsOnComponent element) throws IOException { 40263 composeBackboneElementElements(element); 40264 if (element.hasUriElement()) { 40265 composeCanonical("uri", element.getUriElement()); 40266 } 40267 if (element.hasPackageIdElement()) { 40268 composeId("packageId", element.getPackageIdElement()); 40269 } 40270 if (element.hasVersionElement()) { 40271 composeString("version", element.getVersionElement()); 40272 } 40273 } 40274 40275 protected void composeImplementationGuideImplementationGuideGlobalComponent(String name, 40276 ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { 40277 if (element != null) { 40278 composeElementAttributes(element); 40279 xml.enter(FHIR_NS, name); 40280 composeImplementationGuideImplementationGuideGlobalComponentElements(element); 40281 composeElementClose(element); 40282 xml.exit(FHIR_NS, name); 40283 } 40284 } 40285 40286 protected void composeImplementationGuideImplementationGuideGlobalComponentElements( 40287 ImplementationGuide.ImplementationGuideGlobalComponent element) throws IOException { 40288 composeBackboneElementElements(element); 40289 if (element.hasTypeElement()) { 40290 composeCode("type", element.getTypeElement()); 40291 } 40292 if (element.hasProfileElement()) { 40293 composeCanonical("profile", element.getProfileElement()); 40294 } 40295 } 40296 40297 protected void composeImplementationGuideImplementationGuideDefinitionComponent(String name, 40298 ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException { 40299 if (element != null) { 40300 composeElementAttributes(element); 40301 xml.enter(FHIR_NS, name); 40302 composeImplementationGuideImplementationGuideDefinitionComponentElements(element); 40303 composeElementClose(element); 40304 xml.exit(FHIR_NS, name); 40305 } 40306 } 40307 40308 protected void composeImplementationGuideImplementationGuideDefinitionComponentElements( 40309 ImplementationGuide.ImplementationGuideDefinitionComponent element) throws IOException { 40310 composeBackboneElementElements(element); 40311 if (element.hasGrouping()) { 40312 for (ImplementationGuide.ImplementationGuideDefinitionGroupingComponent e : element.getGrouping()) 40313 composeImplementationGuideImplementationGuideDefinitionGroupingComponent("grouping", e); 40314 } 40315 if (element.hasResource()) { 40316 for (ImplementationGuide.ImplementationGuideDefinitionResourceComponent e : element.getResource()) 40317 composeImplementationGuideImplementationGuideDefinitionResourceComponent("resource", e); 40318 } 40319 if (element.hasPage()) { 40320 composeImplementationGuideImplementationGuideDefinitionPageComponent("page", element.getPage()); 40321 } 40322 if (element.hasParameter()) { 40323 for (ImplementationGuide.ImplementationGuideDefinitionParameterComponent e : element.getParameter()) 40324 composeImplementationGuideImplementationGuideDefinitionParameterComponent("parameter", e); 40325 } 40326 if (element.hasTemplate()) { 40327 for (ImplementationGuide.ImplementationGuideDefinitionTemplateComponent e : element.getTemplate()) 40328 composeImplementationGuideImplementationGuideDefinitionTemplateComponent("template", e); 40329 } 40330 } 40331 40332 protected void composeImplementationGuideImplementationGuideDefinitionGroupingComponent(String name, 40333 ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException { 40334 if (element != null) { 40335 composeElementAttributes(element); 40336 xml.enter(FHIR_NS, name); 40337 composeImplementationGuideImplementationGuideDefinitionGroupingComponentElements(element); 40338 composeElementClose(element); 40339 xml.exit(FHIR_NS, name); 40340 } 40341 } 40342 40343 protected void composeImplementationGuideImplementationGuideDefinitionGroupingComponentElements( 40344 ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element) throws IOException { 40345 composeBackboneElementElements(element); 40346 if (element.hasNameElement()) { 40347 composeString("name", element.getNameElement()); 40348 } 40349 if (element.hasDescriptionElement()) { 40350 composeString("description", element.getDescriptionElement()); 40351 } 40352 } 40353 40354 protected void composeImplementationGuideImplementationGuideDefinitionResourceComponent(String name, 40355 ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException { 40356 if (element != null) { 40357 composeElementAttributes(element); 40358 xml.enter(FHIR_NS, name); 40359 composeImplementationGuideImplementationGuideDefinitionResourceComponentElements(element); 40360 composeElementClose(element); 40361 xml.exit(FHIR_NS, name); 40362 } 40363 } 40364 40365 protected void composeImplementationGuideImplementationGuideDefinitionResourceComponentElements( 40366 ImplementationGuide.ImplementationGuideDefinitionResourceComponent element) throws IOException { 40367 composeBackboneElementElements(element); 40368 if (element.hasReference()) { 40369 composeReference("reference", element.getReference()); 40370 } 40371 if (element.hasFhirVersion()) 40372 for (Enumeration<Enumerations.FHIRVersion> e : element.getFhirVersion()) 40373 composeEnumeration("fhirVersion", e, new Enumerations.FHIRVersionEnumFactory()); 40374 if (element.hasNameElement()) { 40375 composeString("name", element.getNameElement()); 40376 } 40377 if (element.hasDescriptionElement()) { 40378 composeString("description", element.getDescriptionElement()); 40379 } 40380 if (element.hasExample()) { 40381 composeType("example", element.getExample()); 40382 } 40383 if (element.hasGroupingIdElement()) { 40384 composeId("groupingId", element.getGroupingIdElement()); 40385 } 40386 } 40387 40388 protected void composeImplementationGuideImplementationGuideDefinitionPageComponent(String name, 40389 ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException { 40390 if (element != null) { 40391 composeElementAttributes(element); 40392 xml.enter(FHIR_NS, name); 40393 composeImplementationGuideImplementationGuideDefinitionPageComponentElements(element); 40394 composeElementClose(element); 40395 xml.exit(FHIR_NS, name); 40396 } 40397 } 40398 40399 protected void composeImplementationGuideImplementationGuideDefinitionPageComponentElements( 40400 ImplementationGuide.ImplementationGuideDefinitionPageComponent element) throws IOException { 40401 composeBackboneElementElements(element); 40402 if (element.hasName()) { 40403 composeType("name", element.getName()); 40404 } 40405 if (element.hasTitleElement()) { 40406 composeString("title", element.getTitleElement()); 40407 } 40408 if (element.hasGenerationElement()) 40409 composeEnumeration("generation", element.getGenerationElement(), 40410 new ImplementationGuide.GuidePageGenerationEnumFactory()); 40411 if (element.hasPage()) { 40412 for (ImplementationGuide.ImplementationGuideDefinitionPageComponent e : element.getPage()) 40413 composeImplementationGuideImplementationGuideDefinitionPageComponent("page", e); 40414 } 40415 } 40416 40417 protected void composeImplementationGuideImplementationGuideDefinitionParameterComponent(String name, 40418 ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException { 40419 if (element != null) { 40420 composeElementAttributes(element); 40421 xml.enter(FHIR_NS, name); 40422 composeImplementationGuideImplementationGuideDefinitionParameterComponentElements(element); 40423 composeElementClose(element); 40424 xml.exit(FHIR_NS, name); 40425 } 40426 } 40427 40428 protected void composeImplementationGuideImplementationGuideDefinitionParameterComponentElements( 40429 ImplementationGuide.ImplementationGuideDefinitionParameterComponent element) throws IOException { 40430 composeBackboneElementElements(element); 40431 if (element.hasCodeElement()) 40432 composeString("code", element.getCodeElement()); 40433 if (element.hasValueElement()) { 40434 composeString("value", element.getValueElement()); 40435 } 40436 } 40437 40438 protected void composeImplementationGuideImplementationGuideDefinitionTemplateComponent(String name, 40439 ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException { 40440 if (element != null) { 40441 composeElementAttributes(element); 40442 xml.enter(FHIR_NS, name); 40443 composeImplementationGuideImplementationGuideDefinitionTemplateComponentElements(element); 40444 composeElementClose(element); 40445 xml.exit(FHIR_NS, name); 40446 } 40447 } 40448 40449 protected void composeImplementationGuideImplementationGuideDefinitionTemplateComponentElements( 40450 ImplementationGuide.ImplementationGuideDefinitionTemplateComponent element) throws IOException { 40451 composeBackboneElementElements(element); 40452 if (element.hasCodeElement()) { 40453 composeCode("code", element.getCodeElement()); 40454 } 40455 if (element.hasSourceElement()) { 40456 composeString("source", element.getSourceElement()); 40457 } 40458 if (element.hasScopeElement()) { 40459 composeString("scope", element.getScopeElement()); 40460 } 40461 } 40462 40463 protected void composeImplementationGuideImplementationGuideManifestComponent(String name, 40464 ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException { 40465 if (element != null) { 40466 composeElementAttributes(element); 40467 xml.enter(FHIR_NS, name); 40468 composeImplementationGuideImplementationGuideManifestComponentElements(element); 40469 composeElementClose(element); 40470 xml.exit(FHIR_NS, name); 40471 } 40472 } 40473 40474 protected void composeImplementationGuideImplementationGuideManifestComponentElements( 40475 ImplementationGuide.ImplementationGuideManifestComponent element) throws IOException { 40476 composeBackboneElementElements(element); 40477 if (element.hasRenderingElement()) { 40478 composeUrl("rendering", element.getRenderingElement()); 40479 } 40480 if (element.hasResource()) { 40481 for (ImplementationGuide.ManifestResourceComponent e : element.getResource()) 40482 composeImplementationGuideManifestResourceComponent("resource", e); 40483 } 40484 if (element.hasPage()) { 40485 for (ImplementationGuide.ManifestPageComponent e : element.getPage()) 40486 composeImplementationGuideManifestPageComponent("page", e); 40487 } 40488 if (element.hasImage()) { 40489 for (StringType e : element.getImage()) 40490 composeString("image", e); 40491 } 40492 if (element.hasOther()) { 40493 for (StringType e : element.getOther()) 40494 composeString("other", e); 40495 } 40496 } 40497 40498 protected void composeImplementationGuideManifestResourceComponent(String name, 40499 ImplementationGuide.ManifestResourceComponent element) throws IOException { 40500 if (element != null) { 40501 composeElementAttributes(element); 40502 xml.enter(FHIR_NS, name); 40503 composeImplementationGuideManifestResourceComponentElements(element); 40504 composeElementClose(element); 40505 xml.exit(FHIR_NS, name); 40506 } 40507 } 40508 40509 protected void composeImplementationGuideManifestResourceComponentElements( 40510 ImplementationGuide.ManifestResourceComponent element) throws IOException { 40511 composeBackboneElementElements(element); 40512 if (element.hasReference()) { 40513 composeReference("reference", element.getReference()); 40514 } 40515 if (element.hasExample()) { 40516 composeType("example", element.getExample()); 40517 } 40518 if (element.hasRelativePathElement()) { 40519 composeUrl("relativePath", element.getRelativePathElement()); 40520 } 40521 } 40522 40523 protected void composeImplementationGuideManifestPageComponent(String name, 40524 ImplementationGuide.ManifestPageComponent element) throws IOException { 40525 if (element != null) { 40526 composeElementAttributes(element); 40527 xml.enter(FHIR_NS, name); 40528 composeImplementationGuideManifestPageComponentElements(element); 40529 composeElementClose(element); 40530 xml.exit(FHIR_NS, name); 40531 } 40532 } 40533 40534 protected void composeImplementationGuideManifestPageComponentElements( 40535 ImplementationGuide.ManifestPageComponent element) throws IOException { 40536 composeBackboneElementElements(element); 40537 if (element.hasNameElement()) { 40538 composeString("name", element.getNameElement()); 40539 } 40540 if (element.hasTitleElement()) { 40541 composeString("title", element.getTitleElement()); 40542 } 40543 if (element.hasAnchor()) { 40544 for (StringType e : element.getAnchor()) 40545 composeString("anchor", e); 40546 } 40547 } 40548 40549 protected void composeInsurancePlan(String name, InsurancePlan element) throws IOException { 40550 if (element != null) { 40551 composeDomainResourceAttributes(element); 40552 xml.enter(FHIR_NS, name); 40553 composeInsurancePlanElements(element); 40554 composeElementClose(element); 40555 xml.exit(FHIR_NS, name); 40556 } 40557 } 40558 40559 protected void composeInsurancePlanElements(InsurancePlan element) throws IOException { 40560 composeDomainResourceElements(element); 40561 if (element.hasIdentifier()) { 40562 for (Identifier e : element.getIdentifier()) 40563 composeIdentifier("identifier", e); 40564 } 40565 if (element.hasStatusElement()) 40566 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 40567 if (element.hasType()) { 40568 for (CodeableConcept e : element.getType()) 40569 composeCodeableConcept("type", e); 40570 } 40571 if (element.hasNameElement()) { 40572 composeString("name", element.getNameElement()); 40573 } 40574 if (element.hasAlias()) { 40575 for (StringType e : element.getAlias()) 40576 composeString("alias", e); 40577 } 40578 if (element.hasPeriod()) { 40579 composePeriod("period", element.getPeriod()); 40580 } 40581 if (element.hasOwnedBy()) { 40582 composeReference("ownedBy", element.getOwnedBy()); 40583 } 40584 if (element.hasAdministeredBy()) { 40585 composeReference("administeredBy", element.getAdministeredBy()); 40586 } 40587 if (element.hasCoverageArea()) { 40588 for (Reference e : element.getCoverageArea()) 40589 composeReference("coverageArea", e); 40590 } 40591 if (element.hasContact()) { 40592 for (InsurancePlan.InsurancePlanContactComponent e : element.getContact()) 40593 composeInsurancePlanInsurancePlanContactComponent("contact", e); 40594 } 40595 if (element.hasEndpoint()) { 40596 for (Reference e : element.getEndpoint()) 40597 composeReference("endpoint", e); 40598 } 40599 if (element.hasNetwork()) { 40600 for (Reference e : element.getNetwork()) 40601 composeReference("network", e); 40602 } 40603 if (element.hasCoverage()) { 40604 for (InsurancePlan.InsurancePlanCoverageComponent e : element.getCoverage()) 40605 composeInsurancePlanInsurancePlanCoverageComponent("coverage", e); 40606 } 40607 if (element.hasPlan()) { 40608 for (InsurancePlan.InsurancePlanPlanComponent e : element.getPlan()) 40609 composeInsurancePlanInsurancePlanPlanComponent("plan", e); 40610 } 40611 } 40612 40613 protected void composeInsurancePlanInsurancePlanContactComponent(String name, 40614 InsurancePlan.InsurancePlanContactComponent element) throws IOException { 40615 if (element != null) { 40616 composeElementAttributes(element); 40617 xml.enter(FHIR_NS, name); 40618 composeInsurancePlanInsurancePlanContactComponentElements(element); 40619 composeElementClose(element); 40620 xml.exit(FHIR_NS, name); 40621 } 40622 } 40623 40624 protected void composeInsurancePlanInsurancePlanContactComponentElements( 40625 InsurancePlan.InsurancePlanContactComponent element) throws IOException { 40626 composeBackboneElementElements(element); 40627 if (element.hasPurpose()) { 40628 composeCodeableConcept("purpose", element.getPurpose()); 40629 } 40630 if (element.hasName()) { 40631 composeHumanName("name", element.getName()); 40632 } 40633 if (element.hasTelecom()) { 40634 for (ContactPoint e : element.getTelecom()) 40635 composeContactPoint("telecom", e); 40636 } 40637 if (element.hasAddress()) { 40638 composeAddress("address", element.getAddress()); 40639 } 40640 } 40641 40642 protected void composeInsurancePlanInsurancePlanCoverageComponent(String name, 40643 InsurancePlan.InsurancePlanCoverageComponent element) throws IOException { 40644 if (element != null) { 40645 composeElementAttributes(element); 40646 xml.enter(FHIR_NS, name); 40647 composeInsurancePlanInsurancePlanCoverageComponentElements(element); 40648 composeElementClose(element); 40649 xml.exit(FHIR_NS, name); 40650 } 40651 } 40652 40653 protected void composeInsurancePlanInsurancePlanCoverageComponentElements( 40654 InsurancePlan.InsurancePlanCoverageComponent element) throws IOException { 40655 composeBackboneElementElements(element); 40656 if (element.hasType()) { 40657 composeCodeableConcept("type", element.getType()); 40658 } 40659 if (element.hasNetwork()) { 40660 for (Reference e : element.getNetwork()) 40661 composeReference("network", e); 40662 } 40663 if (element.hasBenefit()) { 40664 for (InsurancePlan.CoverageBenefitComponent e : element.getBenefit()) 40665 composeInsurancePlanCoverageBenefitComponent("benefit", e); 40666 } 40667 } 40668 40669 protected void composeInsurancePlanCoverageBenefitComponent(String name, 40670 InsurancePlan.CoverageBenefitComponent element) throws IOException { 40671 if (element != null) { 40672 composeElementAttributes(element); 40673 xml.enter(FHIR_NS, name); 40674 composeInsurancePlanCoverageBenefitComponentElements(element); 40675 composeElementClose(element); 40676 xml.exit(FHIR_NS, name); 40677 } 40678 } 40679 40680 protected void composeInsurancePlanCoverageBenefitComponentElements(InsurancePlan.CoverageBenefitComponent element) 40681 throws IOException { 40682 composeBackboneElementElements(element); 40683 if (element.hasType()) { 40684 composeCodeableConcept("type", element.getType()); 40685 } 40686 if (element.hasRequirementElement()) { 40687 composeString("requirement", element.getRequirementElement()); 40688 } 40689 if (element.hasLimit()) { 40690 for (InsurancePlan.CoverageBenefitLimitComponent e : element.getLimit()) 40691 composeInsurancePlanCoverageBenefitLimitComponent("limit", e); 40692 } 40693 } 40694 40695 protected void composeInsurancePlanCoverageBenefitLimitComponent(String name, 40696 InsurancePlan.CoverageBenefitLimitComponent element) throws IOException { 40697 if (element != null) { 40698 composeElementAttributes(element); 40699 xml.enter(FHIR_NS, name); 40700 composeInsurancePlanCoverageBenefitLimitComponentElements(element); 40701 composeElementClose(element); 40702 xml.exit(FHIR_NS, name); 40703 } 40704 } 40705 40706 protected void composeInsurancePlanCoverageBenefitLimitComponentElements( 40707 InsurancePlan.CoverageBenefitLimitComponent element) throws IOException { 40708 composeBackboneElementElements(element); 40709 if (element.hasValue()) { 40710 composeQuantity("value", element.getValue()); 40711 } 40712 if (element.hasCode()) { 40713 composeCodeableConcept("code", element.getCode()); 40714 } 40715 } 40716 40717 protected void composeInsurancePlanInsurancePlanPlanComponent(String name, 40718 InsurancePlan.InsurancePlanPlanComponent element) throws IOException { 40719 if (element != null) { 40720 composeElementAttributes(element); 40721 xml.enter(FHIR_NS, name); 40722 composeInsurancePlanInsurancePlanPlanComponentElements(element); 40723 composeElementClose(element); 40724 xml.exit(FHIR_NS, name); 40725 } 40726 } 40727 40728 protected void composeInsurancePlanInsurancePlanPlanComponentElements( 40729 InsurancePlan.InsurancePlanPlanComponent element) throws IOException { 40730 composeBackboneElementElements(element); 40731 if (element.hasIdentifier()) { 40732 for (Identifier e : element.getIdentifier()) 40733 composeIdentifier("identifier", e); 40734 } 40735 if (element.hasType()) { 40736 composeCodeableConcept("type", element.getType()); 40737 } 40738 if (element.hasCoverageArea()) { 40739 for (Reference e : element.getCoverageArea()) 40740 composeReference("coverageArea", e); 40741 } 40742 if (element.hasNetwork()) { 40743 for (Reference e : element.getNetwork()) 40744 composeReference("network", e); 40745 } 40746 if (element.hasGeneralCost()) { 40747 for (InsurancePlan.InsurancePlanPlanGeneralCostComponent e : element.getGeneralCost()) 40748 composeInsurancePlanInsurancePlanPlanGeneralCostComponent("generalCost", e); 40749 } 40750 if (element.hasSpecificCost()) { 40751 for (InsurancePlan.InsurancePlanPlanSpecificCostComponent e : element.getSpecificCost()) 40752 composeInsurancePlanInsurancePlanPlanSpecificCostComponent("specificCost", e); 40753 } 40754 } 40755 40756 protected void composeInsurancePlanInsurancePlanPlanGeneralCostComponent(String name, 40757 InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException { 40758 if (element != null) { 40759 composeElementAttributes(element); 40760 xml.enter(FHIR_NS, name); 40761 composeInsurancePlanInsurancePlanPlanGeneralCostComponentElements(element); 40762 composeElementClose(element); 40763 xml.exit(FHIR_NS, name); 40764 } 40765 } 40766 40767 protected void composeInsurancePlanInsurancePlanPlanGeneralCostComponentElements( 40768 InsurancePlan.InsurancePlanPlanGeneralCostComponent element) throws IOException { 40769 composeBackboneElementElements(element); 40770 if (element.hasType()) { 40771 composeCodeableConcept("type", element.getType()); 40772 } 40773 if (element.hasGroupSizeElement()) { 40774 composePositiveInt("groupSize", element.getGroupSizeElement()); 40775 } 40776 if (element.hasCost()) { 40777 composeMoney("cost", element.getCost()); 40778 } 40779 if (element.hasCommentElement()) { 40780 composeString("comment", element.getCommentElement()); 40781 } 40782 } 40783 40784 protected void composeInsurancePlanInsurancePlanPlanSpecificCostComponent(String name, 40785 InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException { 40786 if (element != null) { 40787 composeElementAttributes(element); 40788 xml.enter(FHIR_NS, name); 40789 composeInsurancePlanInsurancePlanPlanSpecificCostComponentElements(element); 40790 composeElementClose(element); 40791 xml.exit(FHIR_NS, name); 40792 } 40793 } 40794 40795 protected void composeInsurancePlanInsurancePlanPlanSpecificCostComponentElements( 40796 InsurancePlan.InsurancePlanPlanSpecificCostComponent element) throws IOException { 40797 composeBackboneElementElements(element); 40798 if (element.hasCategory()) { 40799 composeCodeableConcept("category", element.getCategory()); 40800 } 40801 if (element.hasBenefit()) { 40802 for (InsurancePlan.PlanBenefitComponent e : element.getBenefit()) 40803 composeInsurancePlanPlanBenefitComponent("benefit", e); 40804 } 40805 } 40806 40807 protected void composeInsurancePlanPlanBenefitComponent(String name, InsurancePlan.PlanBenefitComponent element) 40808 throws IOException { 40809 if (element != null) { 40810 composeElementAttributes(element); 40811 xml.enter(FHIR_NS, name); 40812 composeInsurancePlanPlanBenefitComponentElements(element); 40813 composeElementClose(element); 40814 xml.exit(FHIR_NS, name); 40815 } 40816 } 40817 40818 protected void composeInsurancePlanPlanBenefitComponentElements(InsurancePlan.PlanBenefitComponent element) 40819 throws IOException { 40820 composeBackboneElementElements(element); 40821 if (element.hasType()) { 40822 composeCodeableConcept("type", element.getType()); 40823 } 40824 if (element.hasCost()) { 40825 for (InsurancePlan.PlanBenefitCostComponent e : element.getCost()) 40826 composeInsurancePlanPlanBenefitCostComponent("cost", e); 40827 } 40828 } 40829 40830 protected void composeInsurancePlanPlanBenefitCostComponent(String name, 40831 InsurancePlan.PlanBenefitCostComponent element) throws IOException { 40832 if (element != null) { 40833 composeElementAttributes(element); 40834 xml.enter(FHIR_NS, name); 40835 composeInsurancePlanPlanBenefitCostComponentElements(element); 40836 composeElementClose(element); 40837 xml.exit(FHIR_NS, name); 40838 } 40839 } 40840 40841 protected void composeInsurancePlanPlanBenefitCostComponentElements(InsurancePlan.PlanBenefitCostComponent element) 40842 throws IOException { 40843 composeBackboneElementElements(element); 40844 if (element.hasType()) { 40845 composeCodeableConcept("type", element.getType()); 40846 } 40847 if (element.hasApplicability()) { 40848 composeCodeableConcept("applicability", element.getApplicability()); 40849 } 40850 if (element.hasQualifiers()) { 40851 for (CodeableConcept e : element.getQualifiers()) 40852 composeCodeableConcept("qualifiers", e); 40853 } 40854 if (element.hasValue()) { 40855 composeQuantity("value", element.getValue()); 40856 } 40857 } 40858 40859 protected void composeInvoice(String name, Invoice element) throws IOException { 40860 if (element != null) { 40861 composeDomainResourceAttributes(element); 40862 xml.enter(FHIR_NS, name); 40863 composeInvoiceElements(element); 40864 composeElementClose(element); 40865 xml.exit(FHIR_NS, name); 40866 } 40867 } 40868 40869 protected void composeInvoiceElements(Invoice element) throws IOException { 40870 composeDomainResourceElements(element); 40871 if (element.hasIdentifier()) { 40872 for (Identifier e : element.getIdentifier()) 40873 composeIdentifier("identifier", e); 40874 } 40875 if (element.hasStatusElement()) 40876 composeEnumeration("status", element.getStatusElement(), new Invoice.InvoiceStatusEnumFactory()); 40877 if (element.hasCancelledReasonElement()) { 40878 composeString("cancelledReason", element.getCancelledReasonElement()); 40879 } 40880 if (element.hasType()) { 40881 composeCodeableConcept("type", element.getType()); 40882 } 40883 if (element.hasSubject()) { 40884 composeReference("subject", element.getSubject()); 40885 } 40886 if (element.hasRecipient()) { 40887 composeReference("recipient", element.getRecipient()); 40888 } 40889 if (element.hasDateElement()) { 40890 composeDateTime("date", element.getDateElement()); 40891 } 40892 if (element.hasParticipant()) { 40893 for (Invoice.InvoiceParticipantComponent e : element.getParticipant()) 40894 composeInvoiceInvoiceParticipantComponent("participant", e); 40895 } 40896 if (element.hasIssuer()) { 40897 composeReference("issuer", element.getIssuer()); 40898 } 40899 if (element.hasAccount()) { 40900 composeReference("account", element.getAccount()); 40901 } 40902 if (element.hasLineItem()) { 40903 for (Invoice.InvoiceLineItemComponent e : element.getLineItem()) 40904 composeInvoiceInvoiceLineItemComponent("lineItem", e); 40905 } 40906 if (element.hasTotalPriceComponent()) { 40907 for (Invoice.InvoiceLineItemPriceComponentComponent e : element.getTotalPriceComponent()) 40908 composeInvoiceInvoiceLineItemPriceComponentComponent("totalPriceComponent", e); 40909 } 40910 if (element.hasTotalNet()) { 40911 composeMoney("totalNet", element.getTotalNet()); 40912 } 40913 if (element.hasTotalGross()) { 40914 composeMoney("totalGross", element.getTotalGross()); 40915 } 40916 if (element.hasPaymentTermsElement()) { 40917 composeMarkdown("paymentTerms", element.getPaymentTermsElement()); 40918 } 40919 if (element.hasNote()) { 40920 for (Annotation e : element.getNote()) 40921 composeAnnotation("note", e); 40922 } 40923 } 40924 40925 protected void composeInvoiceInvoiceParticipantComponent(String name, Invoice.InvoiceParticipantComponent element) 40926 throws IOException { 40927 if (element != null) { 40928 composeElementAttributes(element); 40929 xml.enter(FHIR_NS, name); 40930 composeInvoiceInvoiceParticipantComponentElements(element); 40931 composeElementClose(element); 40932 xml.exit(FHIR_NS, name); 40933 } 40934 } 40935 40936 protected void composeInvoiceInvoiceParticipantComponentElements(Invoice.InvoiceParticipantComponent element) 40937 throws IOException { 40938 composeBackboneElementElements(element); 40939 if (element.hasRole()) { 40940 composeCodeableConcept("role", element.getRole()); 40941 } 40942 if (element.hasActor()) { 40943 composeReference("actor", element.getActor()); 40944 } 40945 } 40946 40947 protected void composeInvoiceInvoiceLineItemComponent(String name, Invoice.InvoiceLineItemComponent element) 40948 throws IOException { 40949 if (element != null) { 40950 composeElementAttributes(element); 40951 xml.enter(FHIR_NS, name); 40952 composeInvoiceInvoiceLineItemComponentElements(element); 40953 composeElementClose(element); 40954 xml.exit(FHIR_NS, name); 40955 } 40956 } 40957 40958 protected void composeInvoiceInvoiceLineItemComponentElements(Invoice.InvoiceLineItemComponent element) 40959 throws IOException { 40960 composeBackboneElementElements(element); 40961 if (element.hasSequenceElement()) { 40962 composePositiveInt("sequence", element.getSequenceElement()); 40963 } 40964 if (element.hasChargeItem()) { 40965 composeType("chargeItem", element.getChargeItem()); 40966 } 40967 if (element.hasPriceComponent()) { 40968 for (Invoice.InvoiceLineItemPriceComponentComponent e : element.getPriceComponent()) 40969 composeInvoiceInvoiceLineItemPriceComponentComponent("priceComponent", e); 40970 } 40971 } 40972 40973 protected void composeInvoiceInvoiceLineItemPriceComponentComponent(String name, 40974 Invoice.InvoiceLineItemPriceComponentComponent element) throws IOException { 40975 if (element != null) { 40976 composeElementAttributes(element); 40977 xml.enter(FHIR_NS, name); 40978 composeInvoiceInvoiceLineItemPriceComponentComponentElements(element); 40979 composeElementClose(element); 40980 xml.exit(FHIR_NS, name); 40981 } 40982 } 40983 40984 protected void composeInvoiceInvoiceLineItemPriceComponentComponentElements( 40985 Invoice.InvoiceLineItemPriceComponentComponent element) throws IOException { 40986 composeBackboneElementElements(element); 40987 if (element.hasTypeElement()) 40988 composeEnumeration("type", element.getTypeElement(), new Invoice.InvoicePriceComponentTypeEnumFactory()); 40989 if (element.hasCode()) { 40990 composeCodeableConcept("code", element.getCode()); 40991 } 40992 if (element.hasFactorElement()) { 40993 composeDecimal("factor", element.getFactorElement()); 40994 } 40995 if (element.hasAmount()) { 40996 composeMoney("amount", element.getAmount()); 40997 } 40998 } 40999 41000 protected void composeLibrary(String name, Library element) throws IOException { 41001 if (element != null) { 41002 composeDomainResourceAttributes(element); 41003 xml.enter(FHIR_NS, name); 41004 composeLibraryElements(element); 41005 composeElementClose(element); 41006 xml.exit(FHIR_NS, name); 41007 } 41008 } 41009 41010 protected void composeLibraryElements(Library element) throws IOException { 41011 composeDomainResourceElements(element); 41012 if (element.hasUrlElement()) { 41013 composeUri("url", element.getUrlElement()); 41014 } 41015 if (element.hasIdentifier()) { 41016 for (Identifier e : element.getIdentifier()) 41017 composeIdentifier("identifier", e); 41018 } 41019 if (element.hasVersionElement()) { 41020 composeString("version", element.getVersionElement()); 41021 } 41022 if (element.hasNameElement()) { 41023 composeString("name", element.getNameElement()); 41024 } 41025 if (element.hasTitleElement()) { 41026 composeString("title", element.getTitleElement()); 41027 } 41028 if (element.hasSubtitleElement()) { 41029 composeString("subtitle", element.getSubtitleElement()); 41030 } 41031 if (element.hasStatusElement()) 41032 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 41033 if (element.hasExperimentalElement()) { 41034 composeBoolean("experimental", element.getExperimentalElement()); 41035 } 41036 if (element.hasType()) { 41037 composeCodeableConcept("type", element.getType()); 41038 } 41039 if (element.hasSubject()) { 41040 composeType("subject", element.getSubject()); 41041 } 41042 if (element.hasDateElement()) { 41043 composeDateTime("date", element.getDateElement()); 41044 } 41045 if (element.hasPublisherElement()) { 41046 composeString("publisher", element.getPublisherElement()); 41047 } 41048 if (element.hasContact()) { 41049 for (ContactDetail e : element.getContact()) 41050 composeContactDetail("contact", e); 41051 } 41052 if (element.hasDescriptionElement()) { 41053 composeMarkdown("description", element.getDescriptionElement()); 41054 } 41055 if (element.hasUseContext()) { 41056 for (UsageContext e : element.getUseContext()) 41057 composeUsageContext("useContext", e); 41058 } 41059 if (element.hasJurisdiction()) { 41060 for (CodeableConcept e : element.getJurisdiction()) 41061 composeCodeableConcept("jurisdiction", e); 41062 } 41063 if (element.hasPurposeElement()) { 41064 composeMarkdown("purpose", element.getPurposeElement()); 41065 } 41066 if (element.hasUsageElement()) { 41067 composeString("usage", element.getUsageElement()); 41068 } 41069 if (element.hasCopyrightElement()) { 41070 composeMarkdown("copyright", element.getCopyrightElement()); 41071 } 41072 if (element.hasApprovalDateElement()) { 41073 composeDate("approvalDate", element.getApprovalDateElement()); 41074 } 41075 if (element.hasLastReviewDateElement()) { 41076 composeDate("lastReviewDate", element.getLastReviewDateElement()); 41077 } 41078 if (element.hasEffectivePeriod()) { 41079 composePeriod("effectivePeriod", element.getEffectivePeriod()); 41080 } 41081 if (element.hasTopic()) { 41082 for (CodeableConcept e : element.getTopic()) 41083 composeCodeableConcept("topic", e); 41084 } 41085 if (element.hasAuthor()) { 41086 for (ContactDetail e : element.getAuthor()) 41087 composeContactDetail("author", e); 41088 } 41089 if (element.hasEditor()) { 41090 for (ContactDetail e : element.getEditor()) 41091 composeContactDetail("editor", e); 41092 } 41093 if (element.hasReviewer()) { 41094 for (ContactDetail e : element.getReviewer()) 41095 composeContactDetail("reviewer", e); 41096 } 41097 if (element.hasEndorser()) { 41098 for (ContactDetail e : element.getEndorser()) 41099 composeContactDetail("endorser", e); 41100 } 41101 if (element.hasRelatedArtifact()) { 41102 for (RelatedArtifact e : element.getRelatedArtifact()) 41103 composeRelatedArtifact("relatedArtifact", e); 41104 } 41105 if (element.hasParameter()) { 41106 for (ParameterDefinition e : element.getParameter()) 41107 composeParameterDefinition("parameter", e); 41108 } 41109 if (element.hasDataRequirement()) { 41110 for (DataRequirement e : element.getDataRequirement()) 41111 composeDataRequirement("dataRequirement", e); 41112 } 41113 if (element.hasContent()) { 41114 for (Attachment e : element.getContent()) 41115 composeAttachment("content", e); 41116 } 41117 } 41118 41119 protected void composeLinkage(String name, Linkage element) throws IOException { 41120 if (element != null) { 41121 composeDomainResourceAttributes(element); 41122 xml.enter(FHIR_NS, name); 41123 composeLinkageElements(element); 41124 composeElementClose(element); 41125 xml.exit(FHIR_NS, name); 41126 } 41127 } 41128 41129 protected void composeLinkageElements(Linkage element) throws IOException { 41130 composeDomainResourceElements(element); 41131 if (element.hasActiveElement()) { 41132 composeBoolean("active", element.getActiveElement()); 41133 } 41134 if (element.hasAuthor()) { 41135 composeReference("author", element.getAuthor()); 41136 } 41137 if (element.hasItem()) { 41138 for (Linkage.LinkageItemComponent e : element.getItem()) 41139 composeLinkageLinkageItemComponent("item", e); 41140 } 41141 } 41142 41143 protected void composeLinkageLinkageItemComponent(String name, Linkage.LinkageItemComponent element) 41144 throws IOException { 41145 if (element != null) { 41146 composeElementAttributes(element); 41147 xml.enter(FHIR_NS, name); 41148 composeLinkageLinkageItemComponentElements(element); 41149 composeElementClose(element); 41150 xml.exit(FHIR_NS, name); 41151 } 41152 } 41153 41154 protected void composeLinkageLinkageItemComponentElements(Linkage.LinkageItemComponent element) throws IOException { 41155 composeBackboneElementElements(element); 41156 if (element.hasTypeElement()) 41157 composeEnumeration("type", element.getTypeElement(), new Linkage.LinkageTypeEnumFactory()); 41158 if (element.hasResource()) { 41159 composeReference("resource", element.getResource()); 41160 } 41161 } 41162 41163 protected void composeListResource(String name, ListResource element) throws IOException { 41164 if (element != null) { 41165 composeDomainResourceAttributes(element); 41166 xml.enter(FHIR_NS, name); 41167 composeListResourceElements(element); 41168 composeElementClose(element); 41169 xml.exit(FHIR_NS, name); 41170 } 41171 } 41172 41173 protected void composeListResourceElements(ListResource element) throws IOException { 41174 composeDomainResourceElements(element); 41175 if (element.hasIdentifier()) { 41176 for (Identifier e : element.getIdentifier()) 41177 composeIdentifier("identifier", e); 41178 } 41179 if (element.hasStatusElement()) 41180 composeEnumeration("status", element.getStatusElement(), new ListResource.ListStatusEnumFactory()); 41181 if (element.hasModeElement()) 41182 composeEnumeration("mode", element.getModeElement(), new ListResource.ListModeEnumFactory()); 41183 if (element.hasTitleElement()) { 41184 composeString("title", element.getTitleElement()); 41185 } 41186 if (element.hasCode()) { 41187 composeCodeableConcept("code", element.getCode()); 41188 } 41189 if (element.hasSubject()) { 41190 composeReference("subject", element.getSubject()); 41191 } 41192 if (element.hasEncounter()) { 41193 composeReference("encounter", element.getEncounter()); 41194 } 41195 if (element.hasDateElement()) { 41196 composeDateTime("date", element.getDateElement()); 41197 } 41198 if (element.hasSource()) { 41199 composeReference("source", element.getSource()); 41200 } 41201 if (element.hasOrderedBy()) { 41202 composeCodeableConcept("orderedBy", element.getOrderedBy()); 41203 } 41204 if (element.hasNote()) { 41205 for (Annotation e : element.getNote()) 41206 composeAnnotation("note", e); 41207 } 41208 if (element.hasEntry()) { 41209 for (ListResource.ListEntryComponent e : element.getEntry()) 41210 composeListResourceListEntryComponent("entry", e); 41211 } 41212 if (element.hasEmptyReason()) { 41213 composeCodeableConcept("emptyReason", element.getEmptyReason()); 41214 } 41215 } 41216 41217 protected void composeListResourceListEntryComponent(String name, ListResource.ListEntryComponent element) 41218 throws IOException { 41219 if (element != null) { 41220 composeElementAttributes(element); 41221 xml.enter(FHIR_NS, name); 41222 composeListResourceListEntryComponentElements(element); 41223 composeElementClose(element); 41224 xml.exit(FHIR_NS, name); 41225 } 41226 } 41227 41228 protected void composeListResourceListEntryComponentElements(ListResource.ListEntryComponent element) 41229 throws IOException { 41230 composeBackboneElementElements(element); 41231 if (element.hasFlag()) { 41232 composeCodeableConcept("flag", element.getFlag()); 41233 } 41234 if (element.hasDeletedElement()) { 41235 composeBoolean("deleted", element.getDeletedElement()); 41236 } 41237 if (element.hasDateElement()) { 41238 composeDateTime("date", element.getDateElement()); 41239 } 41240 if (element.hasItem()) { 41241 composeReference("item", element.getItem()); 41242 } 41243 } 41244 41245 protected void composeLocation(String name, Location element) throws IOException { 41246 if (element != null) { 41247 composeDomainResourceAttributes(element); 41248 xml.enter(FHIR_NS, name); 41249 composeLocationElements(element); 41250 composeElementClose(element); 41251 xml.exit(FHIR_NS, name); 41252 } 41253 } 41254 41255 protected void composeLocationElements(Location element) throws IOException { 41256 composeDomainResourceElements(element); 41257 if (element.hasIdentifier()) { 41258 for (Identifier e : element.getIdentifier()) 41259 composeIdentifier("identifier", e); 41260 } 41261 if (element.hasStatusElement()) 41262 composeEnumeration("status", element.getStatusElement(), new Location.LocationStatusEnumFactory()); 41263 if (element.hasOperationalStatus()) { 41264 composeCoding("operationalStatus", element.getOperationalStatus()); 41265 } 41266 if (element.hasNameElement()) { 41267 composeString("name", element.getNameElement()); 41268 } 41269 if (element.hasAlias()) { 41270 for (StringType e : element.getAlias()) 41271 composeString("alias", e); 41272 } 41273 if (element.hasDescriptionElement()) { 41274 composeString("description", element.getDescriptionElement()); 41275 } 41276 if (element.hasModeElement()) 41277 composeEnumeration("mode", element.getModeElement(), new Location.LocationModeEnumFactory()); 41278 if (element.hasType()) { 41279 for (CodeableConcept e : element.getType()) 41280 composeCodeableConcept("type", e); 41281 } 41282 if (element.hasTelecom()) { 41283 for (ContactPoint e : element.getTelecom()) 41284 composeContactPoint("telecom", e); 41285 } 41286 if (element.hasAddress()) { 41287 composeAddress("address", element.getAddress()); 41288 } 41289 if (element.hasPhysicalType()) { 41290 composeCodeableConcept("physicalType", element.getPhysicalType()); 41291 } 41292 if (element.hasPosition()) { 41293 composeLocationLocationPositionComponent("position", element.getPosition()); 41294 } 41295 if (element.hasManagingOrganization()) { 41296 composeReference("managingOrganization", element.getManagingOrganization()); 41297 } 41298 if (element.hasPartOf()) { 41299 composeReference("partOf", element.getPartOf()); 41300 } 41301 if (element.hasHoursOfOperation()) { 41302 for (Location.LocationHoursOfOperationComponent e : element.getHoursOfOperation()) 41303 composeLocationLocationHoursOfOperationComponent("hoursOfOperation", e); 41304 } 41305 if (element.hasAvailabilityExceptionsElement()) { 41306 composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); 41307 } 41308 if (element.hasEndpoint()) { 41309 for (Reference e : element.getEndpoint()) 41310 composeReference("endpoint", e); 41311 } 41312 } 41313 41314 protected void composeLocationLocationPositionComponent(String name, Location.LocationPositionComponent element) 41315 throws IOException { 41316 if (element != null) { 41317 composeElementAttributes(element); 41318 xml.enter(FHIR_NS, name); 41319 composeLocationLocationPositionComponentElements(element); 41320 composeElementClose(element); 41321 xml.exit(FHIR_NS, name); 41322 } 41323 } 41324 41325 protected void composeLocationLocationPositionComponentElements(Location.LocationPositionComponent element) 41326 throws IOException { 41327 composeBackboneElementElements(element); 41328 if (element.hasLongitudeElement()) { 41329 composeDecimal("longitude", element.getLongitudeElement()); 41330 } 41331 if (element.hasLatitudeElement()) { 41332 composeDecimal("latitude", element.getLatitudeElement()); 41333 } 41334 if (element.hasAltitudeElement()) { 41335 composeDecimal("altitude", element.getAltitudeElement()); 41336 } 41337 } 41338 41339 protected void composeLocationLocationHoursOfOperationComponent(String name, 41340 Location.LocationHoursOfOperationComponent element) throws IOException { 41341 if (element != null) { 41342 composeElementAttributes(element); 41343 xml.enter(FHIR_NS, name); 41344 composeLocationLocationHoursOfOperationComponentElements(element); 41345 composeElementClose(element); 41346 xml.exit(FHIR_NS, name); 41347 } 41348 } 41349 41350 protected void composeLocationLocationHoursOfOperationComponentElements( 41351 Location.LocationHoursOfOperationComponent element) throws IOException { 41352 composeBackboneElementElements(element); 41353 if (element.hasDaysOfWeek()) 41354 for (Enumeration<Location.DaysOfWeek> e : element.getDaysOfWeek()) 41355 composeEnumeration("daysOfWeek", e, new Location.DaysOfWeekEnumFactory()); 41356 if (element.hasAllDayElement()) { 41357 composeBoolean("allDay", element.getAllDayElement()); 41358 } 41359 if (element.hasOpeningTimeElement()) { 41360 composeTime("openingTime", element.getOpeningTimeElement()); 41361 } 41362 if (element.hasClosingTimeElement()) { 41363 composeTime("closingTime", element.getClosingTimeElement()); 41364 } 41365 } 41366 41367 protected void composeMeasure(String name, Measure element) throws IOException { 41368 if (element != null) { 41369 composeDomainResourceAttributes(element); 41370 xml.enter(FHIR_NS, name); 41371 composeMeasureElements(element); 41372 composeElementClose(element); 41373 xml.exit(FHIR_NS, name); 41374 } 41375 } 41376 41377 protected void composeMeasureElements(Measure element) throws IOException { 41378 composeDomainResourceElements(element); 41379 if (element.hasUrlElement()) { 41380 composeUri("url", element.getUrlElement()); 41381 } 41382 if (element.hasIdentifier()) { 41383 for (Identifier e : element.getIdentifier()) 41384 composeIdentifier("identifier", e); 41385 } 41386 if (element.hasVersionElement()) { 41387 composeString("version", element.getVersionElement()); 41388 } 41389 if (element.hasNameElement()) { 41390 composeString("name", element.getNameElement()); 41391 } 41392 if (element.hasTitleElement()) { 41393 composeString("title", element.getTitleElement()); 41394 } 41395 if (element.hasSubtitleElement()) { 41396 composeString("subtitle", element.getSubtitleElement()); 41397 } 41398 if (element.hasStatusElement()) 41399 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 41400 if (element.hasExperimentalElement()) { 41401 composeBoolean("experimental", element.getExperimentalElement()); 41402 } 41403 if (element.hasSubject()) { 41404 composeType("subject", element.getSubject()); 41405 } 41406 if (element.hasDateElement()) { 41407 composeDateTime("date", element.getDateElement()); 41408 } 41409 if (element.hasPublisherElement()) { 41410 composeString("publisher", element.getPublisherElement()); 41411 } 41412 if (element.hasContact()) { 41413 for (ContactDetail e : element.getContact()) 41414 composeContactDetail("contact", e); 41415 } 41416 if (element.hasDescriptionElement()) { 41417 composeMarkdown("description", element.getDescriptionElement()); 41418 } 41419 if (element.hasUseContext()) { 41420 for (UsageContext e : element.getUseContext()) 41421 composeUsageContext("useContext", e); 41422 } 41423 if (element.hasJurisdiction()) { 41424 for (CodeableConcept e : element.getJurisdiction()) 41425 composeCodeableConcept("jurisdiction", e); 41426 } 41427 if (element.hasPurposeElement()) { 41428 composeMarkdown("purpose", element.getPurposeElement()); 41429 } 41430 if (element.hasUsageElement()) { 41431 composeString("usage", element.getUsageElement()); 41432 } 41433 if (element.hasCopyrightElement()) { 41434 composeMarkdown("copyright", element.getCopyrightElement()); 41435 } 41436 if (element.hasApprovalDateElement()) { 41437 composeDate("approvalDate", element.getApprovalDateElement()); 41438 } 41439 if (element.hasLastReviewDateElement()) { 41440 composeDate("lastReviewDate", element.getLastReviewDateElement()); 41441 } 41442 if (element.hasEffectivePeriod()) { 41443 composePeriod("effectivePeriod", element.getEffectivePeriod()); 41444 } 41445 if (element.hasTopic()) { 41446 for (CodeableConcept e : element.getTopic()) 41447 composeCodeableConcept("topic", e); 41448 } 41449 if (element.hasAuthor()) { 41450 for (ContactDetail e : element.getAuthor()) 41451 composeContactDetail("author", e); 41452 } 41453 if (element.hasEditor()) { 41454 for (ContactDetail e : element.getEditor()) 41455 composeContactDetail("editor", e); 41456 } 41457 if (element.hasReviewer()) { 41458 for (ContactDetail e : element.getReviewer()) 41459 composeContactDetail("reviewer", e); 41460 } 41461 if (element.hasEndorser()) { 41462 for (ContactDetail e : element.getEndorser()) 41463 composeContactDetail("endorser", e); 41464 } 41465 if (element.hasRelatedArtifact()) { 41466 for (RelatedArtifact e : element.getRelatedArtifact()) 41467 composeRelatedArtifact("relatedArtifact", e); 41468 } 41469 if (element.hasLibrary()) { 41470 for (CanonicalType e : element.getLibrary()) 41471 composeCanonical("library", e); 41472 } 41473 if (element.hasDisclaimerElement()) { 41474 composeMarkdown("disclaimer", element.getDisclaimerElement()); 41475 } 41476 if (element.hasScoring()) { 41477 composeCodeableConcept("scoring", element.getScoring()); 41478 } 41479 if (element.hasCompositeScoring()) { 41480 composeCodeableConcept("compositeScoring", element.getCompositeScoring()); 41481 } 41482 if (element.hasType()) { 41483 for (CodeableConcept e : element.getType()) 41484 composeCodeableConcept("type", e); 41485 } 41486 if (element.hasRiskAdjustmentElement()) { 41487 composeString("riskAdjustment", element.getRiskAdjustmentElement()); 41488 } 41489 if (element.hasRateAggregationElement()) { 41490 composeString("rateAggregation", element.getRateAggregationElement()); 41491 } 41492 if (element.hasRationaleElement()) { 41493 composeMarkdown("rationale", element.getRationaleElement()); 41494 } 41495 if (element.hasClinicalRecommendationStatementElement()) { 41496 composeMarkdown("clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement()); 41497 } 41498 if (element.hasImprovementNotation()) { 41499 composeCodeableConcept("improvementNotation", element.getImprovementNotation()); 41500 } 41501 if (element.hasDefinition()) { 41502 for (MarkdownType e : element.getDefinition()) 41503 composeMarkdown("definition", e); 41504 } 41505 if (element.hasGuidanceElement()) { 41506 composeMarkdown("guidance", element.getGuidanceElement()); 41507 } 41508 if (element.hasGroup()) { 41509 for (Measure.MeasureGroupComponent e : element.getGroup()) 41510 composeMeasureMeasureGroupComponent("group", e); 41511 } 41512 if (element.hasSupplementalData()) { 41513 for (Measure.MeasureSupplementalDataComponent e : element.getSupplementalData()) 41514 composeMeasureMeasureSupplementalDataComponent("supplementalData", e); 41515 } 41516 } 41517 41518 protected void composeMeasureMeasureGroupComponent(String name, Measure.MeasureGroupComponent element) 41519 throws IOException { 41520 if (element != null) { 41521 composeElementAttributes(element); 41522 xml.enter(FHIR_NS, name); 41523 composeMeasureMeasureGroupComponentElements(element); 41524 composeElementClose(element); 41525 xml.exit(FHIR_NS, name); 41526 } 41527 } 41528 41529 protected void composeMeasureMeasureGroupComponentElements(Measure.MeasureGroupComponent element) throws IOException { 41530 composeBackboneElementElements(element); 41531 if (element.hasCode()) { 41532 composeCodeableConcept("code", element.getCode()); 41533 } 41534 if (element.hasDescriptionElement()) { 41535 composeString("description", element.getDescriptionElement()); 41536 } 41537 if (element.hasPopulation()) { 41538 for (Measure.MeasureGroupPopulationComponent e : element.getPopulation()) 41539 composeMeasureMeasureGroupPopulationComponent("population", e); 41540 } 41541 if (element.hasStratifier()) { 41542 for (Measure.MeasureGroupStratifierComponent e : element.getStratifier()) 41543 composeMeasureMeasureGroupStratifierComponent("stratifier", e); 41544 } 41545 } 41546 41547 protected void composeMeasureMeasureGroupPopulationComponent(String name, 41548 Measure.MeasureGroupPopulationComponent element) throws IOException { 41549 if (element != null) { 41550 composeElementAttributes(element); 41551 xml.enter(FHIR_NS, name); 41552 composeMeasureMeasureGroupPopulationComponentElements(element); 41553 composeElementClose(element); 41554 xml.exit(FHIR_NS, name); 41555 } 41556 } 41557 41558 protected void composeMeasureMeasureGroupPopulationComponentElements(Measure.MeasureGroupPopulationComponent element) 41559 throws IOException { 41560 composeBackboneElementElements(element); 41561 if (element.hasCode()) { 41562 composeCodeableConcept("code", element.getCode()); 41563 } 41564 if (element.hasDescriptionElement()) { 41565 composeString("description", element.getDescriptionElement()); 41566 } 41567 if (element.hasCriteria()) { 41568 composeExpression("criteria", element.getCriteria()); 41569 } 41570 } 41571 41572 protected void composeMeasureMeasureGroupStratifierComponent(String name, 41573 Measure.MeasureGroupStratifierComponent element) throws IOException { 41574 if (element != null) { 41575 composeElementAttributes(element); 41576 xml.enter(FHIR_NS, name); 41577 composeMeasureMeasureGroupStratifierComponentElements(element); 41578 composeElementClose(element); 41579 xml.exit(FHIR_NS, name); 41580 } 41581 } 41582 41583 protected void composeMeasureMeasureGroupStratifierComponentElements(Measure.MeasureGroupStratifierComponent element) 41584 throws IOException { 41585 composeBackboneElementElements(element); 41586 if (element.hasCode()) { 41587 composeCodeableConcept("code", element.getCode()); 41588 } 41589 if (element.hasDescriptionElement()) { 41590 composeString("description", element.getDescriptionElement()); 41591 } 41592 if (element.hasCriteria()) { 41593 composeExpression("criteria", element.getCriteria()); 41594 } 41595 if (element.hasComponent()) { 41596 for (Measure.MeasureGroupStratifierComponentComponent e : element.getComponent()) 41597 composeMeasureMeasureGroupStratifierComponentComponent("component", e); 41598 } 41599 } 41600 41601 protected void composeMeasureMeasureGroupStratifierComponentComponent(String name, 41602 Measure.MeasureGroupStratifierComponentComponent element) throws IOException { 41603 if (element != null) { 41604 composeElementAttributes(element); 41605 xml.enter(FHIR_NS, name); 41606 composeMeasureMeasureGroupStratifierComponentComponentElements(element); 41607 composeElementClose(element); 41608 xml.exit(FHIR_NS, name); 41609 } 41610 } 41611 41612 protected void composeMeasureMeasureGroupStratifierComponentComponentElements( 41613 Measure.MeasureGroupStratifierComponentComponent element) throws IOException { 41614 composeBackboneElementElements(element); 41615 if (element.hasCode()) { 41616 composeCodeableConcept("code", element.getCode()); 41617 } 41618 if (element.hasDescriptionElement()) { 41619 composeString("description", element.getDescriptionElement()); 41620 } 41621 if (element.hasCriteria()) { 41622 composeExpression("criteria", element.getCriteria()); 41623 } 41624 } 41625 41626 protected void composeMeasureMeasureSupplementalDataComponent(String name, 41627 Measure.MeasureSupplementalDataComponent element) throws IOException { 41628 if (element != null) { 41629 composeElementAttributes(element); 41630 xml.enter(FHIR_NS, name); 41631 composeMeasureMeasureSupplementalDataComponentElements(element); 41632 composeElementClose(element); 41633 xml.exit(FHIR_NS, name); 41634 } 41635 } 41636 41637 protected void composeMeasureMeasureSupplementalDataComponentElements( 41638 Measure.MeasureSupplementalDataComponent element) throws IOException { 41639 composeBackboneElementElements(element); 41640 if (element.hasCode()) { 41641 composeCodeableConcept("code", element.getCode()); 41642 } 41643 if (element.hasUsage()) { 41644 for (CodeableConcept e : element.getUsage()) 41645 composeCodeableConcept("usage", e); 41646 } 41647 if (element.hasDescriptionElement()) { 41648 composeString("description", element.getDescriptionElement()); 41649 } 41650 if (element.hasCriteria()) { 41651 composeExpression("criteria", element.getCriteria()); 41652 } 41653 } 41654 41655 protected void composeMeasureReport(String name, MeasureReport element) throws IOException { 41656 if (element != null) { 41657 composeDomainResourceAttributes(element); 41658 xml.enter(FHIR_NS, name); 41659 composeMeasureReportElements(element); 41660 composeElementClose(element); 41661 xml.exit(FHIR_NS, name); 41662 } 41663 } 41664 41665 protected void composeMeasureReportElements(MeasureReport element) throws IOException { 41666 composeDomainResourceElements(element); 41667 if (element.hasIdentifier()) { 41668 for (Identifier e : element.getIdentifier()) 41669 composeIdentifier("identifier", e); 41670 } 41671 if (element.hasStatusElement()) 41672 composeEnumeration("status", element.getStatusElement(), new MeasureReport.MeasureReportStatusEnumFactory()); 41673 if (element.hasTypeElement()) 41674 composeEnumeration("type", element.getTypeElement(), new MeasureReport.MeasureReportTypeEnumFactory()); 41675 if (element.hasMeasureElement()) { 41676 composeCanonical("measure", element.getMeasureElement()); 41677 } 41678 if (element.hasSubject()) { 41679 composeReference("subject", element.getSubject()); 41680 } 41681 if (element.hasDateElement()) { 41682 composeDateTime("date", element.getDateElement()); 41683 } 41684 if (element.hasReporter()) { 41685 composeReference("reporter", element.getReporter()); 41686 } 41687 if (element.hasPeriod()) { 41688 composePeriod("period", element.getPeriod()); 41689 } 41690 if (element.hasImprovementNotation()) { 41691 composeCodeableConcept("improvementNotation", element.getImprovementNotation()); 41692 } 41693 if (element.hasGroup()) { 41694 for (MeasureReport.MeasureReportGroupComponent e : element.getGroup()) 41695 composeMeasureReportMeasureReportGroupComponent("group", e); 41696 } 41697 if (element.hasEvaluatedResource()) { 41698 for (Reference e : element.getEvaluatedResource()) 41699 composeReference("evaluatedResource", e); 41700 } 41701 } 41702 41703 protected void composeMeasureReportMeasureReportGroupComponent(String name, 41704 MeasureReport.MeasureReportGroupComponent element) throws IOException { 41705 if (element != null) { 41706 composeElementAttributes(element); 41707 xml.enter(FHIR_NS, name); 41708 composeMeasureReportMeasureReportGroupComponentElements(element); 41709 composeElementClose(element); 41710 xml.exit(FHIR_NS, name); 41711 } 41712 } 41713 41714 protected void composeMeasureReportMeasureReportGroupComponentElements( 41715 MeasureReport.MeasureReportGroupComponent element) throws IOException { 41716 composeBackboneElementElements(element); 41717 if (element.hasCode()) { 41718 composeCodeableConcept("code", element.getCode()); 41719 } 41720 if (element.hasPopulation()) { 41721 for (MeasureReport.MeasureReportGroupPopulationComponent e : element.getPopulation()) 41722 composeMeasureReportMeasureReportGroupPopulationComponent("population", e); 41723 } 41724 if (element.hasMeasureScore()) { 41725 composeQuantity("measureScore", element.getMeasureScore()); 41726 } 41727 if (element.hasStratifier()) { 41728 for (MeasureReport.MeasureReportGroupStratifierComponent e : element.getStratifier()) 41729 composeMeasureReportMeasureReportGroupStratifierComponent("stratifier", e); 41730 } 41731 } 41732 41733 protected void composeMeasureReportMeasureReportGroupPopulationComponent(String name, 41734 MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { 41735 if (element != null) { 41736 composeElementAttributes(element); 41737 xml.enter(FHIR_NS, name); 41738 composeMeasureReportMeasureReportGroupPopulationComponentElements(element); 41739 composeElementClose(element); 41740 xml.exit(FHIR_NS, name); 41741 } 41742 } 41743 41744 protected void composeMeasureReportMeasureReportGroupPopulationComponentElements( 41745 MeasureReport.MeasureReportGroupPopulationComponent element) throws IOException { 41746 composeBackboneElementElements(element); 41747 if (element.hasCode()) { 41748 composeCodeableConcept("code", element.getCode()); 41749 } 41750 if (element.hasCountElement()) { 41751 composeInteger("count", element.getCountElement()); 41752 } 41753 if (element.hasSubjectResults()) { 41754 composeReference("subjectResults", element.getSubjectResults()); 41755 } 41756 } 41757 41758 protected void composeMeasureReportMeasureReportGroupStratifierComponent(String name, 41759 MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { 41760 if (element != null) { 41761 composeElementAttributes(element); 41762 xml.enter(FHIR_NS, name); 41763 composeMeasureReportMeasureReportGroupStratifierComponentElements(element); 41764 composeElementClose(element); 41765 xml.exit(FHIR_NS, name); 41766 } 41767 } 41768 41769 protected void composeMeasureReportMeasureReportGroupStratifierComponentElements( 41770 MeasureReport.MeasureReportGroupStratifierComponent element) throws IOException { 41771 composeBackboneElementElements(element); 41772 if (element.hasCode()) { 41773 for (CodeableConcept e : element.getCode()) 41774 composeCodeableConcept("code", e); 41775 } 41776 if (element.hasStratum()) { 41777 for (MeasureReport.StratifierGroupComponent e : element.getStratum()) 41778 composeMeasureReportStratifierGroupComponent("stratum", e); 41779 } 41780 } 41781 41782 protected void composeMeasureReportStratifierGroupComponent(String name, 41783 MeasureReport.StratifierGroupComponent element) throws IOException { 41784 if (element != null) { 41785 composeElementAttributes(element); 41786 xml.enter(FHIR_NS, name); 41787 composeMeasureReportStratifierGroupComponentElements(element); 41788 composeElementClose(element); 41789 xml.exit(FHIR_NS, name); 41790 } 41791 } 41792 41793 protected void composeMeasureReportStratifierGroupComponentElements(MeasureReport.StratifierGroupComponent element) 41794 throws IOException { 41795 composeBackboneElementElements(element); 41796 if (element.hasValue()) { 41797 composeCodeableConcept("value", element.getValue()); 41798 } 41799 if (element.hasComponent()) { 41800 for (MeasureReport.StratifierGroupComponentComponent e : element.getComponent()) 41801 composeMeasureReportStratifierGroupComponentComponent("component", e); 41802 } 41803 if (element.hasPopulation()) { 41804 for (MeasureReport.StratifierGroupPopulationComponent e : element.getPopulation()) 41805 composeMeasureReportStratifierGroupPopulationComponent("population", e); 41806 } 41807 if (element.hasMeasureScore()) { 41808 composeQuantity("measureScore", element.getMeasureScore()); 41809 } 41810 } 41811 41812 protected void composeMeasureReportStratifierGroupComponentComponent(String name, 41813 MeasureReport.StratifierGroupComponentComponent element) throws IOException { 41814 if (element != null) { 41815 composeElementAttributes(element); 41816 xml.enter(FHIR_NS, name); 41817 composeMeasureReportStratifierGroupComponentComponentElements(element); 41818 composeElementClose(element); 41819 xml.exit(FHIR_NS, name); 41820 } 41821 } 41822 41823 protected void composeMeasureReportStratifierGroupComponentComponentElements( 41824 MeasureReport.StratifierGroupComponentComponent element) throws IOException { 41825 composeBackboneElementElements(element); 41826 if (element.hasCode()) { 41827 composeCodeableConcept("code", element.getCode()); 41828 } 41829 if (element.hasValue()) { 41830 composeCodeableConcept("value", element.getValue()); 41831 } 41832 } 41833 41834 protected void composeMeasureReportStratifierGroupPopulationComponent(String name, 41835 MeasureReport.StratifierGroupPopulationComponent element) throws IOException { 41836 if (element != null) { 41837 composeElementAttributes(element); 41838 xml.enter(FHIR_NS, name); 41839 composeMeasureReportStratifierGroupPopulationComponentElements(element); 41840 composeElementClose(element); 41841 xml.exit(FHIR_NS, name); 41842 } 41843 } 41844 41845 protected void composeMeasureReportStratifierGroupPopulationComponentElements( 41846 MeasureReport.StratifierGroupPopulationComponent element) throws IOException { 41847 composeBackboneElementElements(element); 41848 if (element.hasCode()) { 41849 composeCodeableConcept("code", element.getCode()); 41850 } 41851 if (element.hasCountElement()) { 41852 composeInteger("count", element.getCountElement()); 41853 } 41854 if (element.hasSubjectResults()) { 41855 composeReference("subjectResults", element.getSubjectResults()); 41856 } 41857 } 41858 41859 protected void composeMedia(String name, Media element) throws IOException { 41860 if (element != null) { 41861 composeDomainResourceAttributes(element); 41862 xml.enter(FHIR_NS, name); 41863 composeMediaElements(element); 41864 composeElementClose(element); 41865 xml.exit(FHIR_NS, name); 41866 } 41867 } 41868 41869 protected void composeMediaElements(Media element) throws IOException { 41870 composeDomainResourceElements(element); 41871 if (element.hasIdentifier()) { 41872 for (Identifier e : element.getIdentifier()) 41873 composeIdentifier("identifier", e); 41874 } 41875 if (element.hasBasedOn()) { 41876 for (Reference e : element.getBasedOn()) 41877 composeReference("basedOn", e); 41878 } 41879 if (element.hasPartOf()) { 41880 for (Reference e : element.getPartOf()) 41881 composeReference("partOf", e); 41882 } 41883 if (element.hasStatusElement()) 41884 composeEnumeration("status", element.getStatusElement(), new Media.MediaStatusEnumFactory()); 41885 if (element.hasType()) { 41886 composeCodeableConcept("type", element.getType()); 41887 } 41888 if (element.hasModality()) { 41889 composeCodeableConcept("modality", element.getModality()); 41890 } 41891 if (element.hasView()) { 41892 composeCodeableConcept("view", element.getView()); 41893 } 41894 if (element.hasSubject()) { 41895 composeReference("subject", element.getSubject()); 41896 } 41897 if (element.hasEncounter()) { 41898 composeReference("encounter", element.getEncounter()); 41899 } 41900 if (element.hasCreated()) { 41901 composeType("created", element.getCreated()); 41902 } 41903 if (element.hasIssuedElement()) { 41904 composeInstant("issued", element.getIssuedElement()); 41905 } 41906 if (element.hasOperator()) { 41907 composeReference("operator", element.getOperator()); 41908 } 41909 if (element.hasReasonCode()) { 41910 for (CodeableConcept e : element.getReasonCode()) 41911 composeCodeableConcept("reasonCode", e); 41912 } 41913 if (element.hasBodySite()) { 41914 composeCodeableConcept("bodySite", element.getBodySite()); 41915 } 41916 if (element.hasDeviceNameElement()) { 41917 composeString("deviceName", element.getDeviceNameElement()); 41918 } 41919 if (element.hasDevice()) { 41920 composeReference("device", element.getDevice()); 41921 } 41922 if (element.hasHeightElement()) { 41923 composePositiveInt("height", element.getHeightElement()); 41924 } 41925 if (element.hasWidthElement()) { 41926 composePositiveInt("width", element.getWidthElement()); 41927 } 41928 if (element.hasFramesElement()) { 41929 composePositiveInt("frames", element.getFramesElement()); 41930 } 41931 if (element.hasDurationElement()) { 41932 composeDecimal("duration", element.getDurationElement()); 41933 } 41934 if (element.hasContent()) { 41935 composeAttachment("content", element.getContent()); 41936 } 41937 if (element.hasNote()) { 41938 for (Annotation e : element.getNote()) 41939 composeAnnotation("note", e); 41940 } 41941 } 41942 41943 protected void composeMedication(String name, Medication element) throws IOException { 41944 if (element != null) { 41945 composeDomainResourceAttributes(element); 41946 xml.enter(FHIR_NS, name); 41947 composeMedicationElements(element); 41948 composeElementClose(element); 41949 xml.exit(FHIR_NS, name); 41950 } 41951 } 41952 41953 protected void composeMedicationElements(Medication element) throws IOException { 41954 composeDomainResourceElements(element); 41955 if (element.hasIdentifier()) { 41956 for (Identifier e : element.getIdentifier()) 41957 composeIdentifier("identifier", e); 41958 } 41959 if (element.hasCode()) { 41960 composeCodeableConcept("code", element.getCode()); 41961 } 41962 if (element.hasStatusElement()) 41963 composeEnumeration("status", element.getStatusElement(), new Medication.MedicationStatusEnumFactory()); 41964 if (element.hasManufacturer()) { 41965 composeReference("manufacturer", element.getManufacturer()); 41966 } 41967 if (element.hasForm()) { 41968 composeCodeableConcept("form", element.getForm()); 41969 } 41970 if (element.hasAmount()) { 41971 composeRatio("amount", element.getAmount()); 41972 } 41973 if (element.hasIngredient()) { 41974 for (Medication.MedicationIngredientComponent e : element.getIngredient()) 41975 composeMedicationMedicationIngredientComponent("ingredient", e); 41976 } 41977 if (element.hasBatch()) { 41978 composeMedicationMedicationBatchComponent("batch", element.getBatch()); 41979 } 41980 } 41981 41982 protected void composeMedicationMedicationIngredientComponent(String name, 41983 Medication.MedicationIngredientComponent element) throws IOException { 41984 if (element != null) { 41985 composeElementAttributes(element); 41986 xml.enter(FHIR_NS, name); 41987 composeMedicationMedicationIngredientComponentElements(element); 41988 composeElementClose(element); 41989 xml.exit(FHIR_NS, name); 41990 } 41991 } 41992 41993 protected void composeMedicationMedicationIngredientComponentElements( 41994 Medication.MedicationIngredientComponent element) throws IOException { 41995 composeBackboneElementElements(element); 41996 if (element.hasItem()) { 41997 composeType("item", element.getItem()); 41998 } 41999 if (element.hasIsActiveElement()) { 42000 composeBoolean("isActive", element.getIsActiveElement()); 42001 } 42002 if (element.hasStrength()) { 42003 composeRatio("strength", element.getStrength()); 42004 } 42005 } 42006 42007 protected void composeMedicationMedicationBatchComponent(String name, Medication.MedicationBatchComponent element) 42008 throws IOException { 42009 if (element != null) { 42010 composeElementAttributes(element); 42011 xml.enter(FHIR_NS, name); 42012 composeMedicationMedicationBatchComponentElements(element); 42013 composeElementClose(element); 42014 xml.exit(FHIR_NS, name); 42015 } 42016 } 42017 42018 protected void composeMedicationMedicationBatchComponentElements(Medication.MedicationBatchComponent element) 42019 throws IOException { 42020 composeBackboneElementElements(element); 42021 if (element.hasLotNumberElement()) { 42022 composeString("lotNumber", element.getLotNumberElement()); 42023 } 42024 if (element.hasExpirationDateElement()) { 42025 composeDateTime("expirationDate", element.getExpirationDateElement()); 42026 } 42027 } 42028 42029 protected void composeMedicationAdministration(String name, MedicationAdministration element) throws IOException { 42030 if (element != null) { 42031 composeDomainResourceAttributes(element); 42032 xml.enter(FHIR_NS, name); 42033 composeMedicationAdministrationElements(element); 42034 composeElementClose(element); 42035 xml.exit(FHIR_NS, name); 42036 } 42037 } 42038 42039 protected void composeMedicationAdministrationElements(MedicationAdministration element) throws IOException { 42040 composeDomainResourceElements(element); 42041 if (element.hasIdentifier()) { 42042 for (Identifier e : element.getIdentifier()) 42043 composeIdentifier("identifier", e); 42044 } 42045 if (element.hasInstantiates()) { 42046 for (UriType e : element.getInstantiates()) 42047 composeUri("instantiates", e); 42048 } 42049 if (element.hasPartOf()) { 42050 for (Reference e : element.getPartOf()) 42051 composeReference("partOf", e); 42052 } 42053 if (element.hasStatusElement()) 42054 composeEnumeration("status", element.getStatusElement(), 42055 new MedicationAdministration.MedicationAdministrationStatusEnumFactory()); 42056 if (element.hasStatusReason()) { 42057 for (CodeableConcept e : element.getStatusReason()) 42058 composeCodeableConcept("statusReason", e); 42059 } 42060 if (element.hasCategory()) { 42061 composeCodeableConcept("category", element.getCategory()); 42062 } 42063 if (element.hasMedication()) { 42064 composeType("medication", element.getMedication()); 42065 } 42066 if (element.hasSubject()) { 42067 composeReference("subject", element.getSubject()); 42068 } 42069 if (element.hasContext()) { 42070 composeReference("context", element.getContext()); 42071 } 42072 if (element.hasSupportingInformation()) { 42073 for (Reference e : element.getSupportingInformation()) 42074 composeReference("supportingInformation", e); 42075 } 42076 if (element.hasEffective()) { 42077 composeType("effective", element.getEffective()); 42078 } 42079 if (element.hasPerformer()) { 42080 for (MedicationAdministration.MedicationAdministrationPerformerComponent e : element.getPerformer()) 42081 composeMedicationAdministrationMedicationAdministrationPerformerComponent("performer", e); 42082 } 42083 if (element.hasReasonCode()) { 42084 for (CodeableConcept e : element.getReasonCode()) 42085 composeCodeableConcept("reasonCode", e); 42086 } 42087 if (element.hasReasonReference()) { 42088 for (Reference e : element.getReasonReference()) 42089 composeReference("reasonReference", e); 42090 } 42091 if (element.hasRequest()) { 42092 composeReference("request", element.getRequest()); 42093 } 42094 if (element.hasDevice()) { 42095 for (Reference e : element.getDevice()) 42096 composeReference("device", e); 42097 } 42098 if (element.hasNote()) { 42099 for (Annotation e : element.getNote()) 42100 composeAnnotation("note", e); 42101 } 42102 if (element.hasDosage()) { 42103 composeMedicationAdministrationMedicationAdministrationDosageComponent("dosage", element.getDosage()); 42104 } 42105 if (element.hasEventHistory()) { 42106 for (Reference e : element.getEventHistory()) 42107 composeReference("eventHistory", e); 42108 } 42109 } 42110 42111 protected void composeMedicationAdministrationMedicationAdministrationPerformerComponent(String name, 42112 MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { 42113 if (element != null) { 42114 composeElementAttributes(element); 42115 xml.enter(FHIR_NS, name); 42116 composeMedicationAdministrationMedicationAdministrationPerformerComponentElements(element); 42117 composeElementClose(element); 42118 xml.exit(FHIR_NS, name); 42119 } 42120 } 42121 42122 protected void composeMedicationAdministrationMedicationAdministrationPerformerComponentElements( 42123 MedicationAdministration.MedicationAdministrationPerformerComponent element) throws IOException { 42124 composeBackboneElementElements(element); 42125 if (element.hasFunction()) { 42126 composeCodeableConcept("function", element.getFunction()); 42127 } 42128 if (element.hasActor()) { 42129 composeReference("actor", element.getActor()); 42130 } 42131 } 42132 42133 protected void composeMedicationAdministrationMedicationAdministrationDosageComponent(String name, 42134 MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { 42135 if (element != null) { 42136 composeElementAttributes(element); 42137 xml.enter(FHIR_NS, name); 42138 composeMedicationAdministrationMedicationAdministrationDosageComponentElements(element); 42139 composeElementClose(element); 42140 xml.exit(FHIR_NS, name); 42141 } 42142 } 42143 42144 protected void composeMedicationAdministrationMedicationAdministrationDosageComponentElements( 42145 MedicationAdministration.MedicationAdministrationDosageComponent element) throws IOException { 42146 composeBackboneElementElements(element); 42147 if (element.hasTextElement()) { 42148 composeString("text", element.getTextElement()); 42149 } 42150 if (element.hasSite()) { 42151 composeCodeableConcept("site", element.getSite()); 42152 } 42153 if (element.hasRoute()) { 42154 composeCodeableConcept("route", element.getRoute()); 42155 } 42156 if (element.hasMethod()) { 42157 composeCodeableConcept("method", element.getMethod()); 42158 } 42159 if (element.hasDose()) { 42160 composeQuantity("dose", element.getDose()); 42161 } 42162 if (element.hasRate()) { 42163 composeType("rate", element.getRate()); 42164 } 42165 } 42166 42167 protected void composeMedicationDispense(String name, MedicationDispense element) throws IOException { 42168 if (element != null) { 42169 composeDomainResourceAttributes(element); 42170 xml.enter(FHIR_NS, name); 42171 composeMedicationDispenseElements(element); 42172 composeElementClose(element); 42173 xml.exit(FHIR_NS, name); 42174 } 42175 } 42176 42177 protected void composeMedicationDispenseElements(MedicationDispense element) throws IOException { 42178 composeDomainResourceElements(element); 42179 if (element.hasIdentifier()) { 42180 for (Identifier e : element.getIdentifier()) 42181 composeIdentifier("identifier", e); 42182 } 42183 if (element.hasPartOf()) { 42184 for (Reference e : element.getPartOf()) 42185 composeReference("partOf", e); 42186 } 42187 if (element.hasStatusElement()) 42188 composeEnumeration("status", element.getStatusElement(), 42189 new MedicationDispense.MedicationDispenseStatusEnumFactory()); 42190 if (element.hasStatusReason()) { 42191 composeType("statusReason", element.getStatusReason()); 42192 } 42193 if (element.hasCategory()) { 42194 composeCodeableConcept("category", element.getCategory()); 42195 } 42196 if (element.hasMedication()) { 42197 composeType("medication", element.getMedication()); 42198 } 42199 if (element.hasSubject()) { 42200 composeReference("subject", element.getSubject()); 42201 } 42202 if (element.hasContext()) { 42203 composeReference("context", element.getContext()); 42204 } 42205 if (element.hasSupportingInformation()) { 42206 for (Reference e : element.getSupportingInformation()) 42207 composeReference("supportingInformation", e); 42208 } 42209 if (element.hasPerformer()) { 42210 for (MedicationDispense.MedicationDispensePerformerComponent e : element.getPerformer()) 42211 composeMedicationDispenseMedicationDispensePerformerComponent("performer", e); 42212 } 42213 if (element.hasLocation()) { 42214 composeReference("location", element.getLocation()); 42215 } 42216 if (element.hasAuthorizingPrescription()) { 42217 for (Reference e : element.getAuthorizingPrescription()) 42218 composeReference("authorizingPrescription", e); 42219 } 42220 if (element.hasType()) { 42221 composeCodeableConcept("type", element.getType()); 42222 } 42223 if (element.hasQuantity()) { 42224 composeQuantity("quantity", element.getQuantity()); 42225 } 42226 if (element.hasDaysSupply()) { 42227 composeQuantity("daysSupply", element.getDaysSupply()); 42228 } 42229 if (element.hasWhenPreparedElement()) { 42230 composeDateTime("whenPrepared", element.getWhenPreparedElement()); 42231 } 42232 if (element.hasWhenHandedOverElement()) { 42233 composeDateTime("whenHandedOver", element.getWhenHandedOverElement()); 42234 } 42235 if (element.hasDestination()) { 42236 composeReference("destination", element.getDestination()); 42237 } 42238 if (element.hasReceiver()) { 42239 for (Reference e : element.getReceiver()) 42240 composeReference("receiver", e); 42241 } 42242 if (element.hasNote()) { 42243 for (Annotation e : element.getNote()) 42244 composeAnnotation("note", e); 42245 } 42246 if (element.hasDosageInstruction()) { 42247 for (Dosage e : element.getDosageInstruction()) 42248 composeDosage("dosageInstruction", e); 42249 } 42250 if (element.hasSubstitution()) { 42251 composeMedicationDispenseMedicationDispenseSubstitutionComponent("substitution", element.getSubstitution()); 42252 } 42253 if (element.hasDetectedIssue()) { 42254 for (Reference e : element.getDetectedIssue()) 42255 composeReference("detectedIssue", e); 42256 } 42257 if (element.hasEventHistory()) { 42258 for (Reference e : element.getEventHistory()) 42259 composeReference("eventHistory", e); 42260 } 42261 } 42262 42263 protected void composeMedicationDispenseMedicationDispensePerformerComponent(String name, 42264 MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { 42265 if (element != null) { 42266 composeElementAttributes(element); 42267 xml.enter(FHIR_NS, name); 42268 composeMedicationDispenseMedicationDispensePerformerComponentElements(element); 42269 composeElementClose(element); 42270 xml.exit(FHIR_NS, name); 42271 } 42272 } 42273 42274 protected void composeMedicationDispenseMedicationDispensePerformerComponentElements( 42275 MedicationDispense.MedicationDispensePerformerComponent element) throws IOException { 42276 composeBackboneElementElements(element); 42277 if (element.hasFunction()) { 42278 composeCodeableConcept("function", element.getFunction()); 42279 } 42280 if (element.hasActor()) { 42281 composeReference("actor", element.getActor()); 42282 } 42283 } 42284 42285 protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(String name, 42286 MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { 42287 if (element != null) { 42288 composeElementAttributes(element); 42289 xml.enter(FHIR_NS, name); 42290 composeMedicationDispenseMedicationDispenseSubstitutionComponentElements(element); 42291 composeElementClose(element); 42292 xml.exit(FHIR_NS, name); 42293 } 42294 } 42295 42296 protected void composeMedicationDispenseMedicationDispenseSubstitutionComponentElements( 42297 MedicationDispense.MedicationDispenseSubstitutionComponent element) throws IOException { 42298 composeBackboneElementElements(element); 42299 if (element.hasWasSubstitutedElement()) { 42300 composeBoolean("wasSubstituted", element.getWasSubstitutedElement()); 42301 } 42302 if (element.hasType()) { 42303 composeCodeableConcept("type", element.getType()); 42304 } 42305 if (element.hasReason()) { 42306 for (CodeableConcept e : element.getReason()) 42307 composeCodeableConcept("reason", e); 42308 } 42309 if (element.hasResponsibleParty()) { 42310 for (Reference e : element.getResponsibleParty()) 42311 composeReference("responsibleParty", e); 42312 } 42313 } 42314 42315 protected void composeMedicationKnowledge(String name, MedicationKnowledge element) throws IOException { 42316 if (element != null) { 42317 composeDomainResourceAttributes(element); 42318 xml.enter(FHIR_NS, name); 42319 composeMedicationKnowledgeElements(element); 42320 composeElementClose(element); 42321 xml.exit(FHIR_NS, name); 42322 } 42323 } 42324 42325 protected void composeMedicationKnowledgeElements(MedicationKnowledge element) throws IOException { 42326 composeDomainResourceElements(element); 42327 if (element.hasCode()) { 42328 composeCodeableConcept("code", element.getCode()); 42329 } 42330 if (element.hasStatusElement()) 42331 composeEnumeration("status", element.getStatusElement(), 42332 new MedicationKnowledge.MedicationKnowledgeStatusEnumFactory()); 42333 if (element.hasManufacturer()) { 42334 composeReference("manufacturer", element.getManufacturer()); 42335 } 42336 if (element.hasDoseForm()) { 42337 composeCodeableConcept("doseForm", element.getDoseForm()); 42338 } 42339 if (element.hasAmount()) { 42340 composeQuantity("amount", element.getAmount()); 42341 } 42342 if (element.hasSynonym()) { 42343 for (StringType e : element.getSynonym()) 42344 composeString("synonym", e); 42345 } 42346 if (element.hasRelatedMedicationKnowledge()) { 42347 for (MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent e : element 42348 .getRelatedMedicationKnowledge()) 42349 composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent("relatedMedicationKnowledge", 42350 e); 42351 } 42352 if (element.hasAssociatedMedication()) { 42353 for (Reference e : element.getAssociatedMedication()) 42354 composeReference("associatedMedication", e); 42355 } 42356 if (element.hasProductType()) { 42357 for (CodeableConcept e : element.getProductType()) 42358 composeCodeableConcept("productType", e); 42359 } 42360 if (element.hasMonograph()) { 42361 for (MedicationKnowledge.MedicationKnowledgeMonographComponent e : element.getMonograph()) 42362 composeMedicationKnowledgeMedicationKnowledgeMonographComponent("monograph", e); 42363 } 42364 if (element.hasIngredient()) { 42365 for (MedicationKnowledge.MedicationKnowledgeIngredientComponent e : element.getIngredient()) 42366 composeMedicationKnowledgeMedicationKnowledgeIngredientComponent("ingredient", e); 42367 } 42368 if (element.hasPreparationInstructionElement()) { 42369 composeMarkdown("preparationInstruction", element.getPreparationInstructionElement()); 42370 } 42371 if (element.hasIntendedRoute()) { 42372 for (CodeableConcept e : element.getIntendedRoute()) 42373 composeCodeableConcept("intendedRoute", e); 42374 } 42375 if (element.hasCost()) { 42376 for (MedicationKnowledge.MedicationKnowledgeCostComponent e : element.getCost()) 42377 composeMedicationKnowledgeMedicationKnowledgeCostComponent("cost", e); 42378 } 42379 if (element.hasMonitoringProgram()) { 42380 for (MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent e : element.getMonitoringProgram()) 42381 composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent("monitoringProgram", e); 42382 } 42383 if (element.hasAdministrationGuidelines()) { 42384 for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent e : element 42385 .getAdministrationGuidelines()) 42386 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent("administrationGuidelines", e); 42387 } 42388 if (element.hasMedicineClassification()) { 42389 for (MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent e : element 42390 .getMedicineClassification()) 42391 composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent("medicineClassification", e); 42392 } 42393 if (element.hasPackaging()) { 42394 composeMedicationKnowledgeMedicationKnowledgePackagingComponent("packaging", element.getPackaging()); 42395 } 42396 if (element.hasDrugCharacteristic()) { 42397 for (MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent e : element.getDrugCharacteristic()) 42398 composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent("drugCharacteristic", e); 42399 } 42400 if (element.hasContraindication()) { 42401 for (Reference e : element.getContraindication()) 42402 composeReference("contraindication", e); 42403 } 42404 if (element.hasRegulatory()) { 42405 for (MedicationKnowledge.MedicationKnowledgeRegulatoryComponent e : element.getRegulatory()) 42406 composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponent("regulatory", e); 42407 } 42408 if (element.hasKinetics()) { 42409 for (MedicationKnowledge.MedicationKnowledgeKineticsComponent e : element.getKinetics()) 42410 composeMedicationKnowledgeMedicationKnowledgeKineticsComponent("kinetics", e); 42411 } 42412 } 42413 42414 protected void composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponent(String name, 42415 MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException { 42416 if (element != null) { 42417 composeElementAttributes(element); 42418 xml.enter(FHIR_NS, name); 42419 composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentElements(element); 42420 composeElementClose(element); 42421 xml.exit(FHIR_NS, name); 42422 } 42423 } 42424 42425 protected void composeMedicationKnowledgeMedicationKnowledgeRelatedMedicationKnowledgeComponentElements( 42426 MedicationKnowledge.MedicationKnowledgeRelatedMedicationKnowledgeComponent element) throws IOException { 42427 composeBackboneElementElements(element); 42428 if (element.hasType()) { 42429 composeCodeableConcept("type", element.getType()); 42430 } 42431 if (element.hasReference()) { 42432 for (Reference e : element.getReference()) 42433 composeReference("reference", e); 42434 } 42435 } 42436 42437 protected void composeMedicationKnowledgeMedicationKnowledgeMonographComponent(String name, 42438 MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException { 42439 if (element != null) { 42440 composeElementAttributes(element); 42441 xml.enter(FHIR_NS, name); 42442 composeMedicationKnowledgeMedicationKnowledgeMonographComponentElements(element); 42443 composeElementClose(element); 42444 xml.exit(FHIR_NS, name); 42445 } 42446 } 42447 42448 protected void composeMedicationKnowledgeMedicationKnowledgeMonographComponentElements( 42449 MedicationKnowledge.MedicationKnowledgeMonographComponent element) throws IOException { 42450 composeBackboneElementElements(element); 42451 if (element.hasType()) { 42452 composeCodeableConcept("type", element.getType()); 42453 } 42454 if (element.hasSource()) { 42455 composeReference("source", element.getSource()); 42456 } 42457 } 42458 42459 protected void composeMedicationKnowledgeMedicationKnowledgeIngredientComponent(String name, 42460 MedicationKnowledge.MedicationKnowledgeIngredientComponent element) throws IOException { 42461 if (element != null) { 42462 composeElementAttributes(element); 42463 xml.enter(FHIR_NS, name); 42464 composeMedicationKnowledgeMedicationKnowledgeIngredientComponentElements(element); 42465 composeElementClose(element); 42466 xml.exit(FHIR_NS, name); 42467 } 42468 } 42469 42470 protected void composeMedicationKnowledgeMedicationKnowledgeIngredientComponentElements( 42471 MedicationKnowledge.MedicationKnowledgeIngredientComponent element) throws IOException { 42472 composeBackboneElementElements(element); 42473 if (element.hasItem()) { 42474 composeType("item", element.getItem()); 42475 } 42476 if (element.hasIsActiveElement()) { 42477 composeBoolean("isActive", element.getIsActiveElement()); 42478 } 42479 if (element.hasStrength()) { 42480 composeRatio("strength", element.getStrength()); 42481 } 42482 } 42483 42484 protected void composeMedicationKnowledgeMedicationKnowledgeCostComponent(String name, 42485 MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException { 42486 if (element != null) { 42487 composeElementAttributes(element); 42488 xml.enter(FHIR_NS, name); 42489 composeMedicationKnowledgeMedicationKnowledgeCostComponentElements(element); 42490 composeElementClose(element); 42491 xml.exit(FHIR_NS, name); 42492 } 42493 } 42494 42495 protected void composeMedicationKnowledgeMedicationKnowledgeCostComponentElements( 42496 MedicationKnowledge.MedicationKnowledgeCostComponent element) throws IOException { 42497 composeBackboneElementElements(element); 42498 if (element.hasType()) { 42499 composeCodeableConcept("type", element.getType()); 42500 } 42501 if (element.hasSourceElement()) { 42502 composeString("source", element.getSourceElement()); 42503 } 42504 if (element.hasCost()) { 42505 composeMoney("cost", element.getCost()); 42506 } 42507 } 42508 42509 protected void composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponent(String name, 42510 MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException { 42511 if (element != null) { 42512 composeElementAttributes(element); 42513 xml.enter(FHIR_NS, name); 42514 composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentElements(element); 42515 composeElementClose(element); 42516 xml.exit(FHIR_NS, name); 42517 } 42518 } 42519 42520 protected void composeMedicationKnowledgeMedicationKnowledgeMonitoringProgramComponentElements( 42521 MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent element) throws IOException { 42522 composeBackboneElementElements(element); 42523 if (element.hasType()) { 42524 composeCodeableConcept("type", element.getType()); 42525 } 42526 if (element.hasNameElement()) { 42527 composeString("name", element.getNameElement()); 42528 } 42529 } 42530 42531 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponent(String name, 42532 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent element) throws IOException { 42533 if (element != null) { 42534 composeElementAttributes(element); 42535 xml.enter(FHIR_NS, name); 42536 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentElements(element); 42537 composeElementClose(element); 42538 xml.exit(FHIR_NS, name); 42539 } 42540 } 42541 42542 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesComponentElements( 42543 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent element) throws IOException { 42544 composeBackboneElementElements(element); 42545 if (element.hasDosage()) { 42546 for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent e : element.getDosage()) 42547 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent("dosage", e); 42548 } 42549 if (element.hasIndication()) { 42550 composeType("indication", element.getIndication()); 42551 } 42552 if (element.hasPatientCharacteristics()) { 42553 for (MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent e : element 42554 .getPatientCharacteristics()) 42555 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent( 42556 "patientCharacteristics", e); 42557 } 42558 } 42559 42560 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponent(String name, 42561 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent element) throws IOException { 42562 if (element != null) { 42563 composeElementAttributes(element); 42564 xml.enter(FHIR_NS, name); 42565 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentElements(element); 42566 composeElementClose(element); 42567 xml.exit(FHIR_NS, name); 42568 } 42569 } 42570 42571 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesDosageComponentElements( 42572 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent element) throws IOException { 42573 composeBackboneElementElements(element); 42574 if (element.hasType()) { 42575 composeCodeableConcept("type", element.getType()); 42576 } 42577 if (element.hasDosage()) { 42578 for (Dosage e : element.getDosage()) 42579 composeDosage("dosage", e); 42580 } 42581 } 42582 42583 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent( 42584 String name, 42585 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent element) 42586 throws IOException { 42587 if (element != null) { 42588 composeElementAttributes(element); 42589 xml.enter(FHIR_NS, name); 42590 composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentElements( 42591 element); 42592 composeElementClose(element); 42593 xml.exit(FHIR_NS, name); 42594 } 42595 } 42596 42597 protected void composeMedicationKnowledgeMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponentElements( 42598 MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent element) 42599 throws IOException { 42600 composeBackboneElementElements(element); 42601 if (element.hasCharacteristic()) { 42602 composeType("characteristic", element.getCharacteristic()); 42603 } 42604 if (element.hasValue()) { 42605 for (StringType e : element.getValue()) 42606 composeString("value", e); 42607 } 42608 } 42609 42610 protected void composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponent(String name, 42611 MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException { 42612 if (element != null) { 42613 composeElementAttributes(element); 42614 xml.enter(FHIR_NS, name); 42615 composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentElements(element); 42616 composeElementClose(element); 42617 xml.exit(FHIR_NS, name); 42618 } 42619 } 42620 42621 protected void composeMedicationKnowledgeMedicationKnowledgeMedicineClassificationComponentElements( 42622 MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent element) throws IOException { 42623 composeBackboneElementElements(element); 42624 if (element.hasType()) { 42625 composeCodeableConcept("type", element.getType()); 42626 } 42627 if (element.hasClassification()) { 42628 for (CodeableConcept e : element.getClassification()) 42629 composeCodeableConcept("classification", e); 42630 } 42631 } 42632 42633 protected void composeMedicationKnowledgeMedicationKnowledgePackagingComponent(String name, 42634 MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException { 42635 if (element != null) { 42636 composeElementAttributes(element); 42637 xml.enter(FHIR_NS, name); 42638 composeMedicationKnowledgeMedicationKnowledgePackagingComponentElements(element); 42639 composeElementClose(element); 42640 xml.exit(FHIR_NS, name); 42641 } 42642 } 42643 42644 protected void composeMedicationKnowledgeMedicationKnowledgePackagingComponentElements( 42645 MedicationKnowledge.MedicationKnowledgePackagingComponent element) throws IOException { 42646 composeBackboneElementElements(element); 42647 if (element.hasType()) { 42648 composeCodeableConcept("type", element.getType()); 42649 } 42650 if (element.hasQuantity()) { 42651 composeQuantity("quantity", element.getQuantity()); 42652 } 42653 } 42654 42655 protected void composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponent(String name, 42656 MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent element) throws IOException { 42657 if (element != null) { 42658 composeElementAttributes(element); 42659 xml.enter(FHIR_NS, name); 42660 composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentElements(element); 42661 composeElementClose(element); 42662 xml.exit(FHIR_NS, name); 42663 } 42664 } 42665 42666 protected void composeMedicationKnowledgeMedicationKnowledgeDrugCharacteristicComponentElements( 42667 MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent element) throws IOException { 42668 composeBackboneElementElements(element); 42669 if (element.hasType()) { 42670 composeCodeableConcept("type", element.getType()); 42671 } 42672 if (element.hasValue()) { 42673 composeType("value", element.getValue()); 42674 } 42675 } 42676 42677 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponent(String name, 42678 MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException { 42679 if (element != null) { 42680 composeElementAttributes(element); 42681 xml.enter(FHIR_NS, name); 42682 composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponentElements(element); 42683 composeElementClose(element); 42684 xml.exit(FHIR_NS, name); 42685 } 42686 } 42687 42688 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryComponentElements( 42689 MedicationKnowledge.MedicationKnowledgeRegulatoryComponent element) throws IOException { 42690 composeBackboneElementElements(element); 42691 if (element.hasRegulatoryAuthority()) { 42692 composeReference("regulatoryAuthority", element.getRegulatoryAuthority()); 42693 } 42694 if (element.hasSubstitution()) { 42695 for (MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent e : element.getSubstitution()) 42696 composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent("substitution", e); 42697 } 42698 if (element.hasSchedule()) { 42699 for (MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent e : element.getSchedule()) 42700 composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent("schedule", e); 42701 } 42702 if (element.hasMaxDispense()) { 42703 composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent("maxDispense", 42704 element.getMaxDispense()); 42705 } 42706 } 42707 42708 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponent(String name, 42709 MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException { 42710 if (element != null) { 42711 composeElementAttributes(element); 42712 xml.enter(FHIR_NS, name); 42713 composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentElements(element); 42714 composeElementClose(element); 42715 xml.exit(FHIR_NS, name); 42716 } 42717 } 42718 42719 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatorySubstitutionComponentElements( 42720 MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent element) throws IOException { 42721 composeBackboneElementElements(element); 42722 if (element.hasType()) { 42723 composeCodeableConcept("type", element.getType()); 42724 } 42725 if (element.hasAllowedElement()) { 42726 composeBoolean("allowed", element.getAllowedElement()); 42727 } 42728 } 42729 42730 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponent(String name, 42731 MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent element) throws IOException { 42732 if (element != null) { 42733 composeElementAttributes(element); 42734 xml.enter(FHIR_NS, name); 42735 composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentElements(element); 42736 composeElementClose(element); 42737 xml.exit(FHIR_NS, name); 42738 } 42739 } 42740 42741 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryScheduleComponentElements( 42742 MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent element) throws IOException { 42743 composeBackboneElementElements(element); 42744 if (element.hasSchedule()) { 42745 composeCodeableConcept("schedule", element.getSchedule()); 42746 } 42747 } 42748 42749 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponent(String name, 42750 MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException { 42751 if (element != null) { 42752 composeElementAttributes(element); 42753 xml.enter(FHIR_NS, name); 42754 composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentElements(element); 42755 composeElementClose(element); 42756 xml.exit(FHIR_NS, name); 42757 } 42758 } 42759 42760 protected void composeMedicationKnowledgeMedicationKnowledgeRegulatoryMaxDispenseComponentElements( 42761 MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent element) throws IOException { 42762 composeBackboneElementElements(element); 42763 if (element.hasQuantity()) { 42764 composeQuantity("quantity", element.getQuantity()); 42765 } 42766 if (element.hasPeriod()) { 42767 composeDuration("period", element.getPeriod()); 42768 } 42769 } 42770 42771 protected void composeMedicationKnowledgeMedicationKnowledgeKineticsComponent(String name, 42772 MedicationKnowledge.MedicationKnowledgeKineticsComponent element) throws IOException { 42773 if (element != null) { 42774 composeElementAttributes(element); 42775 xml.enter(FHIR_NS, name); 42776 composeMedicationKnowledgeMedicationKnowledgeKineticsComponentElements(element); 42777 composeElementClose(element); 42778 xml.exit(FHIR_NS, name); 42779 } 42780 } 42781 42782 protected void composeMedicationKnowledgeMedicationKnowledgeKineticsComponentElements( 42783 MedicationKnowledge.MedicationKnowledgeKineticsComponent element) throws IOException { 42784 composeBackboneElementElements(element); 42785 if (element.hasAreaUnderCurve()) { 42786 for (Quantity e : element.getAreaUnderCurve()) 42787 composeQuantity("areaUnderCurve", e); 42788 } 42789 if (element.hasLethalDose50()) { 42790 for (Quantity e : element.getLethalDose50()) 42791 composeQuantity("lethalDose50", e); 42792 } 42793 if (element.hasHalfLifePeriod()) { 42794 composeDuration("halfLifePeriod", element.getHalfLifePeriod()); 42795 } 42796 } 42797 42798 protected void composeMedicationRequest(String name, MedicationRequest element) throws IOException { 42799 if (element != null) { 42800 composeDomainResourceAttributes(element); 42801 xml.enter(FHIR_NS, name); 42802 composeMedicationRequestElements(element); 42803 composeElementClose(element); 42804 xml.exit(FHIR_NS, name); 42805 } 42806 } 42807 42808 protected void composeMedicationRequestElements(MedicationRequest element) throws IOException { 42809 composeDomainResourceElements(element); 42810 if (element.hasIdentifier()) { 42811 for (Identifier e : element.getIdentifier()) 42812 composeIdentifier("identifier", e); 42813 } 42814 if (element.hasStatusElement()) 42815 composeEnumeration("status", element.getStatusElement(), 42816 new MedicationRequest.MedicationRequestStatusEnumFactory()); 42817 if (element.hasStatusReason()) { 42818 composeCodeableConcept("statusReason", element.getStatusReason()); 42819 } 42820 if (element.hasIntentElement()) 42821 composeEnumeration("intent", element.getIntentElement(), 42822 new MedicationRequest.MedicationRequestIntentEnumFactory()); 42823 if (element.hasCategory()) { 42824 for (CodeableConcept e : element.getCategory()) 42825 composeCodeableConcept("category", e); 42826 } 42827 if (element.hasPriorityElement()) 42828 composeEnumeration("priority", element.getPriorityElement(), 42829 new MedicationRequest.MedicationRequestPriorityEnumFactory()); 42830 if (element.hasDoNotPerformElement()) { 42831 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 42832 } 42833 if (element.hasReported()) { 42834 composeType("reported", element.getReported()); 42835 } 42836 if (element.hasMedication()) { 42837 composeType("medication", element.getMedication()); 42838 } 42839 if (element.hasSubject()) { 42840 composeReference("subject", element.getSubject()); 42841 } 42842 if (element.hasEncounter()) { 42843 composeReference("encounter", element.getEncounter()); 42844 } 42845 if (element.hasSupportingInformation()) { 42846 for (Reference e : element.getSupportingInformation()) 42847 composeReference("supportingInformation", e); 42848 } 42849 if (element.hasAuthoredOnElement()) { 42850 composeDateTime("authoredOn", element.getAuthoredOnElement()); 42851 } 42852 if (element.hasRequester()) { 42853 composeReference("requester", element.getRequester()); 42854 } 42855 if (element.hasPerformer()) { 42856 composeReference("performer", element.getPerformer()); 42857 } 42858 if (element.hasPerformerType()) { 42859 composeCodeableConcept("performerType", element.getPerformerType()); 42860 } 42861 if (element.hasRecorder()) { 42862 composeReference("recorder", element.getRecorder()); 42863 } 42864 if (element.hasReasonCode()) { 42865 for (CodeableConcept e : element.getReasonCode()) 42866 composeCodeableConcept("reasonCode", e); 42867 } 42868 if (element.hasReasonReference()) { 42869 for (Reference e : element.getReasonReference()) 42870 composeReference("reasonReference", e); 42871 } 42872 if (element.hasInstantiatesCanonical()) { 42873 for (CanonicalType e : element.getInstantiatesCanonical()) 42874 composeCanonical("instantiatesCanonical", e); 42875 } 42876 if (element.hasInstantiatesUri()) { 42877 for (UriType e : element.getInstantiatesUri()) 42878 composeUri("instantiatesUri", e); 42879 } 42880 if (element.hasBasedOn()) { 42881 for (Reference e : element.getBasedOn()) 42882 composeReference("basedOn", e); 42883 } 42884 if (element.hasGroupIdentifier()) { 42885 composeIdentifier("groupIdentifier", element.getGroupIdentifier()); 42886 } 42887 if (element.hasCourseOfTherapyType()) { 42888 composeCodeableConcept("courseOfTherapyType", element.getCourseOfTherapyType()); 42889 } 42890 if (element.hasInsurance()) { 42891 for (Reference e : element.getInsurance()) 42892 composeReference("insurance", e); 42893 } 42894 if (element.hasNote()) { 42895 for (Annotation e : element.getNote()) 42896 composeAnnotation("note", e); 42897 } 42898 if (element.hasDosageInstruction()) { 42899 for (Dosage e : element.getDosageInstruction()) 42900 composeDosage("dosageInstruction", e); 42901 } 42902 if (element.hasDispenseRequest()) { 42903 composeMedicationRequestMedicationRequestDispenseRequestComponent("dispenseRequest", 42904 element.getDispenseRequest()); 42905 } 42906 if (element.hasSubstitution()) { 42907 composeMedicationRequestMedicationRequestSubstitutionComponent("substitution", element.getSubstitution()); 42908 } 42909 if (element.hasPriorPrescription()) { 42910 composeReference("priorPrescription", element.getPriorPrescription()); 42911 } 42912 if (element.hasDetectedIssue()) { 42913 for (Reference e : element.getDetectedIssue()) 42914 composeReference("detectedIssue", e); 42915 } 42916 if (element.hasEventHistory()) { 42917 for (Reference e : element.getEventHistory()) 42918 composeReference("eventHistory", e); 42919 } 42920 } 42921 42922 protected void composeMedicationRequestMedicationRequestDispenseRequestComponent(String name, 42923 MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { 42924 if (element != null) { 42925 composeElementAttributes(element); 42926 xml.enter(FHIR_NS, name); 42927 composeMedicationRequestMedicationRequestDispenseRequestComponentElements(element); 42928 composeElementClose(element); 42929 xml.exit(FHIR_NS, name); 42930 } 42931 } 42932 42933 protected void composeMedicationRequestMedicationRequestDispenseRequestComponentElements( 42934 MedicationRequest.MedicationRequestDispenseRequestComponent element) throws IOException { 42935 composeBackboneElementElements(element); 42936 if (element.hasInitialFill()) { 42937 composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponent("initialFill", 42938 element.getInitialFill()); 42939 } 42940 if (element.hasDispenseInterval()) { 42941 composeDuration("dispenseInterval", element.getDispenseInterval()); 42942 } 42943 if (element.hasValidityPeriod()) { 42944 composePeriod("validityPeriod", element.getValidityPeriod()); 42945 } 42946 if (element.hasNumberOfRepeatsAllowedElement()) { 42947 composeUnsignedInt("numberOfRepeatsAllowed", element.getNumberOfRepeatsAllowedElement()); 42948 } 42949 if (element.hasQuantity()) { 42950 composeQuantity("quantity", element.getQuantity()); 42951 } 42952 if (element.hasExpectedSupplyDuration()) { 42953 composeDuration("expectedSupplyDuration", element.getExpectedSupplyDuration()); 42954 } 42955 if (element.hasPerformer()) { 42956 composeReference("performer", element.getPerformer()); 42957 } 42958 } 42959 42960 protected void composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponent(String name, 42961 MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException { 42962 if (element != null) { 42963 composeElementAttributes(element); 42964 xml.enter(FHIR_NS, name); 42965 composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponentElements(element); 42966 composeElementClose(element); 42967 xml.exit(FHIR_NS, name); 42968 } 42969 } 42970 42971 protected void composeMedicationRequestMedicationRequestDispenseRequestInitialFillComponentElements( 42972 MedicationRequest.MedicationRequestDispenseRequestInitialFillComponent element) throws IOException { 42973 composeBackboneElementElements(element); 42974 if (element.hasQuantity()) { 42975 composeQuantity("quantity", element.getQuantity()); 42976 } 42977 if (element.hasDuration()) { 42978 composeDuration("duration", element.getDuration()); 42979 } 42980 } 42981 42982 protected void composeMedicationRequestMedicationRequestSubstitutionComponent(String name, 42983 MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { 42984 if (element != null) { 42985 composeElementAttributes(element); 42986 xml.enter(FHIR_NS, name); 42987 composeMedicationRequestMedicationRequestSubstitutionComponentElements(element); 42988 composeElementClose(element); 42989 xml.exit(FHIR_NS, name); 42990 } 42991 } 42992 42993 protected void composeMedicationRequestMedicationRequestSubstitutionComponentElements( 42994 MedicationRequest.MedicationRequestSubstitutionComponent element) throws IOException { 42995 composeBackboneElementElements(element); 42996 if (element.hasAllowed()) { 42997 composeType("allowed", element.getAllowed()); 42998 } 42999 if (element.hasReason()) { 43000 composeCodeableConcept("reason", element.getReason()); 43001 } 43002 } 43003 43004 protected void composeMedicationStatement(String name, MedicationStatement element) throws IOException { 43005 if (element != null) { 43006 composeDomainResourceAttributes(element); 43007 xml.enter(FHIR_NS, name); 43008 composeMedicationStatementElements(element); 43009 composeElementClose(element); 43010 xml.exit(FHIR_NS, name); 43011 } 43012 } 43013 43014 protected void composeMedicationStatementElements(MedicationStatement element) throws IOException { 43015 composeDomainResourceElements(element); 43016 if (element.hasIdentifier()) { 43017 for (Identifier e : element.getIdentifier()) 43018 composeIdentifier("identifier", e); 43019 } 43020 if (element.hasBasedOn()) { 43021 for (Reference e : element.getBasedOn()) 43022 composeReference("basedOn", e); 43023 } 43024 if (element.hasPartOf()) { 43025 for (Reference e : element.getPartOf()) 43026 composeReference("partOf", e); 43027 } 43028 if (element.hasStatusElement()) 43029 composeEnumeration("status", element.getStatusElement(), 43030 new MedicationStatement.MedicationStatementStatusEnumFactory()); 43031 if (element.hasStatusReason()) { 43032 for (CodeableConcept e : element.getStatusReason()) 43033 composeCodeableConcept("statusReason", e); 43034 } 43035 if (element.hasCategory()) { 43036 composeCodeableConcept("category", element.getCategory()); 43037 } 43038 if (element.hasMedication()) { 43039 composeType("medication", element.getMedication()); 43040 } 43041 if (element.hasSubject()) { 43042 composeReference("subject", element.getSubject()); 43043 } 43044 if (element.hasContext()) { 43045 composeReference("context", element.getContext()); 43046 } 43047 if (element.hasEffective()) { 43048 composeType("effective", element.getEffective()); 43049 } 43050 if (element.hasDateAssertedElement()) { 43051 composeDateTime("dateAsserted", element.getDateAssertedElement()); 43052 } 43053 if (element.hasInformationSource()) { 43054 composeReference("informationSource", element.getInformationSource()); 43055 } 43056 if (element.hasDerivedFrom()) { 43057 for (Reference e : element.getDerivedFrom()) 43058 composeReference("derivedFrom", e); 43059 } 43060 if (element.hasReasonCode()) { 43061 for (CodeableConcept e : element.getReasonCode()) 43062 composeCodeableConcept("reasonCode", e); 43063 } 43064 if (element.hasReasonReference()) { 43065 for (Reference e : element.getReasonReference()) 43066 composeReference("reasonReference", e); 43067 } 43068 if (element.hasNote()) { 43069 for (Annotation e : element.getNote()) 43070 composeAnnotation("note", e); 43071 } 43072 if (element.hasDosage()) { 43073 for (Dosage e : element.getDosage()) 43074 composeDosage("dosage", e); 43075 } 43076 } 43077 43078 protected void composeMedicinalProduct(String name, MedicinalProduct element) throws IOException { 43079 if (element != null) { 43080 composeDomainResourceAttributes(element); 43081 xml.enter(FHIR_NS, name); 43082 composeMedicinalProductElements(element); 43083 composeElementClose(element); 43084 xml.exit(FHIR_NS, name); 43085 } 43086 } 43087 43088 protected void composeMedicinalProductElements(MedicinalProduct element) throws IOException { 43089 composeDomainResourceElements(element); 43090 if (element.hasIdentifier()) { 43091 for (Identifier e : element.getIdentifier()) 43092 composeIdentifier("identifier", e); 43093 } 43094 if (element.hasType()) { 43095 composeCodeableConcept("type", element.getType()); 43096 } 43097 if (element.hasDomain()) { 43098 composeCoding("domain", element.getDomain()); 43099 } 43100 if (element.hasCombinedPharmaceuticalDoseForm()) { 43101 composeCodeableConcept("combinedPharmaceuticalDoseForm", element.getCombinedPharmaceuticalDoseForm()); 43102 } 43103 if (element.hasLegalStatusOfSupply()) { 43104 composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply()); 43105 } 43106 if (element.hasAdditionalMonitoringIndicator()) { 43107 composeCodeableConcept("additionalMonitoringIndicator", element.getAdditionalMonitoringIndicator()); 43108 } 43109 if (element.hasSpecialMeasures()) { 43110 for (StringType e : element.getSpecialMeasures()) 43111 composeString("specialMeasures", e); 43112 } 43113 if (element.hasPaediatricUseIndicator()) { 43114 composeCodeableConcept("paediatricUseIndicator", element.getPaediatricUseIndicator()); 43115 } 43116 if (element.hasProductClassification()) { 43117 for (CodeableConcept e : element.getProductClassification()) 43118 composeCodeableConcept("productClassification", e); 43119 } 43120 if (element.hasMarketingStatus()) { 43121 for (MarketingStatus e : element.getMarketingStatus()) 43122 composeMarketingStatus("marketingStatus", e); 43123 } 43124 if (element.hasPharmaceuticalProduct()) { 43125 for (Reference e : element.getPharmaceuticalProduct()) 43126 composeReference("pharmaceuticalProduct", e); 43127 } 43128 if (element.hasPackagedMedicinalProduct()) { 43129 for (Reference e : element.getPackagedMedicinalProduct()) 43130 composeReference("packagedMedicinalProduct", e); 43131 } 43132 if (element.hasAttachedDocument()) { 43133 for (Reference e : element.getAttachedDocument()) 43134 composeReference("attachedDocument", e); 43135 } 43136 if (element.hasMasterFile()) { 43137 for (Reference e : element.getMasterFile()) 43138 composeReference("masterFile", e); 43139 } 43140 if (element.hasContact()) { 43141 for (Reference e : element.getContact()) 43142 composeReference("contact", e); 43143 } 43144 if (element.hasClinicalTrial()) { 43145 for (Reference e : element.getClinicalTrial()) 43146 composeReference("clinicalTrial", e); 43147 } 43148 if (element.hasName()) { 43149 for (MedicinalProduct.MedicinalProductNameComponent e : element.getName()) 43150 composeMedicinalProductMedicinalProductNameComponent("name", e); 43151 } 43152 if (element.hasCrossReference()) { 43153 for (Identifier e : element.getCrossReference()) 43154 composeIdentifier("crossReference", e); 43155 } 43156 if (element.hasManufacturingBusinessOperation()) { 43157 for (MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent e : element 43158 .getManufacturingBusinessOperation()) 43159 composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponent("manufacturingBusinessOperation", 43160 e); 43161 } 43162 if (element.hasSpecialDesignation()) { 43163 for (MedicinalProduct.MedicinalProductSpecialDesignationComponent e : element.getSpecialDesignation()) 43164 composeMedicinalProductMedicinalProductSpecialDesignationComponent("specialDesignation", e); 43165 } 43166 } 43167 43168 protected void composeMedicinalProductMedicinalProductNameComponent(String name, 43169 MedicinalProduct.MedicinalProductNameComponent element) throws IOException { 43170 if (element != null) { 43171 composeElementAttributes(element); 43172 xml.enter(FHIR_NS, name); 43173 composeMedicinalProductMedicinalProductNameComponentElements(element); 43174 composeElementClose(element); 43175 xml.exit(FHIR_NS, name); 43176 } 43177 } 43178 43179 protected void composeMedicinalProductMedicinalProductNameComponentElements( 43180 MedicinalProduct.MedicinalProductNameComponent element) throws IOException { 43181 composeBackboneElementElements(element); 43182 if (element.hasProductNameElement()) { 43183 composeString("productName", element.getProductNameElement()); 43184 } 43185 if (element.hasNamePart()) { 43186 for (MedicinalProduct.MedicinalProductNameNamePartComponent e : element.getNamePart()) 43187 composeMedicinalProductMedicinalProductNameNamePartComponent("namePart", e); 43188 } 43189 if (element.hasCountryLanguage()) { 43190 for (MedicinalProduct.MedicinalProductNameCountryLanguageComponent e : element.getCountryLanguage()) 43191 composeMedicinalProductMedicinalProductNameCountryLanguageComponent("countryLanguage", e); 43192 } 43193 } 43194 43195 protected void composeMedicinalProductMedicinalProductNameNamePartComponent(String name, 43196 MedicinalProduct.MedicinalProductNameNamePartComponent element) throws IOException { 43197 if (element != null) { 43198 composeElementAttributes(element); 43199 xml.enter(FHIR_NS, name); 43200 composeMedicinalProductMedicinalProductNameNamePartComponentElements(element); 43201 composeElementClose(element); 43202 xml.exit(FHIR_NS, name); 43203 } 43204 } 43205 43206 protected void composeMedicinalProductMedicinalProductNameNamePartComponentElements( 43207 MedicinalProduct.MedicinalProductNameNamePartComponent element) throws IOException { 43208 composeBackboneElementElements(element); 43209 if (element.hasPartElement()) { 43210 composeString("part", element.getPartElement()); 43211 } 43212 if (element.hasType()) { 43213 composeCoding("type", element.getType()); 43214 } 43215 } 43216 43217 protected void composeMedicinalProductMedicinalProductNameCountryLanguageComponent(String name, 43218 MedicinalProduct.MedicinalProductNameCountryLanguageComponent element) throws IOException { 43219 if (element != null) { 43220 composeElementAttributes(element); 43221 xml.enter(FHIR_NS, name); 43222 composeMedicinalProductMedicinalProductNameCountryLanguageComponentElements(element); 43223 composeElementClose(element); 43224 xml.exit(FHIR_NS, name); 43225 } 43226 } 43227 43228 protected void composeMedicinalProductMedicinalProductNameCountryLanguageComponentElements( 43229 MedicinalProduct.MedicinalProductNameCountryLanguageComponent element) throws IOException { 43230 composeBackboneElementElements(element); 43231 if (element.hasCountry()) { 43232 composeCodeableConcept("country", element.getCountry()); 43233 } 43234 if (element.hasJurisdiction()) { 43235 composeCodeableConcept("jurisdiction", element.getJurisdiction()); 43236 } 43237 if (element.hasLanguage()) { 43238 composeCodeableConcept("language", element.getLanguage()); 43239 } 43240 } 43241 43242 protected void composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponent(String name, 43243 MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent element) throws IOException { 43244 if (element != null) { 43245 composeElementAttributes(element); 43246 xml.enter(FHIR_NS, name); 43247 composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponentElements(element); 43248 composeElementClose(element); 43249 xml.exit(FHIR_NS, name); 43250 } 43251 } 43252 43253 protected void composeMedicinalProductMedicinalProductManufacturingBusinessOperationComponentElements( 43254 MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent element) throws IOException { 43255 composeBackboneElementElements(element); 43256 if (element.hasOperationType()) { 43257 composeCodeableConcept("operationType", element.getOperationType()); 43258 } 43259 if (element.hasAuthorisationReferenceNumber()) { 43260 composeIdentifier("authorisationReferenceNumber", element.getAuthorisationReferenceNumber()); 43261 } 43262 if (element.hasEffectiveDateElement()) { 43263 composeDateTime("effectiveDate", element.getEffectiveDateElement()); 43264 } 43265 if (element.hasConfidentialityIndicator()) { 43266 composeCodeableConcept("confidentialityIndicator", element.getConfidentialityIndicator()); 43267 } 43268 if (element.hasManufacturer()) { 43269 for (Reference e : element.getManufacturer()) 43270 composeReference("manufacturer", e); 43271 } 43272 if (element.hasRegulator()) { 43273 composeReference("regulator", element.getRegulator()); 43274 } 43275 } 43276 43277 protected void composeMedicinalProductMedicinalProductSpecialDesignationComponent(String name, 43278 MedicinalProduct.MedicinalProductSpecialDesignationComponent element) throws IOException { 43279 if (element != null) { 43280 composeElementAttributes(element); 43281 xml.enter(FHIR_NS, name); 43282 composeMedicinalProductMedicinalProductSpecialDesignationComponentElements(element); 43283 composeElementClose(element); 43284 xml.exit(FHIR_NS, name); 43285 } 43286 } 43287 43288 protected void composeMedicinalProductMedicinalProductSpecialDesignationComponentElements( 43289 MedicinalProduct.MedicinalProductSpecialDesignationComponent element) throws IOException { 43290 composeBackboneElementElements(element); 43291 if (element.hasIdentifier()) { 43292 for (Identifier e : element.getIdentifier()) 43293 composeIdentifier("identifier", e); 43294 } 43295 if (element.hasType()) { 43296 composeCodeableConcept("type", element.getType()); 43297 } 43298 if (element.hasIntendedUse()) { 43299 composeCodeableConcept("intendedUse", element.getIntendedUse()); 43300 } 43301 if (element.hasIndication()) { 43302 composeType("indication", element.getIndication()); 43303 } 43304 if (element.hasStatus()) { 43305 composeCodeableConcept("status", element.getStatus()); 43306 } 43307 if (element.hasDateElement()) { 43308 composeDateTime("date", element.getDateElement()); 43309 } 43310 if (element.hasSpecies()) { 43311 composeCodeableConcept("species", element.getSpecies()); 43312 } 43313 } 43314 43315 protected void composeMedicinalProductAuthorization(String name, MedicinalProductAuthorization element) 43316 throws IOException { 43317 if (element != null) { 43318 composeDomainResourceAttributes(element); 43319 xml.enter(FHIR_NS, name); 43320 composeMedicinalProductAuthorizationElements(element); 43321 composeElementClose(element); 43322 xml.exit(FHIR_NS, name); 43323 } 43324 } 43325 43326 protected void composeMedicinalProductAuthorizationElements(MedicinalProductAuthorization element) 43327 throws IOException { 43328 composeDomainResourceElements(element); 43329 if (element.hasIdentifier()) { 43330 for (Identifier e : element.getIdentifier()) 43331 composeIdentifier("identifier", e); 43332 } 43333 if (element.hasSubject()) { 43334 composeReference("subject", element.getSubject()); 43335 } 43336 if (element.hasCountry()) { 43337 for (CodeableConcept e : element.getCountry()) 43338 composeCodeableConcept("country", e); 43339 } 43340 if (element.hasJurisdiction()) { 43341 for (CodeableConcept e : element.getJurisdiction()) 43342 composeCodeableConcept("jurisdiction", e); 43343 } 43344 if (element.hasStatus()) { 43345 composeCodeableConcept("status", element.getStatus()); 43346 } 43347 if (element.hasStatusDateElement()) { 43348 composeDateTime("statusDate", element.getStatusDateElement()); 43349 } 43350 if (element.hasRestoreDateElement()) { 43351 composeDateTime("restoreDate", element.getRestoreDateElement()); 43352 } 43353 if (element.hasValidityPeriod()) { 43354 composePeriod("validityPeriod", element.getValidityPeriod()); 43355 } 43356 if (element.hasDataExclusivityPeriod()) { 43357 composePeriod("dataExclusivityPeriod", element.getDataExclusivityPeriod()); 43358 } 43359 if (element.hasDateOfFirstAuthorizationElement()) { 43360 composeDateTime("dateOfFirstAuthorization", element.getDateOfFirstAuthorizationElement()); 43361 } 43362 if (element.hasInternationalBirthDateElement()) { 43363 composeDateTime("internationalBirthDate", element.getInternationalBirthDateElement()); 43364 } 43365 if (element.hasLegalBasis()) { 43366 composeCodeableConcept("legalBasis", element.getLegalBasis()); 43367 } 43368 if (element.hasJurisdictionalAuthorization()) { 43369 for (MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent e : element 43370 .getJurisdictionalAuthorization()) 43371 composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent( 43372 "jurisdictionalAuthorization", e); 43373 } 43374 if (element.hasHolder()) { 43375 composeReference("holder", element.getHolder()); 43376 } 43377 if (element.hasRegulator()) { 43378 composeReference("regulator", element.getRegulator()); 43379 } 43380 if (element.hasProcedure()) { 43381 composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent("procedure", 43382 element.getProcedure()); 43383 } 43384 } 43385 43386 protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponent( 43387 String name, 43388 MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent element) 43389 throws IOException { 43390 if (element != null) { 43391 composeElementAttributes(element); 43392 xml.enter(FHIR_NS, name); 43393 composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentElements( 43394 element); 43395 composeElementClose(element); 43396 xml.exit(FHIR_NS, name); 43397 } 43398 } 43399 43400 protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationJurisdictionalAuthorizationComponentElements( 43401 MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent element) 43402 throws IOException { 43403 composeBackboneElementElements(element); 43404 if (element.hasIdentifier()) { 43405 for (Identifier e : element.getIdentifier()) 43406 composeIdentifier("identifier", e); 43407 } 43408 if (element.hasCountry()) { 43409 composeCodeableConcept("country", element.getCountry()); 43410 } 43411 if (element.hasJurisdiction()) { 43412 for (CodeableConcept e : element.getJurisdiction()) 43413 composeCodeableConcept("jurisdiction", e); 43414 } 43415 if (element.hasLegalStatusOfSupply()) { 43416 composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply()); 43417 } 43418 if (element.hasValidityPeriod()) { 43419 composePeriod("validityPeriod", element.getValidityPeriod()); 43420 } 43421 } 43422 43423 protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(String name, 43424 MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent element) throws IOException { 43425 if (element != null) { 43426 composeElementAttributes(element); 43427 xml.enter(FHIR_NS, name); 43428 composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentElements(element); 43429 composeElementClose(element); 43430 xml.exit(FHIR_NS, name); 43431 } 43432 } 43433 43434 protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponentElements( 43435 MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent element) throws IOException { 43436 composeBackboneElementElements(element); 43437 if (element.hasIdentifier()) { 43438 composeIdentifier("identifier", element.getIdentifier()); 43439 } 43440 if (element.hasType()) { 43441 composeCodeableConcept("type", element.getType()); 43442 } 43443 if (element.hasDate()) { 43444 composeType("date", element.getDate()); 43445 } 43446 if (element.hasApplication()) { 43447 for (MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent e : element.getApplication()) 43448 composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent("application", e); 43449 } 43450 } 43451 43452 protected void composeMedicinalProductContraindication(String name, MedicinalProductContraindication element) 43453 throws IOException { 43454 if (element != null) { 43455 composeDomainResourceAttributes(element); 43456 xml.enter(FHIR_NS, name); 43457 composeMedicinalProductContraindicationElements(element); 43458 composeElementClose(element); 43459 xml.exit(FHIR_NS, name); 43460 } 43461 } 43462 43463 protected void composeMedicinalProductContraindicationElements(MedicinalProductContraindication element) 43464 throws IOException { 43465 composeDomainResourceElements(element); 43466 if (element.hasSubject()) { 43467 for (Reference e : element.getSubject()) 43468 composeReference("subject", e); 43469 } 43470 if (element.hasDisease()) { 43471 composeCodeableConcept("disease", element.getDisease()); 43472 } 43473 if (element.hasDiseaseStatus()) { 43474 composeCodeableConcept("diseaseStatus", element.getDiseaseStatus()); 43475 } 43476 if (element.hasComorbidity()) { 43477 for (CodeableConcept e : element.getComorbidity()) 43478 composeCodeableConcept("comorbidity", e); 43479 } 43480 if (element.hasTherapeuticIndication()) { 43481 for (Reference e : element.getTherapeuticIndication()) 43482 composeReference("therapeuticIndication", e); 43483 } 43484 if (element.hasOtherTherapy()) { 43485 for (MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent e : element 43486 .getOtherTherapy()) 43487 composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent("otherTherapy", e); 43488 } 43489 if (element.hasPopulation()) { 43490 for (Population e : element.getPopulation()) 43491 composePopulation("population", e); 43492 } 43493 } 43494 43495 protected void composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponent( 43496 String name, MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent element) 43497 throws IOException { 43498 if (element != null) { 43499 composeElementAttributes(element); 43500 xml.enter(FHIR_NS, name); 43501 composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentElements(element); 43502 composeElementClose(element); 43503 xml.exit(FHIR_NS, name); 43504 } 43505 } 43506 43507 protected void composeMedicinalProductContraindicationMedicinalProductContraindicationOtherTherapyComponentElements( 43508 MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent element) 43509 throws IOException { 43510 composeBackboneElementElements(element); 43511 if (element.hasTherapyRelationshipType()) { 43512 composeCodeableConcept("therapyRelationshipType", element.getTherapyRelationshipType()); 43513 } 43514 if (element.hasMedication()) { 43515 composeType("medication", element.getMedication()); 43516 } 43517 } 43518 43519 protected void composeMedicinalProductIndication(String name, MedicinalProductIndication element) throws IOException { 43520 if (element != null) { 43521 composeDomainResourceAttributes(element); 43522 xml.enter(FHIR_NS, name); 43523 composeMedicinalProductIndicationElements(element); 43524 composeElementClose(element); 43525 xml.exit(FHIR_NS, name); 43526 } 43527 } 43528 43529 protected void composeMedicinalProductIndicationElements(MedicinalProductIndication element) throws IOException { 43530 composeDomainResourceElements(element); 43531 if (element.hasSubject()) { 43532 for (Reference e : element.getSubject()) 43533 composeReference("subject", e); 43534 } 43535 if (element.hasDiseaseSymptomProcedure()) { 43536 composeCodeableConcept("diseaseSymptomProcedure", element.getDiseaseSymptomProcedure()); 43537 } 43538 if (element.hasDiseaseStatus()) { 43539 composeCodeableConcept("diseaseStatus", element.getDiseaseStatus()); 43540 } 43541 if (element.hasComorbidity()) { 43542 for (CodeableConcept e : element.getComorbidity()) 43543 composeCodeableConcept("comorbidity", e); 43544 } 43545 if (element.hasIntendedEffect()) { 43546 composeCodeableConcept("intendedEffect", element.getIntendedEffect()); 43547 } 43548 if (element.hasDuration()) { 43549 composeQuantity("duration", element.getDuration()); 43550 } 43551 if (element.hasOtherTherapy()) { 43552 for (MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent e : element.getOtherTherapy()) 43553 composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent("otherTherapy", e); 43554 } 43555 if (element.hasUndesirableEffect()) { 43556 for (Reference e : element.getUndesirableEffect()) 43557 composeReference("undesirableEffect", e); 43558 } 43559 if (element.hasPopulation()) { 43560 for (Population e : element.getPopulation()) 43561 composePopulation("population", e); 43562 } 43563 } 43564 43565 protected void composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponent(String name, 43566 MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent element) throws IOException { 43567 if (element != null) { 43568 composeElementAttributes(element); 43569 xml.enter(FHIR_NS, name); 43570 composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentElements(element); 43571 composeElementClose(element); 43572 xml.exit(FHIR_NS, name); 43573 } 43574 } 43575 43576 protected void composeMedicinalProductIndicationMedicinalProductIndicationOtherTherapyComponentElements( 43577 MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent element) throws IOException { 43578 composeBackboneElementElements(element); 43579 if (element.hasTherapyRelationshipType()) { 43580 composeCodeableConcept("therapyRelationshipType", element.getTherapyRelationshipType()); 43581 } 43582 if (element.hasMedication()) { 43583 composeType("medication", element.getMedication()); 43584 } 43585 } 43586 43587 protected void composeMedicinalProductIngredient(String name, MedicinalProductIngredient element) throws IOException { 43588 if (element != null) { 43589 composeDomainResourceAttributes(element); 43590 xml.enter(FHIR_NS, name); 43591 composeMedicinalProductIngredientElements(element); 43592 composeElementClose(element); 43593 xml.exit(FHIR_NS, name); 43594 } 43595 } 43596 43597 protected void composeMedicinalProductIngredientElements(MedicinalProductIngredient element) throws IOException { 43598 composeDomainResourceElements(element); 43599 if (element.hasIdentifier()) { 43600 composeIdentifier("identifier", element.getIdentifier()); 43601 } 43602 if (element.hasRole()) { 43603 composeCodeableConcept("role", element.getRole()); 43604 } 43605 if (element.hasAllergenicIndicatorElement()) { 43606 composeBoolean("allergenicIndicator", element.getAllergenicIndicatorElement()); 43607 } 43608 if (element.hasManufacturer()) { 43609 for (Reference e : element.getManufacturer()) 43610 composeReference("manufacturer", e); 43611 } 43612 if (element.hasSpecifiedSubstance()) { 43613 for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent e : element 43614 .getSpecifiedSubstance()) 43615 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent("specifiedSubstance", e); 43616 } 43617 if (element.hasSubstance()) { 43618 composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent("substance", 43619 element.getSubstance()); 43620 } 43621 } 43622 43623 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponent(String name, 43624 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent element) throws IOException { 43625 if (element != null) { 43626 composeElementAttributes(element); 43627 xml.enter(FHIR_NS, name); 43628 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentElements(element); 43629 composeElementClose(element); 43630 xml.exit(FHIR_NS, name); 43631 } 43632 } 43633 43634 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceComponentElements( 43635 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent element) throws IOException { 43636 composeBackboneElementElements(element); 43637 if (element.hasCode()) { 43638 composeCodeableConcept("code", element.getCode()); 43639 } 43640 if (element.hasGroup()) { 43641 composeCodeableConcept("group", element.getGroup()); 43642 } 43643 if (element.hasConfidentiality()) { 43644 composeCodeableConcept("confidentiality", element.getConfidentiality()); 43645 } 43646 if (element.hasStrength()) { 43647 for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent e : element 43648 .getStrength()) 43649 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent("strength", e); 43650 } 43651 } 43652 43653 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent( 43654 String name, MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent element) 43655 throws IOException { 43656 if (element != null) { 43657 composeElementAttributes(element); 43658 xml.enter(FHIR_NS, name); 43659 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentElements(element); 43660 composeElementClose(element); 43661 xml.exit(FHIR_NS, name); 43662 } 43663 } 43664 43665 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponentElements( 43666 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent element) 43667 throws IOException { 43668 composeBackboneElementElements(element); 43669 if (element.hasPresentation()) { 43670 composeRatio("presentation", element.getPresentation()); 43671 } 43672 if (element.hasPresentationLowLimit()) { 43673 composeRatio("presentationLowLimit", element.getPresentationLowLimit()); 43674 } 43675 if (element.hasConcentration()) { 43676 composeRatio("concentration", element.getConcentration()); 43677 } 43678 if (element.hasConcentrationLowLimit()) { 43679 composeRatio("concentrationLowLimit", element.getConcentrationLowLimit()); 43680 } 43681 if (element.hasMeasurementPointElement()) { 43682 composeString("measurementPoint", element.getMeasurementPointElement()); 43683 } 43684 if (element.hasCountry()) { 43685 for (CodeableConcept e : element.getCountry()) 43686 composeCodeableConcept("country", e); 43687 } 43688 if (element.hasReferenceStrength()) { 43689 for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent e : element 43690 .getReferenceStrength()) 43691 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent( 43692 "referenceStrength", e); 43693 } 43694 } 43695 43696 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent( 43697 String name, 43698 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent element) 43699 throws IOException { 43700 if (element != null) { 43701 composeElementAttributes(element); 43702 xml.enter(FHIR_NS, name); 43703 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentElements( 43704 element); 43705 composeElementClose(element); 43706 xml.exit(FHIR_NS, name); 43707 } 43708 } 43709 43710 protected void composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponentElements( 43711 MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent element) 43712 throws IOException { 43713 composeBackboneElementElements(element); 43714 if (element.hasSubstance()) { 43715 composeCodeableConcept("substance", element.getSubstance()); 43716 } 43717 if (element.hasStrength()) { 43718 composeRatio("strength", element.getStrength()); 43719 } 43720 if (element.hasStrengthLowLimit()) { 43721 composeRatio("strengthLowLimit", element.getStrengthLowLimit()); 43722 } 43723 if (element.hasMeasurementPointElement()) { 43724 composeString("measurementPoint", element.getMeasurementPointElement()); 43725 } 43726 if (element.hasCountry()) { 43727 for (CodeableConcept e : element.getCountry()) 43728 composeCodeableConcept("country", e); 43729 } 43730 } 43731 43732 protected void composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponent(String name, 43733 MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent element) throws IOException { 43734 if (element != null) { 43735 composeElementAttributes(element); 43736 xml.enter(FHIR_NS, name); 43737 composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentElements(element); 43738 composeElementClose(element); 43739 xml.exit(FHIR_NS, name); 43740 } 43741 } 43742 43743 protected void composeMedicinalProductIngredientMedicinalProductIngredientSubstanceComponentElements( 43744 MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent element) throws IOException { 43745 composeBackboneElementElements(element); 43746 if (element.hasCode()) { 43747 composeCodeableConcept("code", element.getCode()); 43748 } 43749 if (element.hasStrength()) { 43750 for (MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent e : element 43751 .getStrength()) 43752 composeMedicinalProductIngredientMedicinalProductIngredientSpecifiedSubstanceStrengthComponent("strength", e); 43753 } 43754 } 43755 43756 protected void composeMedicinalProductInteraction(String name, MedicinalProductInteraction element) 43757 throws IOException { 43758 if (element != null) { 43759 composeDomainResourceAttributes(element); 43760 xml.enter(FHIR_NS, name); 43761 composeMedicinalProductInteractionElements(element); 43762 composeElementClose(element); 43763 xml.exit(FHIR_NS, name); 43764 } 43765 } 43766 43767 protected void composeMedicinalProductInteractionElements(MedicinalProductInteraction element) throws IOException { 43768 composeDomainResourceElements(element); 43769 if (element.hasSubject()) { 43770 for (Reference e : element.getSubject()) 43771 composeReference("subject", e); 43772 } 43773 if (element.hasDescriptionElement()) { 43774 composeString("description", element.getDescriptionElement()); 43775 } 43776 if (element.hasInteractant()) { 43777 for (MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent e : element.getInteractant()) 43778 composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponent("interactant", e); 43779 } 43780 if (element.hasType()) { 43781 composeCodeableConcept("type", element.getType()); 43782 } 43783 if (element.hasEffect()) { 43784 composeCodeableConcept("effect", element.getEffect()); 43785 } 43786 if (element.hasIncidence()) { 43787 composeCodeableConcept("incidence", element.getIncidence()); 43788 } 43789 if (element.hasManagement()) { 43790 composeCodeableConcept("management", element.getManagement()); 43791 } 43792 } 43793 43794 protected void composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponent(String name, 43795 MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent element) throws IOException { 43796 if (element != null) { 43797 composeElementAttributes(element); 43798 xml.enter(FHIR_NS, name); 43799 composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponentElements(element); 43800 composeElementClose(element); 43801 xml.exit(FHIR_NS, name); 43802 } 43803 } 43804 43805 protected void composeMedicinalProductInteractionMedicinalProductInteractionInteractantComponentElements( 43806 MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent element) throws IOException { 43807 composeBackboneElementElements(element); 43808 if (element.hasItem()) { 43809 composeType("item", element.getItem()); 43810 } 43811 } 43812 43813 protected void composeMedicinalProductManufactured(String name, MedicinalProductManufactured element) 43814 throws IOException { 43815 if (element != null) { 43816 composeDomainResourceAttributes(element); 43817 xml.enter(FHIR_NS, name); 43818 composeMedicinalProductManufacturedElements(element); 43819 composeElementClose(element); 43820 xml.exit(FHIR_NS, name); 43821 } 43822 } 43823 43824 protected void composeMedicinalProductManufacturedElements(MedicinalProductManufactured element) throws IOException { 43825 composeDomainResourceElements(element); 43826 if (element.hasManufacturedDoseForm()) { 43827 composeCodeableConcept("manufacturedDoseForm", element.getManufacturedDoseForm()); 43828 } 43829 if (element.hasUnitOfPresentation()) { 43830 composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation()); 43831 } 43832 if (element.hasQuantity()) { 43833 composeQuantity("quantity", element.getQuantity()); 43834 } 43835 if (element.hasManufacturer()) { 43836 for (Reference e : element.getManufacturer()) 43837 composeReference("manufacturer", e); 43838 } 43839 if (element.hasIngredient()) { 43840 for (Reference e : element.getIngredient()) 43841 composeReference("ingredient", e); 43842 } 43843 if (element.hasPhysicalCharacteristics()) { 43844 composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics()); 43845 } 43846 if (element.hasOtherCharacteristics()) { 43847 for (CodeableConcept e : element.getOtherCharacteristics()) 43848 composeCodeableConcept("otherCharacteristics", e); 43849 } 43850 } 43851 43852 protected void composeMedicinalProductPackaged(String name, MedicinalProductPackaged element) throws IOException { 43853 if (element != null) { 43854 composeDomainResourceAttributes(element); 43855 xml.enter(FHIR_NS, name); 43856 composeMedicinalProductPackagedElements(element); 43857 composeElementClose(element); 43858 xml.exit(FHIR_NS, name); 43859 } 43860 } 43861 43862 protected void composeMedicinalProductPackagedElements(MedicinalProductPackaged element) throws IOException { 43863 composeDomainResourceElements(element); 43864 if (element.hasIdentifier()) { 43865 for (Identifier e : element.getIdentifier()) 43866 composeIdentifier("identifier", e); 43867 } 43868 if (element.hasSubject()) { 43869 for (Reference e : element.getSubject()) 43870 composeReference("subject", e); 43871 } 43872 if (element.hasDescriptionElement()) { 43873 composeString("description", element.getDescriptionElement()); 43874 } 43875 if (element.hasLegalStatusOfSupply()) { 43876 composeCodeableConcept("legalStatusOfSupply", element.getLegalStatusOfSupply()); 43877 } 43878 if (element.hasMarketingStatus()) { 43879 for (MarketingStatus e : element.getMarketingStatus()) 43880 composeMarketingStatus("marketingStatus", e); 43881 } 43882 if (element.hasMarketingAuthorization()) { 43883 composeReference("marketingAuthorization", element.getMarketingAuthorization()); 43884 } 43885 if (element.hasManufacturer()) { 43886 for (Reference e : element.getManufacturer()) 43887 composeReference("manufacturer", e); 43888 } 43889 if (element.hasBatchIdentifier()) { 43890 for (MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent e : element.getBatchIdentifier()) 43891 composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent("batchIdentifier", e); 43892 } 43893 if (element.hasPackageItem()) { 43894 for (MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent e : element.getPackageItem()) 43895 composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent("packageItem", e); 43896 } 43897 } 43898 43899 protected void composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponent(String name, 43900 MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent element) throws IOException { 43901 if (element != null) { 43902 composeElementAttributes(element); 43903 xml.enter(FHIR_NS, name); 43904 composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentElements(element); 43905 composeElementClose(element); 43906 xml.exit(FHIR_NS, name); 43907 } 43908 } 43909 43910 protected void composeMedicinalProductPackagedMedicinalProductPackagedBatchIdentifierComponentElements( 43911 MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent element) throws IOException { 43912 composeBackboneElementElements(element); 43913 if (element.hasOuterPackaging()) { 43914 composeIdentifier("outerPackaging", element.getOuterPackaging()); 43915 } 43916 if (element.hasImmediatePackaging()) { 43917 composeIdentifier("immediatePackaging", element.getImmediatePackaging()); 43918 } 43919 } 43920 43921 protected void composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(String name, 43922 MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent element) throws IOException { 43923 if (element != null) { 43924 composeElementAttributes(element); 43925 xml.enter(FHIR_NS, name); 43926 composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentElements(element); 43927 composeElementClose(element); 43928 xml.exit(FHIR_NS, name); 43929 } 43930 } 43931 43932 protected void composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponentElements( 43933 MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent element) throws IOException { 43934 composeBackboneElementElements(element); 43935 if (element.hasIdentifier()) { 43936 for (Identifier e : element.getIdentifier()) 43937 composeIdentifier("identifier", e); 43938 } 43939 if (element.hasType()) { 43940 composeCodeableConcept("type", element.getType()); 43941 } 43942 if (element.hasQuantity()) { 43943 composeQuantity("quantity", element.getQuantity()); 43944 } 43945 if (element.hasMaterial()) { 43946 for (CodeableConcept e : element.getMaterial()) 43947 composeCodeableConcept("material", e); 43948 } 43949 if (element.hasAlternateMaterial()) { 43950 for (CodeableConcept e : element.getAlternateMaterial()) 43951 composeCodeableConcept("alternateMaterial", e); 43952 } 43953 if (element.hasDevice()) { 43954 for (Reference e : element.getDevice()) 43955 composeReference("device", e); 43956 } 43957 if (element.hasManufacturedItem()) { 43958 for (Reference e : element.getManufacturedItem()) 43959 composeReference("manufacturedItem", e); 43960 } 43961 if (element.hasPackageItem()) { 43962 for (MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent e : element.getPackageItem()) 43963 composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent("packageItem", e); 43964 } 43965 if (element.hasPhysicalCharacteristics()) { 43966 composeProdCharacteristic("physicalCharacteristics", element.getPhysicalCharacteristics()); 43967 } 43968 if (element.hasOtherCharacteristics()) { 43969 for (CodeableConcept e : element.getOtherCharacteristics()) 43970 composeCodeableConcept("otherCharacteristics", e); 43971 } 43972 if (element.hasShelfLifeStorage()) { 43973 for (ProductShelfLife e : element.getShelfLifeStorage()) 43974 composeProductShelfLife("shelfLifeStorage", e); 43975 } 43976 if (element.hasManufacturer()) { 43977 for (Reference e : element.getManufacturer()) 43978 composeReference("manufacturer", e); 43979 } 43980 } 43981 43982 protected void composeMedicinalProductPharmaceutical(String name, MedicinalProductPharmaceutical element) 43983 throws IOException { 43984 if (element != null) { 43985 composeDomainResourceAttributes(element); 43986 xml.enter(FHIR_NS, name); 43987 composeMedicinalProductPharmaceuticalElements(element); 43988 composeElementClose(element); 43989 xml.exit(FHIR_NS, name); 43990 } 43991 } 43992 43993 protected void composeMedicinalProductPharmaceuticalElements(MedicinalProductPharmaceutical element) 43994 throws IOException { 43995 composeDomainResourceElements(element); 43996 if (element.hasIdentifier()) { 43997 for (Identifier e : element.getIdentifier()) 43998 composeIdentifier("identifier", e); 43999 } 44000 if (element.hasAdministrableDoseForm()) { 44001 composeCodeableConcept("administrableDoseForm", element.getAdministrableDoseForm()); 44002 } 44003 if (element.hasUnitOfPresentation()) { 44004 composeCodeableConcept("unitOfPresentation", element.getUnitOfPresentation()); 44005 } 44006 if (element.hasIngredient()) { 44007 for (Reference e : element.getIngredient()) 44008 composeReference("ingredient", e); 44009 } 44010 if (element.hasDevice()) { 44011 for (Reference e : element.getDevice()) 44012 composeReference("device", e); 44013 } 44014 if (element.hasCharacteristics()) { 44015 for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent e : element 44016 .getCharacteristics()) 44017 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent("characteristics", 44018 e); 44019 } 44020 if (element.hasRouteOfAdministration()) { 44021 for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent e : element 44022 .getRouteOfAdministration()) 44023 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent( 44024 "routeOfAdministration", e); 44025 } 44026 } 44027 44028 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponent( 44029 String name, MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent element) 44030 throws IOException { 44031 if (element != null) { 44032 composeElementAttributes(element); 44033 xml.enter(FHIR_NS, name); 44034 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentElements(element); 44035 composeElementClose(element); 44036 xml.exit(FHIR_NS, name); 44037 } 44038 } 44039 44040 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalCharacteristicsComponentElements( 44041 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent element) 44042 throws IOException { 44043 composeBackboneElementElements(element); 44044 if (element.hasCode()) { 44045 composeCodeableConcept("code", element.getCode()); 44046 } 44047 if (element.hasStatus()) { 44048 composeCodeableConcept("status", element.getStatus()); 44049 } 44050 } 44051 44052 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponent( 44053 String name, MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent element) 44054 throws IOException { 44055 if (element != null) { 44056 composeElementAttributes(element); 44057 xml.enter(FHIR_NS, name); 44058 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentElements( 44059 element); 44060 composeElementClose(element); 44061 xml.exit(FHIR_NS, name); 44062 } 44063 } 44064 44065 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationComponentElements( 44066 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent element) 44067 throws IOException { 44068 composeBackboneElementElements(element); 44069 if (element.hasCode()) { 44070 composeCodeableConcept("code", element.getCode()); 44071 } 44072 if (element.hasFirstDose()) { 44073 composeQuantity("firstDose", element.getFirstDose()); 44074 } 44075 if (element.hasMaxSingleDose()) { 44076 composeQuantity("maxSingleDose", element.getMaxSingleDose()); 44077 } 44078 if (element.hasMaxDosePerDay()) { 44079 composeQuantity("maxDosePerDay", element.getMaxDosePerDay()); 44080 } 44081 if (element.hasMaxDosePerTreatmentPeriod()) { 44082 composeRatio("maxDosePerTreatmentPeriod", element.getMaxDosePerTreatmentPeriod()); 44083 } 44084 if (element.hasMaxTreatmentPeriod()) { 44085 composeDuration("maxTreatmentPeriod", element.getMaxTreatmentPeriod()); 44086 } 44087 if (element.hasTargetSpecies()) { 44088 for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent e : element 44089 .getTargetSpecies()) 44090 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent( 44091 "targetSpecies", e); 44092 } 44093 } 44094 44095 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent( 44096 String name, 44097 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent element) 44098 throws IOException { 44099 if (element != null) { 44100 composeElementAttributes(element); 44101 xml.enter(FHIR_NS, name); 44102 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentElements( 44103 element); 44104 composeElementClose(element); 44105 xml.exit(FHIR_NS, name); 44106 } 44107 } 44108 44109 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponentElements( 44110 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent element) 44111 throws IOException { 44112 composeBackboneElementElements(element); 44113 if (element.hasCode()) { 44114 composeCodeableConcept("code", element.getCode()); 44115 } 44116 if (element.hasWithdrawalPeriod()) { 44117 for (MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent e : element 44118 .getWithdrawalPeriod()) 44119 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent( 44120 "withdrawalPeriod", e); 44121 } 44122 } 44123 44124 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent( 44125 String name, 44126 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element) 44127 throws IOException { 44128 if (element != null) { 44129 composeElementAttributes(element); 44130 xml.enter(FHIR_NS, name); 44131 composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentElements( 44132 element); 44133 composeElementClose(element); 44134 xml.exit(FHIR_NS, name); 44135 } 44136 } 44137 44138 protected void composeMedicinalProductPharmaceuticalMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponentElements( 44139 MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent element) 44140 throws IOException { 44141 composeBackboneElementElements(element); 44142 if (element.hasTissue()) { 44143 composeCodeableConcept("tissue", element.getTissue()); 44144 } 44145 if (element.hasValue()) { 44146 composeQuantity("value", element.getValue()); 44147 } 44148 if (element.hasSupportingInformationElement()) { 44149 composeString("supportingInformation", element.getSupportingInformationElement()); 44150 } 44151 } 44152 44153 protected void composeMedicinalProductUndesirableEffect(String name, MedicinalProductUndesirableEffect element) 44154 throws IOException { 44155 if (element != null) { 44156 composeDomainResourceAttributes(element); 44157 xml.enter(FHIR_NS, name); 44158 composeMedicinalProductUndesirableEffectElements(element); 44159 composeElementClose(element); 44160 xml.exit(FHIR_NS, name); 44161 } 44162 } 44163 44164 protected void composeMedicinalProductUndesirableEffectElements(MedicinalProductUndesirableEffect element) 44165 throws IOException { 44166 composeDomainResourceElements(element); 44167 if (element.hasSubject()) { 44168 for (Reference e : element.getSubject()) 44169 composeReference("subject", e); 44170 } 44171 if (element.hasSymptomConditionEffect()) { 44172 composeCodeableConcept("symptomConditionEffect", element.getSymptomConditionEffect()); 44173 } 44174 if (element.hasClassification()) { 44175 composeCodeableConcept("classification", element.getClassification()); 44176 } 44177 if (element.hasFrequencyOfOccurrence()) { 44178 composeCodeableConcept("frequencyOfOccurrence", element.getFrequencyOfOccurrence()); 44179 } 44180 if (element.hasPopulation()) { 44181 for (Population e : element.getPopulation()) 44182 composePopulation("population", e); 44183 } 44184 } 44185 44186 protected void composeMessageDefinition(String name, MessageDefinition element) throws IOException { 44187 if (element != null) { 44188 composeDomainResourceAttributes(element); 44189 xml.enter(FHIR_NS, name); 44190 composeMessageDefinitionElements(element); 44191 composeElementClose(element); 44192 xml.exit(FHIR_NS, name); 44193 } 44194 } 44195 44196 protected void composeMessageDefinitionElements(MessageDefinition element) throws IOException { 44197 composeDomainResourceElements(element); 44198 if (element.hasUrlElement()) { 44199 composeUri("url", element.getUrlElement()); 44200 } 44201 if (element.hasIdentifier()) { 44202 for (Identifier e : element.getIdentifier()) 44203 composeIdentifier("identifier", e); 44204 } 44205 if (element.hasVersionElement()) { 44206 composeString("version", element.getVersionElement()); 44207 } 44208 if (element.hasNameElement()) { 44209 composeString("name", element.getNameElement()); 44210 } 44211 if (element.hasTitleElement()) { 44212 composeString("title", element.getTitleElement()); 44213 } 44214 if (element.hasReplaces()) { 44215 for (CanonicalType e : element.getReplaces()) 44216 composeCanonical("replaces", e); 44217 } 44218 if (element.hasStatusElement()) 44219 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 44220 if (element.hasExperimentalElement()) { 44221 composeBoolean("experimental", element.getExperimentalElement()); 44222 } 44223 if (element.hasDateElement()) { 44224 composeDateTime("date", element.getDateElement()); 44225 } 44226 if (element.hasPublisherElement()) { 44227 composeString("publisher", element.getPublisherElement()); 44228 } 44229 if (element.hasContact()) { 44230 for (ContactDetail e : element.getContact()) 44231 composeContactDetail("contact", e); 44232 } 44233 if (element.hasDescriptionElement()) { 44234 composeMarkdown("description", element.getDescriptionElement()); 44235 } 44236 if (element.hasUseContext()) { 44237 for (UsageContext e : element.getUseContext()) 44238 composeUsageContext("useContext", e); 44239 } 44240 if (element.hasJurisdiction()) { 44241 for (CodeableConcept e : element.getJurisdiction()) 44242 composeCodeableConcept("jurisdiction", e); 44243 } 44244 if (element.hasPurposeElement()) { 44245 composeMarkdown("purpose", element.getPurposeElement()); 44246 } 44247 if (element.hasCopyrightElement()) { 44248 composeMarkdown("copyright", element.getCopyrightElement()); 44249 } 44250 if (element.hasBaseElement()) { 44251 composeCanonical("base", element.getBaseElement()); 44252 } 44253 if (element.hasParent()) { 44254 for (CanonicalType e : element.getParent()) 44255 composeCanonical("parent", e); 44256 } 44257 if (element.hasEvent()) { 44258 composeType("event", element.getEvent()); 44259 } 44260 if (element.hasCategoryElement()) 44261 composeEnumeration("category", element.getCategoryElement(), 44262 new MessageDefinition.MessageSignificanceCategoryEnumFactory()); 44263 if (element.hasFocus()) { 44264 for (MessageDefinition.MessageDefinitionFocusComponent e : element.getFocus()) 44265 composeMessageDefinitionMessageDefinitionFocusComponent("focus", e); 44266 } 44267 if (element.hasResponseRequiredElement()) 44268 composeEnumeration("responseRequired", element.getResponseRequiredElement(), 44269 new MessageDefinition.MessageheaderResponseRequestEnumFactory()); 44270 if (element.hasAllowedResponse()) { 44271 for (MessageDefinition.MessageDefinitionAllowedResponseComponent e : element.getAllowedResponse()) 44272 composeMessageDefinitionMessageDefinitionAllowedResponseComponent("allowedResponse", e); 44273 } 44274 if (element.hasGraph()) { 44275 for (CanonicalType e : element.getGraph()) 44276 composeCanonical("graph", e); 44277 } 44278 } 44279 44280 protected void composeMessageDefinitionMessageDefinitionFocusComponent(String name, 44281 MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { 44282 if (element != null) { 44283 composeElementAttributes(element); 44284 xml.enter(FHIR_NS, name); 44285 composeMessageDefinitionMessageDefinitionFocusComponentElements(element); 44286 composeElementClose(element); 44287 xml.exit(FHIR_NS, name); 44288 } 44289 } 44290 44291 protected void composeMessageDefinitionMessageDefinitionFocusComponentElements( 44292 MessageDefinition.MessageDefinitionFocusComponent element) throws IOException { 44293 composeBackboneElementElements(element); 44294 if (element.hasCodeElement()) { 44295 composeCode("code", element.getCodeElement()); 44296 } 44297 if (element.hasProfileElement()) { 44298 composeCanonical("profile", element.getProfileElement()); 44299 } 44300 if (element.hasMinElement()) { 44301 composeUnsignedInt("min", element.getMinElement()); 44302 } 44303 if (element.hasMaxElement()) { 44304 composeString("max", element.getMaxElement()); 44305 } 44306 } 44307 44308 protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponent(String name, 44309 MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { 44310 if (element != null) { 44311 composeElementAttributes(element); 44312 xml.enter(FHIR_NS, name); 44313 composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements(element); 44314 composeElementClose(element); 44315 xml.exit(FHIR_NS, name); 44316 } 44317 } 44318 44319 protected void composeMessageDefinitionMessageDefinitionAllowedResponseComponentElements( 44320 MessageDefinition.MessageDefinitionAllowedResponseComponent element) throws IOException { 44321 composeBackboneElementElements(element); 44322 if (element.hasMessageElement()) { 44323 composeCanonical("message", element.getMessageElement()); 44324 } 44325 if (element.hasSituationElement()) { 44326 composeMarkdown("situation", element.getSituationElement()); 44327 } 44328 } 44329 44330 protected void composeMessageHeader(String name, MessageHeader element) throws IOException { 44331 if (element != null) { 44332 composeDomainResourceAttributes(element); 44333 xml.enter(FHIR_NS, name); 44334 composeMessageHeaderElements(element); 44335 composeElementClose(element); 44336 xml.exit(FHIR_NS, name); 44337 } 44338 } 44339 44340 protected void composeMessageHeaderElements(MessageHeader element) throws IOException { 44341 composeDomainResourceElements(element); 44342 if (element.hasEvent()) { 44343 composeType("event", element.getEvent()); 44344 } 44345 if (element.hasDestination()) { 44346 for (MessageHeader.MessageDestinationComponent e : element.getDestination()) 44347 composeMessageHeaderMessageDestinationComponent("destination", e); 44348 } 44349 if (element.hasSender()) { 44350 composeReference("sender", element.getSender()); 44351 } 44352 if (element.hasEnterer()) { 44353 composeReference("enterer", element.getEnterer()); 44354 } 44355 if (element.hasAuthor()) { 44356 composeReference("author", element.getAuthor()); 44357 } 44358 if (element.hasSource()) { 44359 composeMessageHeaderMessageSourceComponent("source", element.getSource()); 44360 } 44361 if (element.hasResponsible()) { 44362 composeReference("responsible", element.getResponsible()); 44363 } 44364 if (element.hasReason()) { 44365 composeCodeableConcept("reason", element.getReason()); 44366 } 44367 if (element.hasResponse()) { 44368 composeMessageHeaderMessageHeaderResponseComponent("response", element.getResponse()); 44369 } 44370 if (element.hasFocus()) { 44371 for (Reference e : element.getFocus()) 44372 composeReference("focus", e); 44373 } 44374 if (element.hasDefinitionElement()) { 44375 composeCanonical("definition", element.getDefinitionElement()); 44376 } 44377 } 44378 44379 protected void composeMessageHeaderMessageDestinationComponent(String name, 44380 MessageHeader.MessageDestinationComponent element) throws IOException { 44381 if (element != null) { 44382 composeElementAttributes(element); 44383 xml.enter(FHIR_NS, name); 44384 composeMessageHeaderMessageDestinationComponentElements(element); 44385 composeElementClose(element); 44386 xml.exit(FHIR_NS, name); 44387 } 44388 } 44389 44390 protected void composeMessageHeaderMessageDestinationComponentElements( 44391 MessageHeader.MessageDestinationComponent element) throws IOException { 44392 composeBackboneElementElements(element); 44393 if (element.hasNameElement()) { 44394 composeString("name", element.getNameElement()); 44395 } 44396 if (element.hasTarget()) { 44397 composeReference("target", element.getTarget()); 44398 } 44399 if (element.hasEndpointElement()) { 44400 composeUrl("endpoint", element.getEndpointElement()); 44401 } 44402 if (element.hasReceiver()) { 44403 composeReference("receiver", element.getReceiver()); 44404 } 44405 } 44406 44407 protected void composeMessageHeaderMessageSourceComponent(String name, MessageHeader.MessageSourceComponent element) 44408 throws IOException { 44409 if (element != null) { 44410 composeElementAttributes(element); 44411 xml.enter(FHIR_NS, name); 44412 composeMessageHeaderMessageSourceComponentElements(element); 44413 composeElementClose(element); 44414 xml.exit(FHIR_NS, name); 44415 } 44416 } 44417 44418 protected void composeMessageHeaderMessageSourceComponentElements(MessageHeader.MessageSourceComponent element) 44419 throws IOException { 44420 composeBackboneElementElements(element); 44421 if (element.hasNameElement()) { 44422 composeString("name", element.getNameElement()); 44423 } 44424 if (element.hasSoftwareElement()) { 44425 composeString("software", element.getSoftwareElement()); 44426 } 44427 if (element.hasVersionElement()) { 44428 composeString("version", element.getVersionElement()); 44429 } 44430 if (element.hasContact()) { 44431 composeContactPoint("contact", element.getContact()); 44432 } 44433 if (element.hasEndpointElement()) { 44434 composeUrl("endpoint", element.getEndpointElement()); 44435 } 44436 } 44437 44438 protected void composeMessageHeaderMessageHeaderResponseComponent(String name, 44439 MessageHeader.MessageHeaderResponseComponent element) throws IOException { 44440 if (element != null) { 44441 composeElementAttributes(element); 44442 xml.enter(FHIR_NS, name); 44443 composeMessageHeaderMessageHeaderResponseComponentElements(element); 44444 composeElementClose(element); 44445 xml.exit(FHIR_NS, name); 44446 } 44447 } 44448 44449 protected void composeMessageHeaderMessageHeaderResponseComponentElements( 44450 MessageHeader.MessageHeaderResponseComponent element) throws IOException { 44451 composeBackboneElementElements(element); 44452 if (element.hasIdentifierElement()) { 44453 composeId("identifier", element.getIdentifierElement()); 44454 } 44455 if (element.hasCodeElement()) 44456 composeEnumeration("code", element.getCodeElement(), new MessageHeader.ResponseTypeEnumFactory()); 44457 if (element.hasDetails()) { 44458 composeReference("details", element.getDetails()); 44459 } 44460 } 44461 44462 protected void composeMolecularSequence(String name, MolecularSequence element) throws IOException { 44463 if (element != null) { 44464 composeDomainResourceAttributes(element); 44465 xml.enter(FHIR_NS, name); 44466 composeMolecularSequenceElements(element); 44467 composeElementClose(element); 44468 xml.exit(FHIR_NS, name); 44469 } 44470 } 44471 44472 protected void composeMolecularSequenceElements(MolecularSequence element) throws IOException { 44473 composeDomainResourceElements(element); 44474 if (element.hasIdentifier()) { 44475 for (Identifier e : element.getIdentifier()) 44476 composeIdentifier("identifier", e); 44477 } 44478 if (element.hasTypeElement()) 44479 composeEnumeration("type", element.getTypeElement(), new MolecularSequence.SequenceTypeEnumFactory()); 44480 if (element.hasCoordinateSystemElement()) { 44481 composeInteger("coordinateSystem", element.getCoordinateSystemElement()); 44482 } 44483 if (element.hasPatient()) { 44484 composeReference("patient", element.getPatient()); 44485 } 44486 if (element.hasSpecimen()) { 44487 composeReference("specimen", element.getSpecimen()); 44488 } 44489 if (element.hasDevice()) { 44490 composeReference("device", element.getDevice()); 44491 } 44492 if (element.hasPerformer()) { 44493 composeReference("performer", element.getPerformer()); 44494 } 44495 if (element.hasQuantity()) { 44496 composeQuantity("quantity", element.getQuantity()); 44497 } 44498 if (element.hasReferenceSeq()) { 44499 composeMolecularSequenceMolecularSequenceReferenceSeqComponent("referenceSeq", element.getReferenceSeq()); 44500 } 44501 if (element.hasVariant()) { 44502 for (MolecularSequence.MolecularSequenceVariantComponent e : element.getVariant()) 44503 composeMolecularSequenceMolecularSequenceVariantComponent("variant", e); 44504 } 44505 if (element.hasObservedSeqElement()) { 44506 composeString("observedSeq", element.getObservedSeqElement()); 44507 } 44508 if (element.hasQuality()) { 44509 for (MolecularSequence.MolecularSequenceQualityComponent e : element.getQuality()) 44510 composeMolecularSequenceMolecularSequenceQualityComponent("quality", e); 44511 } 44512 if (element.hasReadCoverageElement()) { 44513 composeInteger("readCoverage", element.getReadCoverageElement()); 44514 } 44515 if (element.hasRepository()) { 44516 for (MolecularSequence.MolecularSequenceRepositoryComponent e : element.getRepository()) 44517 composeMolecularSequenceMolecularSequenceRepositoryComponent("repository", e); 44518 } 44519 if (element.hasPointer()) { 44520 for (Reference e : element.getPointer()) 44521 composeReference("pointer", e); 44522 } 44523 if (element.hasStructureVariant()) { 44524 for (MolecularSequence.MolecularSequenceStructureVariantComponent e : element.getStructureVariant()) 44525 composeMolecularSequenceMolecularSequenceStructureVariantComponent("structureVariant", e); 44526 } 44527 } 44528 44529 protected void composeMolecularSequenceMolecularSequenceReferenceSeqComponent(String name, 44530 MolecularSequence.MolecularSequenceReferenceSeqComponent element) throws IOException { 44531 if (element != null) { 44532 composeElementAttributes(element); 44533 xml.enter(FHIR_NS, name); 44534 composeMolecularSequenceMolecularSequenceReferenceSeqComponentElements(element); 44535 composeElementClose(element); 44536 xml.exit(FHIR_NS, name); 44537 } 44538 } 44539 44540 protected void composeMolecularSequenceMolecularSequenceReferenceSeqComponentElements( 44541 MolecularSequence.MolecularSequenceReferenceSeqComponent element) throws IOException { 44542 composeBackboneElementElements(element); 44543 if (element.hasChromosome()) { 44544 composeCodeableConcept("chromosome", element.getChromosome()); 44545 } 44546 if (element.hasGenomeBuildElement()) { 44547 composeString("genomeBuild", element.getGenomeBuildElement()); 44548 } 44549 if (element.hasOrientationElement()) 44550 composeEnumeration("orientation", element.getOrientationElement(), 44551 new MolecularSequence.OrientationTypeEnumFactory()); 44552 if (element.hasReferenceSeqId()) { 44553 composeCodeableConcept("referenceSeqId", element.getReferenceSeqId()); 44554 } 44555 if (element.hasReferenceSeqPointer()) { 44556 composeReference("referenceSeqPointer", element.getReferenceSeqPointer()); 44557 } 44558 if (element.hasReferenceSeqStringElement()) { 44559 composeString("referenceSeqString", element.getReferenceSeqStringElement()); 44560 } 44561 if (element.hasStrandElement()) 44562 composeEnumeration("strand", element.getStrandElement(), new MolecularSequence.StrandTypeEnumFactory()); 44563 if (element.hasWindowStartElement()) { 44564 composeInteger("windowStart", element.getWindowStartElement()); 44565 } 44566 if (element.hasWindowEndElement()) { 44567 composeInteger("windowEnd", element.getWindowEndElement()); 44568 } 44569 } 44570 44571 protected void composeMolecularSequenceMolecularSequenceVariantComponent(String name, 44572 MolecularSequence.MolecularSequenceVariantComponent element) throws IOException { 44573 if (element != null) { 44574 composeElementAttributes(element); 44575 xml.enter(FHIR_NS, name); 44576 composeMolecularSequenceMolecularSequenceVariantComponentElements(element); 44577 composeElementClose(element); 44578 xml.exit(FHIR_NS, name); 44579 } 44580 } 44581 44582 protected void composeMolecularSequenceMolecularSequenceVariantComponentElements( 44583 MolecularSequence.MolecularSequenceVariantComponent element) throws IOException { 44584 composeBackboneElementElements(element); 44585 if (element.hasStartElement()) { 44586 composeInteger("start", element.getStartElement()); 44587 } 44588 if (element.hasEndElement()) { 44589 composeInteger("end", element.getEndElement()); 44590 } 44591 if (element.hasObservedAlleleElement()) { 44592 composeString("observedAllele", element.getObservedAlleleElement()); 44593 } 44594 if (element.hasReferenceAlleleElement()) { 44595 composeString("referenceAllele", element.getReferenceAlleleElement()); 44596 } 44597 if (element.hasCigarElement()) { 44598 composeString("cigar", element.getCigarElement()); 44599 } 44600 if (element.hasVariantPointer()) { 44601 composeReference("variantPointer", element.getVariantPointer()); 44602 } 44603 } 44604 44605 protected void composeMolecularSequenceMolecularSequenceQualityComponent(String name, 44606 MolecularSequence.MolecularSequenceQualityComponent element) throws IOException { 44607 if (element != null) { 44608 composeElementAttributes(element); 44609 xml.enter(FHIR_NS, name); 44610 composeMolecularSequenceMolecularSequenceQualityComponentElements(element); 44611 composeElementClose(element); 44612 xml.exit(FHIR_NS, name); 44613 } 44614 } 44615 44616 protected void composeMolecularSequenceMolecularSequenceQualityComponentElements( 44617 MolecularSequence.MolecularSequenceQualityComponent element) throws IOException { 44618 composeBackboneElementElements(element); 44619 if (element.hasTypeElement()) 44620 composeEnumeration("type", element.getTypeElement(), new MolecularSequence.QualityTypeEnumFactory()); 44621 if (element.hasStandardSequence()) { 44622 composeCodeableConcept("standardSequence", element.getStandardSequence()); 44623 } 44624 if (element.hasStartElement()) { 44625 composeInteger("start", element.getStartElement()); 44626 } 44627 if (element.hasEndElement()) { 44628 composeInteger("end", element.getEndElement()); 44629 } 44630 if (element.hasScore()) { 44631 composeQuantity("score", element.getScore()); 44632 } 44633 if (element.hasMethod()) { 44634 composeCodeableConcept("method", element.getMethod()); 44635 } 44636 if (element.hasTruthTPElement()) { 44637 composeDecimal("truthTP", element.getTruthTPElement()); 44638 } 44639 if (element.hasQueryTPElement()) { 44640 composeDecimal("queryTP", element.getQueryTPElement()); 44641 } 44642 if (element.hasTruthFNElement()) { 44643 composeDecimal("truthFN", element.getTruthFNElement()); 44644 } 44645 if (element.hasQueryFPElement()) { 44646 composeDecimal("queryFP", element.getQueryFPElement()); 44647 } 44648 if (element.hasGtFPElement()) { 44649 composeDecimal("gtFP", element.getGtFPElement()); 44650 } 44651 if (element.hasPrecisionElement()) { 44652 composeDecimal("precision", element.getPrecisionElement()); 44653 } 44654 if (element.hasRecallElement()) { 44655 composeDecimal("recall", element.getRecallElement()); 44656 } 44657 if (element.hasFScoreElement()) { 44658 composeDecimal("fScore", element.getFScoreElement()); 44659 } 44660 if (element.hasRoc()) { 44661 composeMolecularSequenceMolecularSequenceQualityRocComponent("roc", element.getRoc()); 44662 } 44663 } 44664 44665 protected void composeMolecularSequenceMolecularSequenceQualityRocComponent(String name, 44666 MolecularSequence.MolecularSequenceQualityRocComponent element) throws IOException { 44667 if (element != null) { 44668 composeElementAttributes(element); 44669 xml.enter(FHIR_NS, name); 44670 composeMolecularSequenceMolecularSequenceQualityRocComponentElements(element); 44671 composeElementClose(element); 44672 xml.exit(FHIR_NS, name); 44673 } 44674 } 44675 44676 protected void composeMolecularSequenceMolecularSequenceQualityRocComponentElements( 44677 MolecularSequence.MolecularSequenceQualityRocComponent element) throws IOException { 44678 composeBackboneElementElements(element); 44679 if (element.hasScore()) { 44680 for (IntegerType e : element.getScore()) 44681 composeInteger("score", e); 44682 } 44683 if (element.hasNumTP()) { 44684 for (IntegerType e : element.getNumTP()) 44685 composeInteger("numTP", e); 44686 } 44687 if (element.hasNumFP()) { 44688 for (IntegerType e : element.getNumFP()) 44689 composeInteger("numFP", e); 44690 } 44691 if (element.hasNumFN()) { 44692 for (IntegerType e : element.getNumFN()) 44693 composeInteger("numFN", e); 44694 } 44695 if (element.hasPrecision()) { 44696 for (DecimalType e : element.getPrecision()) 44697 composeDecimal("precision", e); 44698 } 44699 if (element.hasSensitivity()) { 44700 for (DecimalType e : element.getSensitivity()) 44701 composeDecimal("sensitivity", e); 44702 } 44703 if (element.hasFMeasure()) { 44704 for (DecimalType e : element.getFMeasure()) 44705 composeDecimal("fMeasure", e); 44706 } 44707 } 44708 44709 protected void composeMolecularSequenceMolecularSequenceRepositoryComponent(String name, 44710 MolecularSequence.MolecularSequenceRepositoryComponent element) throws IOException { 44711 if (element != null) { 44712 composeElementAttributes(element); 44713 xml.enter(FHIR_NS, name); 44714 composeMolecularSequenceMolecularSequenceRepositoryComponentElements(element); 44715 composeElementClose(element); 44716 xml.exit(FHIR_NS, name); 44717 } 44718 } 44719 44720 protected void composeMolecularSequenceMolecularSequenceRepositoryComponentElements( 44721 MolecularSequence.MolecularSequenceRepositoryComponent element) throws IOException { 44722 composeBackboneElementElements(element); 44723 if (element.hasTypeElement()) 44724 composeEnumeration("type", element.getTypeElement(), new MolecularSequence.RepositoryTypeEnumFactory()); 44725 if (element.hasUrlElement()) { 44726 composeUri("url", element.getUrlElement()); 44727 } 44728 if (element.hasNameElement()) { 44729 composeString("name", element.getNameElement()); 44730 } 44731 if (element.hasDatasetIdElement()) { 44732 composeString("datasetId", element.getDatasetIdElement()); 44733 } 44734 if (element.hasVariantsetIdElement()) { 44735 composeString("variantsetId", element.getVariantsetIdElement()); 44736 } 44737 if (element.hasReadsetIdElement()) { 44738 composeString("readsetId", element.getReadsetIdElement()); 44739 } 44740 } 44741 44742 protected void composeMolecularSequenceMolecularSequenceStructureVariantComponent(String name, 44743 MolecularSequence.MolecularSequenceStructureVariantComponent element) throws IOException { 44744 if (element != null) { 44745 composeElementAttributes(element); 44746 xml.enter(FHIR_NS, name); 44747 composeMolecularSequenceMolecularSequenceStructureVariantComponentElements(element); 44748 composeElementClose(element); 44749 xml.exit(FHIR_NS, name); 44750 } 44751 } 44752 44753 protected void composeMolecularSequenceMolecularSequenceStructureVariantComponentElements( 44754 MolecularSequence.MolecularSequenceStructureVariantComponent element) throws IOException { 44755 composeBackboneElementElements(element); 44756 if (element.hasVariantType()) { 44757 composeCodeableConcept("variantType", element.getVariantType()); 44758 } 44759 if (element.hasExactElement()) { 44760 composeBoolean("exact", element.getExactElement()); 44761 } 44762 if (element.hasLengthElement()) { 44763 composeInteger("length", element.getLengthElement()); 44764 } 44765 if (element.hasOuter()) { 44766 composeMolecularSequenceMolecularSequenceStructureVariantOuterComponent("outer", element.getOuter()); 44767 } 44768 if (element.hasInner()) { 44769 composeMolecularSequenceMolecularSequenceStructureVariantInnerComponent("inner", element.getInner()); 44770 } 44771 } 44772 44773 protected void composeMolecularSequenceMolecularSequenceStructureVariantOuterComponent(String name, 44774 MolecularSequence.MolecularSequenceStructureVariantOuterComponent element) throws IOException { 44775 if (element != null) { 44776 composeElementAttributes(element); 44777 xml.enter(FHIR_NS, name); 44778 composeMolecularSequenceMolecularSequenceStructureVariantOuterComponentElements(element); 44779 composeElementClose(element); 44780 xml.exit(FHIR_NS, name); 44781 } 44782 } 44783 44784 protected void composeMolecularSequenceMolecularSequenceStructureVariantOuterComponentElements( 44785 MolecularSequence.MolecularSequenceStructureVariantOuterComponent element) throws IOException { 44786 composeBackboneElementElements(element); 44787 if (element.hasStartElement()) { 44788 composeInteger("start", element.getStartElement()); 44789 } 44790 if (element.hasEndElement()) { 44791 composeInteger("end", element.getEndElement()); 44792 } 44793 } 44794 44795 protected void composeMolecularSequenceMolecularSequenceStructureVariantInnerComponent(String name, 44796 MolecularSequence.MolecularSequenceStructureVariantInnerComponent element) throws IOException { 44797 if (element != null) { 44798 composeElementAttributes(element); 44799 xml.enter(FHIR_NS, name); 44800 composeMolecularSequenceMolecularSequenceStructureVariantInnerComponentElements(element); 44801 composeElementClose(element); 44802 xml.exit(FHIR_NS, name); 44803 } 44804 } 44805 44806 protected void composeMolecularSequenceMolecularSequenceStructureVariantInnerComponentElements( 44807 MolecularSequence.MolecularSequenceStructureVariantInnerComponent element) throws IOException { 44808 composeBackboneElementElements(element); 44809 if (element.hasStartElement()) { 44810 composeInteger("start", element.getStartElement()); 44811 } 44812 if (element.hasEndElement()) { 44813 composeInteger("end", element.getEndElement()); 44814 } 44815 } 44816 44817 protected void composeNamingSystem(String name, NamingSystem element) throws IOException { 44818 if (element != null) { 44819 composeDomainResourceAttributes(element); 44820 xml.enter(FHIR_NS, name); 44821 composeNamingSystemElements(element); 44822 composeElementClose(element); 44823 xml.exit(FHIR_NS, name); 44824 } 44825 } 44826 44827 protected void composeNamingSystemElements(NamingSystem element) throws IOException { 44828 composeDomainResourceElements(element); 44829 if (element.hasNameElement()) { 44830 composeString("name", element.getNameElement()); 44831 } 44832 if (element.hasStatusElement()) 44833 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 44834 if (element.hasKindElement()) 44835 composeEnumeration("kind", element.getKindElement(), new NamingSystem.NamingSystemTypeEnumFactory()); 44836 if (element.hasDateElement()) { 44837 composeDateTime("date", element.getDateElement()); 44838 } 44839 if (element.hasPublisherElement()) { 44840 composeString("publisher", element.getPublisherElement()); 44841 } 44842 if (element.hasContact()) { 44843 for (ContactDetail e : element.getContact()) 44844 composeContactDetail("contact", e); 44845 } 44846 if (element.hasResponsibleElement()) { 44847 composeString("responsible", element.getResponsibleElement()); 44848 } 44849 if (element.hasType()) { 44850 composeCodeableConcept("type", element.getType()); 44851 } 44852 if (element.hasDescriptionElement()) { 44853 composeMarkdown("description", element.getDescriptionElement()); 44854 } 44855 if (element.hasUseContext()) { 44856 for (UsageContext e : element.getUseContext()) 44857 composeUsageContext("useContext", e); 44858 } 44859 if (element.hasJurisdiction()) { 44860 for (CodeableConcept e : element.getJurisdiction()) 44861 composeCodeableConcept("jurisdiction", e); 44862 } 44863 if (element.hasUsageElement()) { 44864 composeString("usage", element.getUsageElement()); 44865 } 44866 if (element.hasUniqueId()) { 44867 for (NamingSystem.NamingSystemUniqueIdComponent e : element.getUniqueId()) 44868 composeNamingSystemNamingSystemUniqueIdComponent("uniqueId", e); 44869 } 44870 } 44871 44872 protected void composeNamingSystemNamingSystemUniqueIdComponent(String name, 44873 NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { 44874 if (element != null) { 44875 composeElementAttributes(element); 44876 xml.enter(FHIR_NS, name); 44877 composeNamingSystemNamingSystemUniqueIdComponentElements(element); 44878 composeElementClose(element); 44879 xml.exit(FHIR_NS, name); 44880 } 44881 } 44882 44883 protected void composeNamingSystemNamingSystemUniqueIdComponentElements( 44884 NamingSystem.NamingSystemUniqueIdComponent element) throws IOException { 44885 composeBackboneElementElements(element); 44886 if (element.hasTypeElement()) 44887 composeEnumeration("type", element.getTypeElement(), new NamingSystem.NamingSystemIdentifierTypeEnumFactory()); 44888 if (element.hasValueElement()) { 44889 composeString("value", element.getValueElement()); 44890 } 44891 if (element.hasPreferredElement()) { 44892 composeBoolean("preferred", element.getPreferredElement()); 44893 } 44894 if (element.hasCommentElement()) { 44895 composeString("comment", element.getCommentElement()); 44896 } 44897 if (element.hasPeriod()) { 44898 composePeriod("period", element.getPeriod()); 44899 } 44900 } 44901 44902 protected void composeNutritionOrder(String name, NutritionOrder element) throws IOException { 44903 if (element != null) { 44904 composeDomainResourceAttributes(element); 44905 xml.enter(FHIR_NS, name); 44906 composeNutritionOrderElements(element); 44907 composeElementClose(element); 44908 xml.exit(FHIR_NS, name); 44909 } 44910 } 44911 44912 protected void composeNutritionOrderElements(NutritionOrder element) throws IOException { 44913 composeDomainResourceElements(element); 44914 if (element.hasIdentifier()) { 44915 for (Identifier e : element.getIdentifier()) 44916 composeIdentifier("identifier", e); 44917 } 44918 if (element.hasInstantiatesCanonical()) { 44919 for (CanonicalType e : element.getInstantiatesCanonical()) 44920 composeCanonical("instantiatesCanonical", e); 44921 } 44922 if (element.hasInstantiatesUri()) { 44923 for (UriType e : element.getInstantiatesUri()) 44924 composeUri("instantiatesUri", e); 44925 } 44926 if (element.hasInstantiates()) { 44927 for (UriType e : element.getInstantiates()) 44928 composeUri("instantiates", e); 44929 } 44930 if (element.hasStatusElement()) 44931 composeEnumeration("status", element.getStatusElement(), new NutritionOrder.NutritionOrderStatusEnumFactory()); 44932 if (element.hasIntentElement()) 44933 composeEnumeration("intent", element.getIntentElement(), new NutritionOrder.NutritiionOrderIntentEnumFactory()); 44934 if (element.hasPatient()) { 44935 composeReference("patient", element.getPatient()); 44936 } 44937 if (element.hasEncounter()) { 44938 composeReference("encounter", element.getEncounter()); 44939 } 44940 if (element.hasDateTimeElement()) { 44941 composeDateTime("dateTime", element.getDateTimeElement()); 44942 } 44943 if (element.hasOrderer()) { 44944 composeReference("orderer", element.getOrderer()); 44945 } 44946 if (element.hasAllergyIntolerance()) { 44947 for (Reference e : element.getAllergyIntolerance()) 44948 composeReference("allergyIntolerance", e); 44949 } 44950 if (element.hasFoodPreferenceModifier()) { 44951 for (CodeableConcept e : element.getFoodPreferenceModifier()) 44952 composeCodeableConcept("foodPreferenceModifier", e); 44953 } 44954 if (element.hasExcludeFoodModifier()) { 44955 for (CodeableConcept e : element.getExcludeFoodModifier()) 44956 composeCodeableConcept("excludeFoodModifier", e); 44957 } 44958 if (element.hasOralDiet()) { 44959 composeNutritionOrderNutritionOrderOralDietComponent("oralDiet", element.getOralDiet()); 44960 } 44961 if (element.hasSupplement()) { 44962 for (NutritionOrder.NutritionOrderSupplementComponent e : element.getSupplement()) 44963 composeNutritionOrderNutritionOrderSupplementComponent("supplement", e); 44964 } 44965 if (element.hasEnteralFormula()) { 44966 composeNutritionOrderNutritionOrderEnteralFormulaComponent("enteralFormula", element.getEnteralFormula()); 44967 } 44968 if (element.hasNote()) { 44969 for (Annotation e : element.getNote()) 44970 composeAnnotation("note", e); 44971 } 44972 } 44973 44974 protected void composeNutritionOrderNutritionOrderOralDietComponent(String name, 44975 NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { 44976 if (element != null) { 44977 composeElementAttributes(element); 44978 xml.enter(FHIR_NS, name); 44979 composeNutritionOrderNutritionOrderOralDietComponentElements(element); 44980 composeElementClose(element); 44981 xml.exit(FHIR_NS, name); 44982 } 44983 } 44984 44985 protected void composeNutritionOrderNutritionOrderOralDietComponentElements( 44986 NutritionOrder.NutritionOrderOralDietComponent element) throws IOException { 44987 composeBackboneElementElements(element); 44988 if (element.hasType()) { 44989 for (CodeableConcept e : element.getType()) 44990 composeCodeableConcept("type", e); 44991 } 44992 if (element.hasSchedule()) { 44993 for (Timing e : element.getSchedule()) 44994 composeTiming("schedule", e); 44995 } 44996 if (element.hasNutrient()) { 44997 for (NutritionOrder.NutritionOrderOralDietNutrientComponent e : element.getNutrient()) 44998 composeNutritionOrderNutritionOrderOralDietNutrientComponent("nutrient", e); 44999 } 45000 if (element.hasTexture()) { 45001 for (NutritionOrder.NutritionOrderOralDietTextureComponent e : element.getTexture()) 45002 composeNutritionOrderNutritionOrderOralDietTextureComponent("texture", e); 45003 } 45004 if (element.hasFluidConsistencyType()) { 45005 for (CodeableConcept e : element.getFluidConsistencyType()) 45006 composeCodeableConcept("fluidConsistencyType", e); 45007 } 45008 if (element.hasInstructionElement()) { 45009 composeString("instruction", element.getInstructionElement()); 45010 } 45011 } 45012 45013 protected void composeNutritionOrderNutritionOrderOralDietNutrientComponent(String name, 45014 NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { 45015 if (element != null) { 45016 composeElementAttributes(element); 45017 xml.enter(FHIR_NS, name); 45018 composeNutritionOrderNutritionOrderOralDietNutrientComponentElements(element); 45019 composeElementClose(element); 45020 xml.exit(FHIR_NS, name); 45021 } 45022 } 45023 45024 protected void composeNutritionOrderNutritionOrderOralDietNutrientComponentElements( 45025 NutritionOrder.NutritionOrderOralDietNutrientComponent element) throws IOException { 45026 composeBackboneElementElements(element); 45027 if (element.hasModifier()) { 45028 composeCodeableConcept("modifier", element.getModifier()); 45029 } 45030 if (element.hasAmount()) { 45031 composeQuantity("amount", element.getAmount()); 45032 } 45033 } 45034 45035 protected void composeNutritionOrderNutritionOrderOralDietTextureComponent(String name, 45036 NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { 45037 if (element != null) { 45038 composeElementAttributes(element); 45039 xml.enter(FHIR_NS, name); 45040 composeNutritionOrderNutritionOrderOralDietTextureComponentElements(element); 45041 composeElementClose(element); 45042 xml.exit(FHIR_NS, name); 45043 } 45044 } 45045 45046 protected void composeNutritionOrderNutritionOrderOralDietTextureComponentElements( 45047 NutritionOrder.NutritionOrderOralDietTextureComponent element) throws IOException { 45048 composeBackboneElementElements(element); 45049 if (element.hasModifier()) { 45050 composeCodeableConcept("modifier", element.getModifier()); 45051 } 45052 if (element.hasFoodType()) { 45053 composeCodeableConcept("foodType", element.getFoodType()); 45054 } 45055 } 45056 45057 protected void composeNutritionOrderNutritionOrderSupplementComponent(String name, 45058 NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { 45059 if (element != null) { 45060 composeElementAttributes(element); 45061 xml.enter(FHIR_NS, name); 45062 composeNutritionOrderNutritionOrderSupplementComponentElements(element); 45063 composeElementClose(element); 45064 xml.exit(FHIR_NS, name); 45065 } 45066 } 45067 45068 protected void composeNutritionOrderNutritionOrderSupplementComponentElements( 45069 NutritionOrder.NutritionOrderSupplementComponent element) throws IOException { 45070 composeBackboneElementElements(element); 45071 if (element.hasType()) { 45072 composeCodeableConcept("type", element.getType()); 45073 } 45074 if (element.hasProductNameElement()) { 45075 composeString("productName", element.getProductNameElement()); 45076 } 45077 if (element.hasSchedule()) { 45078 for (Timing e : element.getSchedule()) 45079 composeTiming("schedule", e); 45080 } 45081 if (element.hasQuantity()) { 45082 composeQuantity("quantity", element.getQuantity()); 45083 } 45084 if (element.hasInstructionElement()) { 45085 composeString("instruction", element.getInstructionElement()); 45086 } 45087 } 45088 45089 protected void composeNutritionOrderNutritionOrderEnteralFormulaComponent(String name, 45090 NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { 45091 if (element != null) { 45092 composeElementAttributes(element); 45093 xml.enter(FHIR_NS, name); 45094 composeNutritionOrderNutritionOrderEnteralFormulaComponentElements(element); 45095 composeElementClose(element); 45096 xml.exit(FHIR_NS, name); 45097 } 45098 } 45099 45100 protected void composeNutritionOrderNutritionOrderEnteralFormulaComponentElements( 45101 NutritionOrder.NutritionOrderEnteralFormulaComponent element) throws IOException { 45102 composeBackboneElementElements(element); 45103 if (element.hasBaseFormulaType()) { 45104 composeCodeableConcept("baseFormulaType", element.getBaseFormulaType()); 45105 } 45106 if (element.hasBaseFormulaProductNameElement()) { 45107 composeString("baseFormulaProductName", element.getBaseFormulaProductNameElement()); 45108 } 45109 if (element.hasAdditiveType()) { 45110 composeCodeableConcept("additiveType", element.getAdditiveType()); 45111 } 45112 if (element.hasAdditiveProductNameElement()) { 45113 composeString("additiveProductName", element.getAdditiveProductNameElement()); 45114 } 45115 if (element.hasCaloricDensity()) { 45116 composeQuantity("caloricDensity", element.getCaloricDensity()); 45117 } 45118 if (element.hasRouteofAdministration()) { 45119 composeCodeableConcept("routeofAdministration", element.getRouteofAdministration()); 45120 } 45121 if (element.hasAdministration()) { 45122 for (NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent e : element.getAdministration()) 45123 composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent("administration", e); 45124 } 45125 if (element.hasMaxVolumeToDeliver()) { 45126 composeQuantity("maxVolumeToDeliver", element.getMaxVolumeToDeliver()); 45127 } 45128 if (element.hasAdministrationInstructionElement()) { 45129 composeString("administrationInstruction", element.getAdministrationInstructionElement()); 45130 } 45131 } 45132 45133 protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponent(String name, 45134 NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { 45135 if (element != null) { 45136 composeElementAttributes(element); 45137 xml.enter(FHIR_NS, name); 45138 composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements(element); 45139 composeElementClose(element); 45140 xml.exit(FHIR_NS, name); 45141 } 45142 } 45143 45144 protected void composeNutritionOrderNutritionOrderEnteralFormulaAdministrationComponentElements( 45145 NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent element) throws IOException { 45146 composeBackboneElementElements(element); 45147 if (element.hasSchedule()) { 45148 composeTiming("schedule", element.getSchedule()); 45149 } 45150 if (element.hasQuantity()) { 45151 composeQuantity("quantity", element.getQuantity()); 45152 } 45153 if (element.hasRate()) { 45154 composeType("rate", element.getRate()); 45155 } 45156 } 45157 45158 protected void composeObservation(String name, Observation element) throws IOException { 45159 if (element != null) { 45160 composeDomainResourceAttributes(element); 45161 xml.enter(FHIR_NS, name); 45162 composeObservationElements(element); 45163 composeElementClose(element); 45164 xml.exit(FHIR_NS, name); 45165 } 45166 } 45167 45168 protected void composeObservationElements(Observation element) throws IOException { 45169 composeDomainResourceElements(element); 45170 if (element.hasIdentifier()) { 45171 for (Identifier e : element.getIdentifier()) 45172 composeIdentifier("identifier", e); 45173 } 45174 if (element.hasBasedOn()) { 45175 for (Reference e : element.getBasedOn()) 45176 composeReference("basedOn", e); 45177 } 45178 if (element.hasPartOf()) { 45179 for (Reference e : element.getPartOf()) 45180 composeReference("partOf", e); 45181 } 45182 if (element.hasStatusElement()) 45183 composeEnumeration("status", element.getStatusElement(), new Observation.ObservationStatusEnumFactory()); 45184 if (element.hasCategory()) { 45185 for (CodeableConcept e : element.getCategory()) 45186 composeCodeableConcept("category", e); 45187 } 45188 if (element.hasCode()) { 45189 composeCodeableConcept("code", element.getCode()); 45190 } 45191 if (element.hasSubject()) { 45192 composeReference("subject", element.getSubject()); 45193 } 45194 if (element.hasFocus()) { 45195 for (Reference e : element.getFocus()) 45196 composeReference("focus", e); 45197 } 45198 if (element.hasEncounter()) { 45199 composeReference("encounter", element.getEncounter()); 45200 } 45201 if (element.hasEffective()) { 45202 composeType("effective", element.getEffective()); 45203 } 45204 if (element.hasIssuedElement()) { 45205 composeInstant("issued", element.getIssuedElement()); 45206 } 45207 if (element.hasPerformer()) { 45208 for (Reference e : element.getPerformer()) 45209 composeReference("performer", e); 45210 } 45211 if (element.hasValue()) { 45212 composeType("value", element.getValue()); 45213 } 45214 if (element.hasDataAbsentReason()) { 45215 composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); 45216 } 45217 if (element.hasInterpretation()) { 45218 for (CodeableConcept e : element.getInterpretation()) 45219 composeCodeableConcept("interpretation", e); 45220 } 45221 if (element.hasNote()) { 45222 for (Annotation e : element.getNote()) 45223 composeAnnotation("note", e); 45224 } 45225 if (element.hasBodySite()) { 45226 composeCodeableConcept("bodySite", element.getBodySite()); 45227 } 45228 if (element.hasMethod()) { 45229 composeCodeableConcept("method", element.getMethod()); 45230 } 45231 if (element.hasSpecimen()) { 45232 composeReference("specimen", element.getSpecimen()); 45233 } 45234 if (element.hasDevice()) { 45235 composeReference("device", element.getDevice()); 45236 } 45237 if (element.hasReferenceRange()) { 45238 for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) 45239 composeObservationObservationReferenceRangeComponent("referenceRange", e); 45240 } 45241 if (element.hasHasMember()) { 45242 for (Reference e : element.getHasMember()) 45243 composeReference("hasMember", e); 45244 } 45245 if (element.hasDerivedFrom()) { 45246 for (Reference e : element.getDerivedFrom()) 45247 composeReference("derivedFrom", e); 45248 } 45249 if (element.hasComponent()) { 45250 for (Observation.ObservationComponentComponent e : element.getComponent()) 45251 composeObservationObservationComponentComponent("component", e); 45252 } 45253 } 45254 45255 protected void composeObservationObservationReferenceRangeComponent(String name, 45256 Observation.ObservationReferenceRangeComponent element) throws IOException { 45257 if (element != null) { 45258 composeElementAttributes(element); 45259 xml.enter(FHIR_NS, name); 45260 composeObservationObservationReferenceRangeComponentElements(element); 45261 composeElementClose(element); 45262 xml.exit(FHIR_NS, name); 45263 } 45264 } 45265 45266 protected void composeObservationObservationReferenceRangeComponentElements( 45267 Observation.ObservationReferenceRangeComponent element) throws IOException { 45268 composeBackboneElementElements(element); 45269 if (element.hasLow()) { 45270 composeQuantity("low", element.getLow()); 45271 } 45272 if (element.hasHigh()) { 45273 composeQuantity("high", element.getHigh()); 45274 } 45275 if (element.hasType()) { 45276 composeCodeableConcept("type", element.getType()); 45277 } 45278 if (element.hasAppliesTo()) { 45279 for (CodeableConcept e : element.getAppliesTo()) 45280 composeCodeableConcept("appliesTo", e); 45281 } 45282 if (element.hasAge()) { 45283 composeRange("age", element.getAge()); 45284 } 45285 if (element.hasTextElement()) { 45286 composeString("text", element.getTextElement()); 45287 } 45288 } 45289 45290 protected void composeObservationObservationComponentComponent(String name, 45291 Observation.ObservationComponentComponent element) throws IOException { 45292 if (element != null) { 45293 composeElementAttributes(element); 45294 xml.enter(FHIR_NS, name); 45295 composeObservationObservationComponentComponentElements(element); 45296 composeElementClose(element); 45297 xml.exit(FHIR_NS, name); 45298 } 45299 } 45300 45301 protected void composeObservationObservationComponentComponentElements( 45302 Observation.ObservationComponentComponent element) throws IOException { 45303 composeBackboneElementElements(element); 45304 if (element.hasCode()) { 45305 composeCodeableConcept("code", element.getCode()); 45306 } 45307 if (element.hasValue()) { 45308 composeType("value", element.getValue()); 45309 } 45310 if (element.hasDataAbsentReason()) { 45311 composeCodeableConcept("dataAbsentReason", element.getDataAbsentReason()); 45312 } 45313 if (element.hasInterpretation()) { 45314 for (CodeableConcept e : element.getInterpretation()) 45315 composeCodeableConcept("interpretation", e); 45316 } 45317 if (element.hasReferenceRange()) { 45318 for (Observation.ObservationReferenceRangeComponent e : element.getReferenceRange()) 45319 composeObservationObservationReferenceRangeComponent("referenceRange", e); 45320 } 45321 } 45322 45323 protected void composeObservationDefinition(String name, ObservationDefinition element) throws IOException { 45324 if (element != null) { 45325 composeDomainResourceAttributes(element); 45326 xml.enter(FHIR_NS, name); 45327 composeObservationDefinitionElements(element); 45328 composeElementClose(element); 45329 xml.exit(FHIR_NS, name); 45330 } 45331 } 45332 45333 protected void composeObservationDefinitionElements(ObservationDefinition element) throws IOException { 45334 composeDomainResourceElements(element); 45335 if (element.hasCategory()) { 45336 for (CodeableConcept e : element.getCategory()) 45337 composeCodeableConcept("category", e); 45338 } 45339 if (element.hasCode()) { 45340 composeCodeableConcept("code", element.getCode()); 45341 } 45342 if (element.hasIdentifier()) { 45343 for (Identifier e : element.getIdentifier()) 45344 composeIdentifier("identifier", e); 45345 } 45346 if (element.hasPermittedDataType()) 45347 for (Enumeration<ObservationDefinition.ObservationDataType> e : element.getPermittedDataType()) 45348 composeEnumeration("permittedDataType", e, new ObservationDefinition.ObservationDataTypeEnumFactory()); 45349 if (element.hasMultipleResultsAllowedElement()) { 45350 composeBoolean("multipleResultsAllowed", element.getMultipleResultsAllowedElement()); 45351 } 45352 if (element.hasMethod()) { 45353 composeCodeableConcept("method", element.getMethod()); 45354 } 45355 if (element.hasPreferredReportNameElement()) { 45356 composeString("preferredReportName", element.getPreferredReportNameElement()); 45357 } 45358 if (element.hasQuantitativeDetails()) { 45359 composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponent("quantitativeDetails", 45360 element.getQuantitativeDetails()); 45361 } 45362 if (element.hasQualifiedInterval()) { 45363 for (ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent e : element.getQualifiedInterval()) 45364 composeObservationDefinitionObservationDefinitionQualifiedIntervalComponent("qualifiedInterval", e); 45365 } 45366 if (element.hasValidCodedValueSet()) { 45367 composeReference("validCodedValueSet", element.getValidCodedValueSet()); 45368 } 45369 if (element.hasNormalCodedValueSet()) { 45370 composeReference("normalCodedValueSet", element.getNormalCodedValueSet()); 45371 } 45372 if (element.hasAbnormalCodedValueSet()) { 45373 composeReference("abnormalCodedValueSet", element.getAbnormalCodedValueSet()); 45374 } 45375 if (element.hasCriticalCodedValueSet()) { 45376 composeReference("criticalCodedValueSet", element.getCriticalCodedValueSet()); 45377 } 45378 } 45379 45380 protected void composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponent(String name, 45381 ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent element) throws IOException { 45382 if (element != null) { 45383 composeElementAttributes(element); 45384 xml.enter(FHIR_NS, name); 45385 composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponentElements(element); 45386 composeElementClose(element); 45387 xml.exit(FHIR_NS, name); 45388 } 45389 } 45390 45391 protected void composeObservationDefinitionObservationDefinitionQuantitativeDetailsComponentElements( 45392 ObservationDefinition.ObservationDefinitionQuantitativeDetailsComponent element) throws IOException { 45393 composeBackboneElementElements(element); 45394 if (element.hasCustomaryUnit()) { 45395 composeCodeableConcept("customaryUnit", element.getCustomaryUnit()); 45396 } 45397 if (element.hasUnit()) { 45398 composeCodeableConcept("unit", element.getUnit()); 45399 } 45400 if (element.hasConversionFactorElement()) { 45401 composeDecimal("conversionFactor", element.getConversionFactorElement()); 45402 } 45403 if (element.hasDecimalPrecisionElement()) { 45404 composeInteger("decimalPrecision", element.getDecimalPrecisionElement()); 45405 } 45406 } 45407 45408 protected void composeObservationDefinitionObservationDefinitionQualifiedIntervalComponent(String name, 45409 ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent element) throws IOException { 45410 if (element != null) { 45411 composeElementAttributes(element); 45412 xml.enter(FHIR_NS, name); 45413 composeObservationDefinitionObservationDefinitionQualifiedIntervalComponentElements(element); 45414 composeElementClose(element); 45415 xml.exit(FHIR_NS, name); 45416 } 45417 } 45418 45419 protected void composeObservationDefinitionObservationDefinitionQualifiedIntervalComponentElements( 45420 ObservationDefinition.ObservationDefinitionQualifiedIntervalComponent element) throws IOException { 45421 composeBackboneElementElements(element); 45422 if (element.hasCategoryElement()) 45423 composeEnumeration("category", element.getCategoryElement(), 45424 new ObservationDefinition.ObservationRangeCategoryEnumFactory()); 45425 if (element.hasRange()) { 45426 composeRange("range", element.getRange()); 45427 } 45428 if (element.hasContext()) { 45429 composeCodeableConcept("context", element.getContext()); 45430 } 45431 if (element.hasAppliesTo()) { 45432 for (CodeableConcept e : element.getAppliesTo()) 45433 composeCodeableConcept("appliesTo", e); 45434 } 45435 if (element.hasGenderElement()) 45436 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 45437 if (element.hasAge()) { 45438 composeRange("age", element.getAge()); 45439 } 45440 if (element.hasGestationalAge()) { 45441 composeRange("gestationalAge", element.getGestationalAge()); 45442 } 45443 if (element.hasConditionElement()) { 45444 composeString("condition", element.getConditionElement()); 45445 } 45446 } 45447 45448 protected void composeOperationDefinition(String name, OperationDefinition element) throws IOException { 45449 if (element != null) { 45450 composeDomainResourceAttributes(element); 45451 xml.enter(FHIR_NS, name); 45452 composeOperationDefinitionElements(element); 45453 composeElementClose(element); 45454 xml.exit(FHIR_NS, name); 45455 } 45456 } 45457 45458 protected void composeOperationDefinitionElements(OperationDefinition element) throws IOException { 45459 composeDomainResourceElements(element); 45460 if (element.hasUrlElement()) { 45461 composeUri("url", element.getUrlElement()); 45462 } 45463 if (element.hasVersionElement()) { 45464 composeString("version", element.getVersionElement()); 45465 } 45466 if (element.hasNameElement()) { 45467 composeString("name", element.getNameElement()); 45468 } 45469 if (element.hasTitleElement()) { 45470 composeString("title", element.getTitleElement()); 45471 } 45472 if (element.hasStatusElement()) 45473 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 45474 if (element.hasKindElement()) 45475 composeEnumeration("kind", element.getKindElement(), new OperationDefinition.OperationKindEnumFactory()); 45476 if (element.hasExperimentalElement()) { 45477 composeBoolean("experimental", element.getExperimentalElement()); 45478 } 45479 if (element.hasDateElement()) { 45480 composeDateTime("date", element.getDateElement()); 45481 } 45482 if (element.hasPublisherElement()) { 45483 composeString("publisher", element.getPublisherElement()); 45484 } 45485 if (element.hasContact()) { 45486 for (ContactDetail e : element.getContact()) 45487 composeContactDetail("contact", e); 45488 } 45489 if (element.hasDescriptionElement()) { 45490 composeMarkdown("description", element.getDescriptionElement()); 45491 } 45492 if (element.hasUseContext()) { 45493 for (UsageContext e : element.getUseContext()) 45494 composeUsageContext("useContext", e); 45495 } 45496 if (element.hasJurisdiction()) { 45497 for (CodeableConcept e : element.getJurisdiction()) 45498 composeCodeableConcept("jurisdiction", e); 45499 } 45500 if (element.hasPurposeElement()) { 45501 composeMarkdown("purpose", element.getPurposeElement()); 45502 } 45503 if (element.hasAffectsStateElement()) { 45504 composeBoolean("affectsState", element.getAffectsStateElement()); 45505 } 45506 if (element.hasCodeElement()) { 45507 composeCode("code", element.getCodeElement()); 45508 } 45509 if (element.hasCommentElement()) { 45510 composeMarkdown("comment", element.getCommentElement()); 45511 } 45512 if (element.hasBaseElement()) { 45513 composeCanonical("base", element.getBaseElement()); 45514 } 45515 if (element.hasResource()) { 45516 for (CodeType e : element.getResource()) 45517 composeCode("resource", e); 45518 } 45519 if (element.hasSystemElement()) { 45520 composeBoolean("system", element.getSystemElement()); 45521 } 45522 if (element.hasTypeElement()) { 45523 composeBoolean("type", element.getTypeElement()); 45524 } 45525 if (element.hasInstanceElement()) { 45526 composeBoolean("instance", element.getInstanceElement()); 45527 } 45528 if (element.hasInputProfileElement()) { 45529 composeCanonical("inputProfile", element.getInputProfileElement()); 45530 } 45531 if (element.hasOutputProfileElement()) { 45532 composeCanonical("outputProfile", element.getOutputProfileElement()); 45533 } 45534 if (element.hasParameter()) { 45535 for (OperationDefinition.OperationDefinitionParameterComponent e : element.getParameter()) 45536 composeOperationDefinitionOperationDefinitionParameterComponent("parameter", e); 45537 } 45538 if (element.hasOverload()) { 45539 for (OperationDefinition.OperationDefinitionOverloadComponent e : element.getOverload()) 45540 composeOperationDefinitionOperationDefinitionOverloadComponent("overload", e); 45541 } 45542 } 45543 45544 protected void composeOperationDefinitionOperationDefinitionParameterComponent(String name, 45545 OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { 45546 if (element != null) { 45547 composeElementAttributes(element); 45548 xml.enter(FHIR_NS, name); 45549 composeOperationDefinitionOperationDefinitionParameterComponentElements(element); 45550 composeElementClose(element); 45551 xml.exit(FHIR_NS, name); 45552 } 45553 } 45554 45555 protected void composeOperationDefinitionOperationDefinitionParameterComponentElements( 45556 OperationDefinition.OperationDefinitionParameterComponent element) throws IOException { 45557 composeBackboneElementElements(element); 45558 if (element.hasNameElement()) { 45559 composeCode("name", element.getNameElement()); 45560 } 45561 if (element.hasUseElement()) 45562 composeEnumeration("use", element.getUseElement(), new OperationDefinition.OperationParameterUseEnumFactory()); 45563 if (element.hasMinElement()) { 45564 composeInteger("min", element.getMinElement()); 45565 } 45566 if (element.hasMaxElement()) { 45567 composeString("max", element.getMaxElement()); 45568 } 45569 if (element.hasDocumentationElement()) { 45570 composeString("documentation", element.getDocumentationElement()); 45571 } 45572 if (element.hasTypeElement()) { 45573 composeCode("type", element.getTypeElement()); 45574 } 45575 if (element.hasTargetProfile()) { 45576 for (CanonicalType e : element.getTargetProfile()) 45577 composeCanonical("targetProfile", e); 45578 } 45579 if (element.hasSearchTypeElement()) 45580 composeEnumeration("searchType", element.getSearchTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); 45581 if (element.hasBinding()) { 45582 composeOperationDefinitionOperationDefinitionParameterBindingComponent("binding", element.getBinding()); 45583 } 45584 if (element.hasReferencedFrom()) { 45585 for (OperationDefinition.OperationDefinitionParameterReferencedFromComponent e : element.getReferencedFrom()) 45586 composeOperationDefinitionOperationDefinitionParameterReferencedFromComponent("referencedFrom", e); 45587 } 45588 if (element.hasPart()) { 45589 for (OperationDefinition.OperationDefinitionParameterComponent e : element.getPart()) 45590 composeOperationDefinitionOperationDefinitionParameterComponent("part", e); 45591 } 45592 } 45593 45594 protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(String name, 45595 OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { 45596 if (element != null) { 45597 composeElementAttributes(element); 45598 xml.enter(FHIR_NS, name); 45599 composeOperationDefinitionOperationDefinitionParameterBindingComponentElements(element); 45600 composeElementClose(element); 45601 xml.exit(FHIR_NS, name); 45602 } 45603 } 45604 45605 protected void composeOperationDefinitionOperationDefinitionParameterBindingComponentElements( 45606 OperationDefinition.OperationDefinitionParameterBindingComponent element) throws IOException { 45607 composeBackboneElementElements(element); 45608 if (element.hasStrengthElement()) 45609 composeEnumeration("strength", element.getStrengthElement(), new Enumerations.BindingStrengthEnumFactory()); 45610 if (element.hasValueSetElement()) { 45611 composeCanonical("valueSet", element.getValueSetElement()); 45612 } 45613 } 45614 45615 protected void composeOperationDefinitionOperationDefinitionParameterReferencedFromComponent(String name, 45616 OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException { 45617 if (element != null) { 45618 composeElementAttributes(element); 45619 xml.enter(FHIR_NS, name); 45620 composeOperationDefinitionOperationDefinitionParameterReferencedFromComponentElements(element); 45621 composeElementClose(element); 45622 xml.exit(FHIR_NS, name); 45623 } 45624 } 45625 45626 protected void composeOperationDefinitionOperationDefinitionParameterReferencedFromComponentElements( 45627 OperationDefinition.OperationDefinitionParameterReferencedFromComponent element) throws IOException { 45628 composeBackboneElementElements(element); 45629 if (element.hasSourceElement()) { 45630 composeString("source", element.getSourceElement()); 45631 } 45632 if (element.hasSourceIdElement()) { 45633 composeString("sourceId", element.getSourceIdElement()); 45634 } 45635 } 45636 45637 protected void composeOperationDefinitionOperationDefinitionOverloadComponent(String name, 45638 OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { 45639 if (element != null) { 45640 composeElementAttributes(element); 45641 xml.enter(FHIR_NS, name); 45642 composeOperationDefinitionOperationDefinitionOverloadComponentElements(element); 45643 composeElementClose(element); 45644 xml.exit(FHIR_NS, name); 45645 } 45646 } 45647 45648 protected void composeOperationDefinitionOperationDefinitionOverloadComponentElements( 45649 OperationDefinition.OperationDefinitionOverloadComponent element) throws IOException { 45650 composeBackboneElementElements(element); 45651 if (element.hasParameterName()) { 45652 for (StringType e : element.getParameterName()) 45653 composeString("parameterName", e); 45654 } 45655 if (element.hasCommentElement()) { 45656 composeString("comment", element.getCommentElement()); 45657 } 45658 } 45659 45660 protected void composeOperationOutcome(String name, OperationOutcome element) throws IOException { 45661 if (element != null) { 45662 composeDomainResourceAttributes(element); 45663 xml.enter(FHIR_NS, name); 45664 composeOperationOutcomeElements(element); 45665 composeElementClose(element); 45666 xml.exit(FHIR_NS, name); 45667 } 45668 } 45669 45670 protected void composeOperationOutcomeElements(OperationOutcome element) throws IOException { 45671 composeDomainResourceElements(element); 45672 if (element.hasIssue()) { 45673 for (OperationOutcome.OperationOutcomeIssueComponent e : element.getIssue()) 45674 composeOperationOutcomeOperationOutcomeIssueComponent("issue", e); 45675 } 45676 } 45677 45678 protected void composeOperationOutcomeOperationOutcomeIssueComponent(String name, 45679 OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { 45680 if (element != null) { 45681 composeElementAttributes(element); 45682 xml.enter(FHIR_NS, name); 45683 composeOperationOutcomeOperationOutcomeIssueComponentElements(element); 45684 composeElementClose(element); 45685 xml.exit(FHIR_NS, name); 45686 } 45687 } 45688 45689 protected void composeOperationOutcomeOperationOutcomeIssueComponentElements( 45690 OperationOutcome.OperationOutcomeIssueComponent element) throws IOException { 45691 composeBackboneElementElements(element); 45692 if (element.hasSeverityElement()) 45693 composeEnumeration("severity", element.getSeverityElement(), new OperationOutcome.IssueSeverityEnumFactory()); 45694 if (element.hasCodeElement()) 45695 composeEnumeration("code", element.getCodeElement(), new OperationOutcome.IssueTypeEnumFactory()); 45696 if (element.hasDetails()) { 45697 composeCodeableConcept("details", element.getDetails()); 45698 } 45699 if (element.hasDiagnosticsElement()) { 45700 composeString("diagnostics", element.getDiagnosticsElement()); 45701 } 45702 if (element.hasLocation()) { 45703 for (StringType e : element.getLocation()) 45704 composeString("location", e); 45705 } 45706 if (element.hasExpression()) { 45707 for (StringType e : element.getExpression()) 45708 composeString("expression", e); 45709 } 45710 } 45711 45712 protected void composeOrganization(String name, Organization element) throws IOException { 45713 if (element != null) { 45714 composeDomainResourceAttributes(element); 45715 xml.enter(FHIR_NS, name); 45716 composeOrganizationElements(element); 45717 composeElementClose(element); 45718 xml.exit(FHIR_NS, name); 45719 } 45720 } 45721 45722 protected void composeOrganizationElements(Organization element) throws IOException { 45723 composeDomainResourceElements(element); 45724 if (element.hasIdentifier()) { 45725 for (Identifier e : element.getIdentifier()) 45726 composeIdentifier("identifier", e); 45727 } 45728 if (element.hasActiveElement()) { 45729 composeBoolean("active", element.getActiveElement()); 45730 } 45731 if (element.hasType()) { 45732 for (CodeableConcept e : element.getType()) 45733 composeCodeableConcept("type", e); 45734 } 45735 if (element.hasNameElement()) { 45736 composeString("name", element.getNameElement()); 45737 } 45738 if (element.hasAlias()) { 45739 for (StringType e : element.getAlias()) 45740 composeString("alias", e); 45741 } 45742 if (element.hasTelecom()) { 45743 for (ContactPoint e : element.getTelecom()) 45744 composeContactPoint("telecom", e); 45745 } 45746 if (element.hasAddress()) { 45747 for (Address e : element.getAddress()) 45748 composeAddress("address", e); 45749 } 45750 if (element.hasPartOf()) { 45751 composeReference("partOf", element.getPartOf()); 45752 } 45753 if (element.hasContact()) { 45754 for (Organization.OrganizationContactComponent e : element.getContact()) 45755 composeOrganizationOrganizationContactComponent("contact", e); 45756 } 45757 if (element.hasEndpoint()) { 45758 for (Reference e : element.getEndpoint()) 45759 composeReference("endpoint", e); 45760 } 45761 } 45762 45763 protected void composeOrganizationOrganizationContactComponent(String name, 45764 Organization.OrganizationContactComponent element) throws IOException { 45765 if (element != null) { 45766 composeElementAttributes(element); 45767 xml.enter(FHIR_NS, name); 45768 composeOrganizationOrganizationContactComponentElements(element); 45769 composeElementClose(element); 45770 xml.exit(FHIR_NS, name); 45771 } 45772 } 45773 45774 protected void composeOrganizationOrganizationContactComponentElements( 45775 Organization.OrganizationContactComponent element) throws IOException { 45776 composeBackboneElementElements(element); 45777 if (element.hasPurpose()) { 45778 composeCodeableConcept("purpose", element.getPurpose()); 45779 } 45780 if (element.hasName()) { 45781 composeHumanName("name", element.getName()); 45782 } 45783 if (element.hasTelecom()) { 45784 for (ContactPoint e : element.getTelecom()) 45785 composeContactPoint("telecom", e); 45786 } 45787 if (element.hasAddress()) { 45788 composeAddress("address", element.getAddress()); 45789 } 45790 } 45791 45792 protected void composeOrganizationAffiliation(String name, OrganizationAffiliation element) throws IOException { 45793 if (element != null) { 45794 composeDomainResourceAttributes(element); 45795 xml.enter(FHIR_NS, name); 45796 composeOrganizationAffiliationElements(element); 45797 composeElementClose(element); 45798 xml.exit(FHIR_NS, name); 45799 } 45800 } 45801 45802 protected void composeOrganizationAffiliationElements(OrganizationAffiliation element) throws IOException { 45803 composeDomainResourceElements(element); 45804 if (element.hasIdentifier()) { 45805 for (Identifier e : element.getIdentifier()) 45806 composeIdentifier("identifier", e); 45807 } 45808 if (element.hasActiveElement()) { 45809 composeBoolean("active", element.getActiveElement()); 45810 } 45811 if (element.hasPeriod()) { 45812 composePeriod("period", element.getPeriod()); 45813 } 45814 if (element.hasOrganization()) { 45815 composeReference("organization", element.getOrganization()); 45816 } 45817 if (element.hasParticipatingOrganization()) { 45818 composeReference("participatingOrganization", element.getParticipatingOrganization()); 45819 } 45820 if (element.hasNetwork()) { 45821 for (Reference e : element.getNetwork()) 45822 composeReference("network", e); 45823 } 45824 if (element.hasCode()) { 45825 for (CodeableConcept e : element.getCode()) 45826 composeCodeableConcept("code", e); 45827 } 45828 if (element.hasSpecialty()) { 45829 for (CodeableConcept e : element.getSpecialty()) 45830 composeCodeableConcept("specialty", e); 45831 } 45832 if (element.hasLocation()) { 45833 for (Reference e : element.getLocation()) 45834 composeReference("location", e); 45835 } 45836 if (element.hasHealthcareService()) { 45837 for (Reference e : element.getHealthcareService()) 45838 composeReference("healthcareService", e); 45839 } 45840 if (element.hasTelecom()) { 45841 for (ContactPoint e : element.getTelecom()) 45842 composeContactPoint("telecom", e); 45843 } 45844 if (element.hasEndpoint()) { 45845 for (Reference e : element.getEndpoint()) 45846 composeReference("endpoint", e); 45847 } 45848 } 45849 45850 protected void composePatient(String name, Patient element) throws IOException { 45851 if (element != null) { 45852 composeDomainResourceAttributes(element); 45853 xml.enter(FHIR_NS, name); 45854 composePatientElements(element); 45855 composeElementClose(element); 45856 xml.exit(FHIR_NS, name); 45857 } 45858 } 45859 45860 protected void composePatientElements(Patient element) throws IOException { 45861 composeDomainResourceElements(element); 45862 if (element.hasIdentifier()) { 45863 for (Identifier e : element.getIdentifier()) 45864 composeIdentifier("identifier", e); 45865 } 45866 if (element.hasActiveElement()) { 45867 composeBoolean("active", element.getActiveElement()); 45868 } 45869 if (element.hasName()) { 45870 for (HumanName e : element.getName()) 45871 composeHumanName("name", e); 45872 } 45873 if (element.hasTelecom()) { 45874 for (ContactPoint e : element.getTelecom()) 45875 composeContactPoint("telecom", e); 45876 } 45877 if (element.hasGenderElement()) 45878 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 45879 if (element.hasBirthDateElement()) { 45880 composeDate("birthDate", element.getBirthDateElement()); 45881 } 45882 if (element.hasDeceased()) { 45883 composeType("deceased", element.getDeceased()); 45884 } 45885 if (element.hasAddress()) { 45886 for (Address e : element.getAddress()) 45887 composeAddress("address", e); 45888 } 45889 if (element.hasMaritalStatus()) { 45890 composeCodeableConcept("maritalStatus", element.getMaritalStatus()); 45891 } 45892 if (element.hasMultipleBirth()) { 45893 composeType("multipleBirth", element.getMultipleBirth()); 45894 } 45895 if (element.hasPhoto()) { 45896 for (Attachment e : element.getPhoto()) 45897 composeAttachment("photo", e); 45898 } 45899 if (element.hasContact()) { 45900 for (Patient.ContactComponent e : element.getContact()) 45901 composePatientContactComponent("contact", e); 45902 } 45903 if (element.hasCommunication()) { 45904 for (Patient.PatientCommunicationComponent e : element.getCommunication()) 45905 composePatientPatientCommunicationComponent("communication", e); 45906 } 45907 if (element.hasGeneralPractitioner()) { 45908 for (Reference e : element.getGeneralPractitioner()) 45909 composeReference("generalPractitioner", e); 45910 } 45911 if (element.hasManagingOrganization()) { 45912 composeReference("managingOrganization", element.getManagingOrganization()); 45913 } 45914 if (element.hasLink()) { 45915 for (Patient.PatientLinkComponent e : element.getLink()) 45916 composePatientPatientLinkComponent("link", e); 45917 } 45918 } 45919 45920 protected void composePatientContactComponent(String name, Patient.ContactComponent element) throws IOException { 45921 if (element != null) { 45922 composeElementAttributes(element); 45923 xml.enter(FHIR_NS, name); 45924 composePatientContactComponentElements(element); 45925 composeElementClose(element); 45926 xml.exit(FHIR_NS, name); 45927 } 45928 } 45929 45930 protected void composePatientContactComponentElements(Patient.ContactComponent element) throws IOException { 45931 composeBackboneElementElements(element); 45932 if (element.hasRelationship()) { 45933 for (CodeableConcept e : element.getRelationship()) 45934 composeCodeableConcept("relationship", e); 45935 } 45936 if (element.hasName()) { 45937 composeHumanName("name", element.getName()); 45938 } 45939 if (element.hasTelecom()) { 45940 for (ContactPoint e : element.getTelecom()) 45941 composeContactPoint("telecom", e); 45942 } 45943 if (element.hasAddress()) { 45944 composeAddress("address", element.getAddress()); 45945 } 45946 if (element.hasGenderElement()) 45947 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 45948 if (element.hasOrganization()) { 45949 composeReference("organization", element.getOrganization()); 45950 } 45951 if (element.hasPeriod()) { 45952 composePeriod("period", element.getPeriod()); 45953 } 45954 } 45955 45956 protected void composePatientPatientCommunicationComponent(String name, Patient.PatientCommunicationComponent element) 45957 throws IOException { 45958 if (element != null) { 45959 composeElementAttributes(element); 45960 xml.enter(FHIR_NS, name); 45961 composePatientPatientCommunicationComponentElements(element); 45962 composeElementClose(element); 45963 xml.exit(FHIR_NS, name); 45964 } 45965 } 45966 45967 protected void composePatientPatientCommunicationComponentElements(Patient.PatientCommunicationComponent element) 45968 throws IOException { 45969 composeBackboneElementElements(element); 45970 if (element.hasLanguage()) { 45971 composeCodeableConcept("language", element.getLanguage()); 45972 } 45973 if (element.hasPreferredElement()) { 45974 composeBoolean("preferred", element.getPreferredElement()); 45975 } 45976 } 45977 45978 protected void composePatientPatientLinkComponent(String name, Patient.PatientLinkComponent element) 45979 throws IOException { 45980 if (element != null) { 45981 composeElementAttributes(element); 45982 xml.enter(FHIR_NS, name); 45983 composePatientPatientLinkComponentElements(element); 45984 composeElementClose(element); 45985 xml.exit(FHIR_NS, name); 45986 } 45987 } 45988 45989 protected void composePatientPatientLinkComponentElements(Patient.PatientLinkComponent element) throws IOException { 45990 composeBackboneElementElements(element); 45991 if (element.hasOther()) { 45992 composeReference("other", element.getOther()); 45993 } 45994 if (element.hasTypeElement()) 45995 composeEnumeration("type", element.getTypeElement(), new Patient.LinkTypeEnumFactory()); 45996 } 45997 45998 protected void composePaymentNotice(String name, PaymentNotice element) throws IOException { 45999 if (element != null) { 46000 composeDomainResourceAttributes(element); 46001 xml.enter(FHIR_NS, name); 46002 composePaymentNoticeElements(element); 46003 composeElementClose(element); 46004 xml.exit(FHIR_NS, name); 46005 } 46006 } 46007 46008 protected void composePaymentNoticeElements(PaymentNotice element) throws IOException { 46009 composeDomainResourceElements(element); 46010 if (element.hasIdentifier()) { 46011 for (Identifier e : element.getIdentifier()) 46012 composeIdentifier("identifier", e); 46013 } 46014 if (element.hasStatusElement()) 46015 composeEnumeration("status", element.getStatusElement(), new PaymentNotice.PaymentNoticeStatusEnumFactory()); 46016 if (element.hasRequest()) { 46017 composeReference("request", element.getRequest()); 46018 } 46019 if (element.hasResponse()) { 46020 composeReference("response", element.getResponse()); 46021 } 46022 if (element.hasCreatedElement()) { 46023 composeDateTime("created", element.getCreatedElement()); 46024 } 46025 if (element.hasProvider()) { 46026 composeReference("provider", element.getProvider()); 46027 } 46028 if (element.hasPayment()) { 46029 composeReference("payment", element.getPayment()); 46030 } 46031 if (element.hasPaymentDateElement()) { 46032 composeDate("paymentDate", element.getPaymentDateElement()); 46033 } 46034 if (element.hasPayee()) { 46035 composeReference("payee", element.getPayee()); 46036 } 46037 if (element.hasRecipient()) { 46038 composeReference("recipient", element.getRecipient()); 46039 } 46040 if (element.hasAmount()) { 46041 composeMoney("amount", element.getAmount()); 46042 } 46043 if (element.hasPaymentStatus()) { 46044 composeCodeableConcept("paymentStatus", element.getPaymentStatus()); 46045 } 46046 } 46047 46048 protected void composePaymentReconciliation(String name, PaymentReconciliation element) throws IOException { 46049 if (element != null) { 46050 composeDomainResourceAttributes(element); 46051 xml.enter(FHIR_NS, name); 46052 composePaymentReconciliationElements(element); 46053 composeElementClose(element); 46054 xml.exit(FHIR_NS, name); 46055 } 46056 } 46057 46058 protected void composePaymentReconciliationElements(PaymentReconciliation element) throws IOException { 46059 composeDomainResourceElements(element); 46060 if (element.hasIdentifier()) { 46061 for (Identifier e : element.getIdentifier()) 46062 composeIdentifier("identifier", e); 46063 } 46064 if (element.hasStatusElement()) 46065 composeEnumeration("status", element.getStatusElement(), 46066 new PaymentReconciliation.PaymentReconciliationStatusEnumFactory()); 46067 if (element.hasPeriod()) { 46068 composePeriod("period", element.getPeriod()); 46069 } 46070 if (element.hasCreatedElement()) { 46071 composeDateTime("created", element.getCreatedElement()); 46072 } 46073 if (element.hasPaymentIssuer()) { 46074 composeReference("paymentIssuer", element.getPaymentIssuer()); 46075 } 46076 if (element.hasRequest()) { 46077 composeReference("request", element.getRequest()); 46078 } 46079 if (element.hasRequestor()) { 46080 composeReference("requestor", element.getRequestor()); 46081 } 46082 if (element.hasOutcomeElement()) 46083 composeEnumeration("outcome", element.getOutcomeElement(), new Enumerations.RemittanceOutcomeEnumFactory()); 46084 if (element.hasDispositionElement()) { 46085 composeString("disposition", element.getDispositionElement()); 46086 } 46087 if (element.hasPaymentDateElement()) { 46088 composeDate("paymentDate", element.getPaymentDateElement()); 46089 } 46090 if (element.hasPaymentAmount()) { 46091 composeMoney("paymentAmount", element.getPaymentAmount()); 46092 } 46093 if (element.hasPaymentIdentifier()) { 46094 composeIdentifier("paymentIdentifier", element.getPaymentIdentifier()); 46095 } 46096 if (element.hasDetail()) { 46097 for (PaymentReconciliation.DetailsComponent e : element.getDetail()) 46098 composePaymentReconciliationDetailsComponent("detail", e); 46099 } 46100 if (element.hasFormCode()) { 46101 composeCodeableConcept("formCode", element.getFormCode()); 46102 } 46103 if (element.hasProcessNote()) { 46104 for (PaymentReconciliation.NotesComponent e : element.getProcessNote()) 46105 composePaymentReconciliationNotesComponent("processNote", e); 46106 } 46107 } 46108 46109 protected void composePaymentReconciliationDetailsComponent(String name, 46110 PaymentReconciliation.DetailsComponent element) throws IOException { 46111 if (element != null) { 46112 composeElementAttributes(element); 46113 xml.enter(FHIR_NS, name); 46114 composePaymentReconciliationDetailsComponentElements(element); 46115 composeElementClose(element); 46116 xml.exit(FHIR_NS, name); 46117 } 46118 } 46119 46120 protected void composePaymentReconciliationDetailsComponentElements(PaymentReconciliation.DetailsComponent element) 46121 throws IOException { 46122 composeBackboneElementElements(element); 46123 if (element.hasIdentifier()) { 46124 composeIdentifier("identifier", element.getIdentifier()); 46125 } 46126 if (element.hasPredecessor()) { 46127 composeIdentifier("predecessor", element.getPredecessor()); 46128 } 46129 if (element.hasType()) { 46130 composeCodeableConcept("type", element.getType()); 46131 } 46132 if (element.hasRequest()) { 46133 composeReference("request", element.getRequest()); 46134 } 46135 if (element.hasSubmitter()) { 46136 composeReference("submitter", element.getSubmitter()); 46137 } 46138 if (element.hasResponse()) { 46139 composeReference("response", element.getResponse()); 46140 } 46141 if (element.hasDateElement()) { 46142 composeDate("date", element.getDateElement()); 46143 } 46144 if (element.hasResponsible()) { 46145 composeReference("responsible", element.getResponsible()); 46146 } 46147 if (element.hasPayee()) { 46148 composeReference("payee", element.getPayee()); 46149 } 46150 if (element.hasAmount()) { 46151 composeMoney("amount", element.getAmount()); 46152 } 46153 } 46154 46155 protected void composePaymentReconciliationNotesComponent(String name, PaymentReconciliation.NotesComponent element) 46156 throws IOException { 46157 if (element != null) { 46158 composeElementAttributes(element); 46159 xml.enter(FHIR_NS, name); 46160 composePaymentReconciliationNotesComponentElements(element); 46161 composeElementClose(element); 46162 xml.exit(FHIR_NS, name); 46163 } 46164 } 46165 46166 protected void composePaymentReconciliationNotesComponentElements(PaymentReconciliation.NotesComponent element) 46167 throws IOException { 46168 composeBackboneElementElements(element); 46169 if (element.hasTypeElement()) 46170 composeEnumeration("type", element.getTypeElement(), new Enumerations.NoteTypeEnumFactory()); 46171 if (element.hasTextElement()) { 46172 composeString("text", element.getTextElement()); 46173 } 46174 } 46175 46176 protected void composePerson(String name, Person element) throws IOException { 46177 if (element != null) { 46178 composeDomainResourceAttributes(element); 46179 xml.enter(FHIR_NS, name); 46180 composePersonElements(element); 46181 composeElementClose(element); 46182 xml.exit(FHIR_NS, name); 46183 } 46184 } 46185 46186 protected void composePersonElements(Person element) throws IOException { 46187 composeDomainResourceElements(element); 46188 if (element.hasIdentifier()) { 46189 for (Identifier e : element.getIdentifier()) 46190 composeIdentifier("identifier", e); 46191 } 46192 if (element.hasName()) { 46193 for (HumanName e : element.getName()) 46194 composeHumanName("name", e); 46195 } 46196 if (element.hasTelecom()) { 46197 for (ContactPoint e : element.getTelecom()) 46198 composeContactPoint("telecom", e); 46199 } 46200 if (element.hasGenderElement()) 46201 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 46202 if (element.hasBirthDateElement()) { 46203 composeDate("birthDate", element.getBirthDateElement()); 46204 } 46205 if (element.hasAddress()) { 46206 for (Address e : element.getAddress()) 46207 composeAddress("address", e); 46208 } 46209 if (element.hasPhoto()) { 46210 composeAttachment("photo", element.getPhoto()); 46211 } 46212 if (element.hasManagingOrganization()) { 46213 composeReference("managingOrganization", element.getManagingOrganization()); 46214 } 46215 if (element.hasActiveElement()) { 46216 composeBoolean("active", element.getActiveElement()); 46217 } 46218 if (element.hasLink()) { 46219 for (Person.PersonLinkComponent e : element.getLink()) 46220 composePersonPersonLinkComponent("link", e); 46221 } 46222 } 46223 46224 protected void composePersonPersonLinkComponent(String name, Person.PersonLinkComponent element) throws IOException { 46225 if (element != null) { 46226 composeElementAttributes(element); 46227 xml.enter(FHIR_NS, name); 46228 composePersonPersonLinkComponentElements(element); 46229 composeElementClose(element); 46230 xml.exit(FHIR_NS, name); 46231 } 46232 } 46233 46234 protected void composePersonPersonLinkComponentElements(Person.PersonLinkComponent element) throws IOException { 46235 composeBackboneElementElements(element); 46236 if (element.hasTarget()) { 46237 composeReference("target", element.getTarget()); 46238 } 46239 if (element.hasAssuranceElement()) 46240 composeEnumeration("assurance", element.getAssuranceElement(), new Person.IdentityAssuranceLevelEnumFactory()); 46241 } 46242 46243 protected void composePlanDefinition(String name, PlanDefinition element) throws IOException { 46244 if (element != null) { 46245 composeDomainResourceAttributes(element); 46246 xml.enter(FHIR_NS, name); 46247 composePlanDefinitionElements(element); 46248 composeElementClose(element); 46249 xml.exit(FHIR_NS, name); 46250 } 46251 } 46252 46253 protected void composePlanDefinitionElements(PlanDefinition element) throws IOException { 46254 composeDomainResourceElements(element); 46255 if (element.hasUrlElement()) { 46256 composeUri("url", element.getUrlElement()); 46257 } 46258 if (element.hasIdentifier()) { 46259 for (Identifier e : element.getIdentifier()) 46260 composeIdentifier("identifier", e); 46261 } 46262 if (element.hasVersionElement()) { 46263 composeString("version", element.getVersionElement()); 46264 } 46265 if (element.hasNameElement()) { 46266 composeString("name", element.getNameElement()); 46267 } 46268 if (element.hasTitleElement()) { 46269 composeString("title", element.getTitleElement()); 46270 } 46271 if (element.hasSubtitleElement()) { 46272 composeString("subtitle", element.getSubtitleElement()); 46273 } 46274 if (element.hasType()) { 46275 composeCodeableConcept("type", element.getType()); 46276 } 46277 if (element.hasStatusElement()) 46278 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 46279 if (element.hasExperimentalElement()) { 46280 composeBoolean("experimental", element.getExperimentalElement()); 46281 } 46282 if (element.hasSubject()) { 46283 composeType("subject", element.getSubject()); 46284 } 46285 if (element.hasDateElement()) { 46286 composeDateTime("date", element.getDateElement()); 46287 } 46288 if (element.hasPublisherElement()) { 46289 composeString("publisher", element.getPublisherElement()); 46290 } 46291 if (element.hasContact()) { 46292 for (ContactDetail e : element.getContact()) 46293 composeContactDetail("contact", e); 46294 } 46295 if (element.hasDescriptionElement()) { 46296 composeMarkdown("description", element.getDescriptionElement()); 46297 } 46298 if (element.hasUseContext()) { 46299 for (UsageContext e : element.getUseContext()) 46300 composeUsageContext("useContext", e); 46301 } 46302 if (element.hasJurisdiction()) { 46303 for (CodeableConcept e : element.getJurisdiction()) 46304 composeCodeableConcept("jurisdiction", e); 46305 } 46306 if (element.hasPurposeElement()) { 46307 composeMarkdown("purpose", element.getPurposeElement()); 46308 } 46309 if (element.hasUsageElement()) { 46310 composeString("usage", element.getUsageElement()); 46311 } 46312 if (element.hasCopyrightElement()) { 46313 composeMarkdown("copyright", element.getCopyrightElement()); 46314 } 46315 if (element.hasApprovalDateElement()) { 46316 composeDate("approvalDate", element.getApprovalDateElement()); 46317 } 46318 if (element.hasLastReviewDateElement()) { 46319 composeDate("lastReviewDate", element.getLastReviewDateElement()); 46320 } 46321 if (element.hasEffectivePeriod()) { 46322 composePeriod("effectivePeriod", element.getEffectivePeriod()); 46323 } 46324 if (element.hasTopic()) { 46325 for (CodeableConcept e : element.getTopic()) 46326 composeCodeableConcept("topic", e); 46327 } 46328 if (element.hasAuthor()) { 46329 for (ContactDetail e : element.getAuthor()) 46330 composeContactDetail("author", e); 46331 } 46332 if (element.hasEditor()) { 46333 for (ContactDetail e : element.getEditor()) 46334 composeContactDetail("editor", e); 46335 } 46336 if (element.hasReviewer()) { 46337 for (ContactDetail e : element.getReviewer()) 46338 composeContactDetail("reviewer", e); 46339 } 46340 if (element.hasEndorser()) { 46341 for (ContactDetail e : element.getEndorser()) 46342 composeContactDetail("endorser", e); 46343 } 46344 if (element.hasRelatedArtifact()) { 46345 for (RelatedArtifact e : element.getRelatedArtifact()) 46346 composeRelatedArtifact("relatedArtifact", e); 46347 } 46348 if (element.hasLibrary()) { 46349 for (CanonicalType e : element.getLibrary()) 46350 composeCanonical("library", e); 46351 } 46352 if (element.hasGoal()) { 46353 for (PlanDefinition.PlanDefinitionGoalComponent e : element.getGoal()) 46354 composePlanDefinitionPlanDefinitionGoalComponent("goal", e); 46355 } 46356 if (element.hasAction()) { 46357 for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) 46358 composePlanDefinitionPlanDefinitionActionComponent("action", e); 46359 } 46360 } 46361 46362 protected void composePlanDefinitionPlanDefinitionGoalComponent(String name, 46363 PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { 46364 if (element != null) { 46365 composeElementAttributes(element); 46366 xml.enter(FHIR_NS, name); 46367 composePlanDefinitionPlanDefinitionGoalComponentElements(element); 46368 composeElementClose(element); 46369 xml.exit(FHIR_NS, name); 46370 } 46371 } 46372 46373 protected void composePlanDefinitionPlanDefinitionGoalComponentElements( 46374 PlanDefinition.PlanDefinitionGoalComponent element) throws IOException { 46375 composeBackboneElementElements(element); 46376 if (element.hasCategory()) { 46377 composeCodeableConcept("category", element.getCategory()); 46378 } 46379 if (element.hasDescription()) { 46380 composeCodeableConcept("description", element.getDescription()); 46381 } 46382 if (element.hasPriority()) { 46383 composeCodeableConcept("priority", element.getPriority()); 46384 } 46385 if (element.hasStart()) { 46386 composeCodeableConcept("start", element.getStart()); 46387 } 46388 if (element.hasAddresses()) { 46389 for (CodeableConcept e : element.getAddresses()) 46390 composeCodeableConcept("addresses", e); 46391 } 46392 if (element.hasDocumentation()) { 46393 for (RelatedArtifact e : element.getDocumentation()) 46394 composeRelatedArtifact("documentation", e); 46395 } 46396 if (element.hasTarget()) { 46397 for (PlanDefinition.PlanDefinitionGoalTargetComponent e : element.getTarget()) 46398 composePlanDefinitionPlanDefinitionGoalTargetComponent("target", e); 46399 } 46400 } 46401 46402 protected void composePlanDefinitionPlanDefinitionGoalTargetComponent(String name, 46403 PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { 46404 if (element != null) { 46405 composeElementAttributes(element); 46406 xml.enter(FHIR_NS, name); 46407 composePlanDefinitionPlanDefinitionGoalTargetComponentElements(element); 46408 composeElementClose(element); 46409 xml.exit(FHIR_NS, name); 46410 } 46411 } 46412 46413 protected void composePlanDefinitionPlanDefinitionGoalTargetComponentElements( 46414 PlanDefinition.PlanDefinitionGoalTargetComponent element) throws IOException { 46415 composeBackboneElementElements(element); 46416 if (element.hasMeasure()) { 46417 composeCodeableConcept("measure", element.getMeasure()); 46418 } 46419 if (element.hasDetail()) { 46420 composeType("detail", element.getDetail()); 46421 } 46422 if (element.hasDue()) { 46423 composeDuration("due", element.getDue()); 46424 } 46425 } 46426 46427 protected void composePlanDefinitionPlanDefinitionActionComponent(String name, 46428 PlanDefinition.PlanDefinitionActionComponent element) throws IOException { 46429 if (element != null) { 46430 composeElementAttributes(element); 46431 xml.enter(FHIR_NS, name); 46432 composePlanDefinitionPlanDefinitionActionComponentElements(element); 46433 composeElementClose(element); 46434 xml.exit(FHIR_NS, name); 46435 } 46436 } 46437 46438 protected void composePlanDefinitionPlanDefinitionActionComponentElements( 46439 PlanDefinition.PlanDefinitionActionComponent element) throws IOException { 46440 composeBackboneElementElements(element); 46441 if (element.hasPrefixElement()) { 46442 composeString("prefix", element.getPrefixElement()); 46443 } 46444 if (element.hasTitleElement()) { 46445 composeString("title", element.getTitleElement()); 46446 } 46447 if (element.hasDescriptionElement()) { 46448 composeString("description", element.getDescriptionElement()); 46449 } 46450 if (element.hasTextEquivalentElement()) { 46451 composeString("textEquivalent", element.getTextEquivalentElement()); 46452 } 46453 if (element.hasPriorityElement()) 46454 composeEnumeration("priority", element.getPriorityElement(), new PlanDefinition.RequestPriorityEnumFactory()); 46455 if (element.hasCode()) { 46456 for (CodeableConcept e : element.getCode()) 46457 composeCodeableConcept("code", e); 46458 } 46459 if (element.hasReason()) { 46460 for (CodeableConcept e : element.getReason()) 46461 composeCodeableConcept("reason", e); 46462 } 46463 if (element.hasDocumentation()) { 46464 for (RelatedArtifact e : element.getDocumentation()) 46465 composeRelatedArtifact("documentation", e); 46466 } 46467 if (element.hasGoalId()) { 46468 for (IdType e : element.getGoalId()) 46469 composeId("goalId", e); 46470 } 46471 if (element.hasSubject()) { 46472 composeType("subject", element.getSubject()); 46473 } 46474 if (element.hasTrigger()) { 46475 for (TriggerDefinition e : element.getTrigger()) 46476 composeTriggerDefinition("trigger", e); 46477 } 46478 if (element.hasCondition()) { 46479 for (PlanDefinition.PlanDefinitionActionConditionComponent e : element.getCondition()) 46480 composePlanDefinitionPlanDefinitionActionConditionComponent("condition", e); 46481 } 46482 if (element.hasInput()) { 46483 for (DataRequirement e : element.getInput()) 46484 composeDataRequirement("input", e); 46485 } 46486 if (element.hasOutput()) { 46487 for (DataRequirement e : element.getOutput()) 46488 composeDataRequirement("output", e); 46489 } 46490 if (element.hasRelatedAction()) { 46491 for (PlanDefinition.PlanDefinitionActionRelatedActionComponent e : element.getRelatedAction()) 46492 composePlanDefinitionPlanDefinitionActionRelatedActionComponent("relatedAction", e); 46493 } 46494 if (element.hasTiming()) { 46495 composeType("timing", element.getTiming()); 46496 } 46497 if (element.hasParticipant()) { 46498 for (PlanDefinition.PlanDefinitionActionParticipantComponent e : element.getParticipant()) 46499 composePlanDefinitionPlanDefinitionActionParticipantComponent("participant", e); 46500 } 46501 if (element.hasType()) { 46502 composeCodeableConcept("type", element.getType()); 46503 } 46504 if (element.hasGroupingBehaviorElement()) 46505 composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), 46506 new PlanDefinition.ActionGroupingBehaviorEnumFactory()); 46507 if (element.hasSelectionBehaviorElement()) 46508 composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), 46509 new PlanDefinition.ActionSelectionBehaviorEnumFactory()); 46510 if (element.hasRequiredBehaviorElement()) 46511 composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), 46512 new PlanDefinition.ActionRequiredBehaviorEnumFactory()); 46513 if (element.hasPrecheckBehaviorElement()) 46514 composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), 46515 new PlanDefinition.ActionPrecheckBehaviorEnumFactory()); 46516 if (element.hasCardinalityBehaviorElement()) 46517 composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), 46518 new PlanDefinition.ActionCardinalityBehaviorEnumFactory()); 46519 if (element.hasDefinition()) { 46520 composeType("definition", element.getDefinition()); 46521 } 46522 if (element.hasTransformElement()) { 46523 composeCanonical("transform", element.getTransformElement()); 46524 } 46525 if (element.hasDynamicValue()) { 46526 for (PlanDefinition.PlanDefinitionActionDynamicValueComponent e : element.getDynamicValue()) 46527 composePlanDefinitionPlanDefinitionActionDynamicValueComponent("dynamicValue", e); 46528 } 46529 if (element.hasAction()) { 46530 for (PlanDefinition.PlanDefinitionActionComponent e : element.getAction()) 46531 composePlanDefinitionPlanDefinitionActionComponent("action", e); 46532 } 46533 } 46534 46535 protected void composePlanDefinitionPlanDefinitionActionConditionComponent(String name, 46536 PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { 46537 if (element != null) { 46538 composeElementAttributes(element); 46539 xml.enter(FHIR_NS, name); 46540 composePlanDefinitionPlanDefinitionActionConditionComponentElements(element); 46541 composeElementClose(element); 46542 xml.exit(FHIR_NS, name); 46543 } 46544 } 46545 46546 protected void composePlanDefinitionPlanDefinitionActionConditionComponentElements( 46547 PlanDefinition.PlanDefinitionActionConditionComponent element) throws IOException { 46548 composeBackboneElementElements(element); 46549 if (element.hasKindElement()) 46550 composeEnumeration("kind", element.getKindElement(), new PlanDefinition.ActionConditionKindEnumFactory()); 46551 if (element.hasExpression()) { 46552 composeExpression("expression", element.getExpression()); 46553 } 46554 } 46555 46556 protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponent(String name, 46557 PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { 46558 if (element != null) { 46559 composeElementAttributes(element); 46560 xml.enter(FHIR_NS, name); 46561 composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements(element); 46562 composeElementClose(element); 46563 xml.exit(FHIR_NS, name); 46564 } 46565 } 46566 46567 protected void composePlanDefinitionPlanDefinitionActionRelatedActionComponentElements( 46568 PlanDefinition.PlanDefinitionActionRelatedActionComponent element) throws IOException { 46569 composeBackboneElementElements(element); 46570 if (element.hasActionIdElement()) { 46571 composeId("actionId", element.getActionIdElement()); 46572 } 46573 if (element.hasRelationshipElement()) 46574 composeEnumeration("relationship", element.getRelationshipElement(), 46575 new PlanDefinition.ActionRelationshipTypeEnumFactory()); 46576 if (element.hasOffset()) { 46577 composeType("offset", element.getOffset()); 46578 } 46579 } 46580 46581 protected void composePlanDefinitionPlanDefinitionActionParticipantComponent(String name, 46582 PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { 46583 if (element != null) { 46584 composeElementAttributes(element); 46585 xml.enter(FHIR_NS, name); 46586 composePlanDefinitionPlanDefinitionActionParticipantComponentElements(element); 46587 composeElementClose(element); 46588 xml.exit(FHIR_NS, name); 46589 } 46590 } 46591 46592 protected void composePlanDefinitionPlanDefinitionActionParticipantComponentElements( 46593 PlanDefinition.PlanDefinitionActionParticipantComponent element) throws IOException { 46594 composeBackboneElementElements(element); 46595 if (element.hasTypeElement()) 46596 composeEnumeration("type", element.getTypeElement(), new PlanDefinition.ActionParticipantTypeEnumFactory()); 46597 if (element.hasRole()) { 46598 composeCodeableConcept("role", element.getRole()); 46599 } 46600 } 46601 46602 protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponent(String name, 46603 PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { 46604 if (element != null) { 46605 composeElementAttributes(element); 46606 xml.enter(FHIR_NS, name); 46607 composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements(element); 46608 composeElementClose(element); 46609 xml.exit(FHIR_NS, name); 46610 } 46611 } 46612 46613 protected void composePlanDefinitionPlanDefinitionActionDynamicValueComponentElements( 46614 PlanDefinition.PlanDefinitionActionDynamicValueComponent element) throws IOException { 46615 composeBackboneElementElements(element); 46616 if (element.hasPathElement()) { 46617 composeString("path", element.getPathElement()); 46618 } 46619 if (element.hasExpression()) { 46620 composeExpression("expression", element.getExpression()); 46621 } 46622 } 46623 46624 protected void composePractitioner(String name, Practitioner element) throws IOException { 46625 if (element != null) { 46626 composeDomainResourceAttributes(element); 46627 xml.enter(FHIR_NS, name); 46628 composePractitionerElements(element); 46629 composeElementClose(element); 46630 xml.exit(FHIR_NS, name); 46631 } 46632 } 46633 46634 protected void composePractitionerElements(Practitioner element) throws IOException { 46635 composeDomainResourceElements(element); 46636 if (element.hasIdentifier()) { 46637 for (Identifier e : element.getIdentifier()) 46638 composeIdentifier("identifier", e); 46639 } 46640 if (element.hasActiveElement()) { 46641 composeBoolean("active", element.getActiveElement()); 46642 } 46643 if (element.hasName()) { 46644 for (HumanName e : element.getName()) 46645 composeHumanName("name", e); 46646 } 46647 if (element.hasTelecom()) { 46648 for (ContactPoint e : element.getTelecom()) 46649 composeContactPoint("telecom", e); 46650 } 46651 if (element.hasAddress()) { 46652 for (Address e : element.getAddress()) 46653 composeAddress("address", e); 46654 } 46655 if (element.hasGenderElement()) 46656 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 46657 if (element.hasBirthDateElement()) { 46658 composeDate("birthDate", element.getBirthDateElement()); 46659 } 46660 if (element.hasPhoto()) { 46661 for (Attachment e : element.getPhoto()) 46662 composeAttachment("photo", e); 46663 } 46664 if (element.hasQualification()) { 46665 for (Practitioner.PractitionerQualificationComponent e : element.getQualification()) 46666 composePractitionerPractitionerQualificationComponent("qualification", e); 46667 } 46668 if (element.hasCommunication()) { 46669 for (CodeableConcept e : element.getCommunication()) 46670 composeCodeableConcept("communication", e); 46671 } 46672 } 46673 46674 protected void composePractitionerPractitionerQualificationComponent(String name, 46675 Practitioner.PractitionerQualificationComponent element) throws IOException { 46676 if (element != null) { 46677 composeElementAttributes(element); 46678 xml.enter(FHIR_NS, name); 46679 composePractitionerPractitionerQualificationComponentElements(element); 46680 composeElementClose(element); 46681 xml.exit(FHIR_NS, name); 46682 } 46683 } 46684 46685 protected void composePractitionerPractitionerQualificationComponentElements( 46686 Practitioner.PractitionerQualificationComponent element) throws IOException { 46687 composeBackboneElementElements(element); 46688 if (element.hasIdentifier()) { 46689 for (Identifier e : element.getIdentifier()) 46690 composeIdentifier("identifier", e); 46691 } 46692 if (element.hasCode()) { 46693 composeCodeableConcept("code", element.getCode()); 46694 } 46695 if (element.hasPeriod()) { 46696 composePeriod("period", element.getPeriod()); 46697 } 46698 if (element.hasIssuer()) { 46699 composeReference("issuer", element.getIssuer()); 46700 } 46701 } 46702 46703 protected void composePractitionerRole(String name, PractitionerRole element) throws IOException { 46704 if (element != null) { 46705 composeDomainResourceAttributes(element); 46706 xml.enter(FHIR_NS, name); 46707 composePractitionerRoleElements(element); 46708 composeElementClose(element); 46709 xml.exit(FHIR_NS, name); 46710 } 46711 } 46712 46713 protected void composePractitionerRoleElements(PractitionerRole element) throws IOException { 46714 composeDomainResourceElements(element); 46715 if (element.hasIdentifier()) { 46716 for (Identifier e : element.getIdentifier()) 46717 composeIdentifier("identifier", e); 46718 } 46719 if (element.hasActiveElement()) { 46720 composeBoolean("active", element.getActiveElement()); 46721 } 46722 if (element.hasPeriod()) { 46723 composePeriod("period", element.getPeriod()); 46724 } 46725 if (element.hasPractitioner()) { 46726 composeReference("practitioner", element.getPractitioner()); 46727 } 46728 if (element.hasOrganization()) { 46729 composeReference("organization", element.getOrganization()); 46730 } 46731 if (element.hasCode()) { 46732 for (CodeableConcept e : element.getCode()) 46733 composeCodeableConcept("code", e); 46734 } 46735 if (element.hasSpecialty()) { 46736 for (CodeableConcept e : element.getSpecialty()) 46737 composeCodeableConcept("specialty", e); 46738 } 46739 if (element.hasLocation()) { 46740 for (Reference e : element.getLocation()) 46741 composeReference("location", e); 46742 } 46743 if (element.hasHealthcareService()) { 46744 for (Reference e : element.getHealthcareService()) 46745 composeReference("healthcareService", e); 46746 } 46747 if (element.hasTelecom()) { 46748 for (ContactPoint e : element.getTelecom()) 46749 composeContactPoint("telecom", e); 46750 } 46751 if (element.hasAvailableTime()) { 46752 for (PractitionerRole.PractitionerRoleAvailableTimeComponent e : element.getAvailableTime()) 46753 composePractitionerRolePractitionerRoleAvailableTimeComponent("availableTime", e); 46754 } 46755 if (element.hasNotAvailable()) { 46756 for (PractitionerRole.PractitionerRoleNotAvailableComponent e : element.getNotAvailable()) 46757 composePractitionerRolePractitionerRoleNotAvailableComponent("notAvailable", e); 46758 } 46759 if (element.hasAvailabilityExceptionsElement()) { 46760 composeString("availabilityExceptions", element.getAvailabilityExceptionsElement()); 46761 } 46762 if (element.hasEndpoint()) { 46763 for (Reference e : element.getEndpoint()) 46764 composeReference("endpoint", e); 46765 } 46766 } 46767 46768 protected void composePractitionerRolePractitionerRoleAvailableTimeComponent(String name, 46769 PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { 46770 if (element != null) { 46771 composeElementAttributes(element); 46772 xml.enter(FHIR_NS, name); 46773 composePractitionerRolePractitionerRoleAvailableTimeComponentElements(element); 46774 composeElementClose(element); 46775 xml.exit(FHIR_NS, name); 46776 } 46777 } 46778 46779 protected void composePractitionerRolePractitionerRoleAvailableTimeComponentElements( 46780 PractitionerRole.PractitionerRoleAvailableTimeComponent element) throws IOException { 46781 composeBackboneElementElements(element); 46782 if (element.hasDaysOfWeek()) 46783 for (Enumeration<PractitionerRole.DaysOfWeek> e : element.getDaysOfWeek()) 46784 composeEnumeration("daysOfWeek", e, new PractitionerRole.DaysOfWeekEnumFactory()); 46785 if (element.hasAllDayElement()) { 46786 composeBoolean("allDay", element.getAllDayElement()); 46787 } 46788 if (element.hasAvailableStartTimeElement()) { 46789 composeTime("availableStartTime", element.getAvailableStartTimeElement()); 46790 } 46791 if (element.hasAvailableEndTimeElement()) { 46792 composeTime("availableEndTime", element.getAvailableEndTimeElement()); 46793 } 46794 } 46795 46796 protected void composePractitionerRolePractitionerRoleNotAvailableComponent(String name, 46797 PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { 46798 if (element != null) { 46799 composeElementAttributes(element); 46800 xml.enter(FHIR_NS, name); 46801 composePractitionerRolePractitionerRoleNotAvailableComponentElements(element); 46802 composeElementClose(element); 46803 xml.exit(FHIR_NS, name); 46804 } 46805 } 46806 46807 protected void composePractitionerRolePractitionerRoleNotAvailableComponentElements( 46808 PractitionerRole.PractitionerRoleNotAvailableComponent element) throws IOException { 46809 composeBackboneElementElements(element); 46810 if (element.hasDescriptionElement()) { 46811 composeString("description", element.getDescriptionElement()); 46812 } 46813 if (element.hasDuring()) { 46814 composePeriod("during", element.getDuring()); 46815 } 46816 } 46817 46818 protected void composeProcedure(String name, Procedure element) throws IOException { 46819 if (element != null) { 46820 composeDomainResourceAttributes(element); 46821 xml.enter(FHIR_NS, name); 46822 composeProcedureElements(element); 46823 composeElementClose(element); 46824 xml.exit(FHIR_NS, name); 46825 } 46826 } 46827 46828 protected void composeProcedureElements(Procedure element) throws IOException { 46829 composeDomainResourceElements(element); 46830 if (element.hasIdentifier()) { 46831 for (Identifier e : element.getIdentifier()) 46832 composeIdentifier("identifier", e); 46833 } 46834 if (element.hasInstantiatesCanonical()) { 46835 for (CanonicalType e : element.getInstantiatesCanonical()) 46836 composeCanonical("instantiatesCanonical", e); 46837 } 46838 if (element.hasInstantiatesUri()) { 46839 for (UriType e : element.getInstantiatesUri()) 46840 composeUri("instantiatesUri", e); 46841 } 46842 if (element.hasBasedOn()) { 46843 for (Reference e : element.getBasedOn()) 46844 composeReference("basedOn", e); 46845 } 46846 if (element.hasPartOf()) { 46847 for (Reference e : element.getPartOf()) 46848 composeReference("partOf", e); 46849 } 46850 if (element.hasStatusElement()) 46851 composeEnumeration("status", element.getStatusElement(), new Procedure.ProcedureStatusEnumFactory()); 46852 if (element.hasStatusReason()) { 46853 composeCodeableConcept("statusReason", element.getStatusReason()); 46854 } 46855 if (element.hasCategory()) { 46856 composeCodeableConcept("category", element.getCategory()); 46857 } 46858 if (element.hasCode()) { 46859 composeCodeableConcept("code", element.getCode()); 46860 } 46861 if (element.hasSubject()) { 46862 composeReference("subject", element.getSubject()); 46863 } 46864 if (element.hasEncounter()) { 46865 composeReference("encounter", element.getEncounter()); 46866 } 46867 if (element.hasPerformed()) { 46868 composeType("performed", element.getPerformed()); 46869 } 46870 if (element.hasRecorder()) { 46871 composeReference("recorder", element.getRecorder()); 46872 } 46873 if (element.hasAsserter()) { 46874 composeReference("asserter", element.getAsserter()); 46875 } 46876 if (element.hasPerformer()) { 46877 for (Procedure.ProcedurePerformerComponent e : element.getPerformer()) 46878 composeProcedureProcedurePerformerComponent("performer", e); 46879 } 46880 if (element.hasLocation()) { 46881 composeReference("location", element.getLocation()); 46882 } 46883 if (element.hasReasonCode()) { 46884 for (CodeableConcept e : element.getReasonCode()) 46885 composeCodeableConcept("reasonCode", e); 46886 } 46887 if (element.hasReasonReference()) { 46888 for (Reference e : element.getReasonReference()) 46889 composeReference("reasonReference", e); 46890 } 46891 if (element.hasBodySite()) { 46892 for (CodeableConcept e : element.getBodySite()) 46893 composeCodeableConcept("bodySite", e); 46894 } 46895 if (element.hasOutcome()) { 46896 composeCodeableConcept("outcome", element.getOutcome()); 46897 } 46898 if (element.hasReport()) { 46899 for (Reference e : element.getReport()) 46900 composeReference("report", e); 46901 } 46902 if (element.hasComplication()) { 46903 for (CodeableConcept e : element.getComplication()) 46904 composeCodeableConcept("complication", e); 46905 } 46906 if (element.hasComplicationDetail()) { 46907 for (Reference e : element.getComplicationDetail()) 46908 composeReference("complicationDetail", e); 46909 } 46910 if (element.hasFollowUp()) { 46911 for (CodeableConcept e : element.getFollowUp()) 46912 composeCodeableConcept("followUp", e); 46913 } 46914 if (element.hasNote()) { 46915 for (Annotation e : element.getNote()) 46916 composeAnnotation("note", e); 46917 } 46918 if (element.hasFocalDevice()) { 46919 for (Procedure.ProcedureFocalDeviceComponent e : element.getFocalDevice()) 46920 composeProcedureProcedureFocalDeviceComponent("focalDevice", e); 46921 } 46922 if (element.hasUsedReference()) { 46923 for (Reference e : element.getUsedReference()) 46924 composeReference("usedReference", e); 46925 } 46926 if (element.hasUsedCode()) { 46927 for (CodeableConcept e : element.getUsedCode()) 46928 composeCodeableConcept("usedCode", e); 46929 } 46930 } 46931 46932 protected void composeProcedureProcedurePerformerComponent(String name, Procedure.ProcedurePerformerComponent element) 46933 throws IOException { 46934 if (element != null) { 46935 composeElementAttributes(element); 46936 xml.enter(FHIR_NS, name); 46937 composeProcedureProcedurePerformerComponentElements(element); 46938 composeElementClose(element); 46939 xml.exit(FHIR_NS, name); 46940 } 46941 } 46942 46943 protected void composeProcedureProcedurePerformerComponentElements(Procedure.ProcedurePerformerComponent element) 46944 throws IOException { 46945 composeBackboneElementElements(element); 46946 if (element.hasFunction()) { 46947 composeCodeableConcept("function", element.getFunction()); 46948 } 46949 if (element.hasActor()) { 46950 composeReference("actor", element.getActor()); 46951 } 46952 if (element.hasOnBehalfOf()) { 46953 composeReference("onBehalfOf", element.getOnBehalfOf()); 46954 } 46955 } 46956 46957 protected void composeProcedureProcedureFocalDeviceComponent(String name, 46958 Procedure.ProcedureFocalDeviceComponent element) throws IOException { 46959 if (element != null) { 46960 composeElementAttributes(element); 46961 xml.enter(FHIR_NS, name); 46962 composeProcedureProcedureFocalDeviceComponentElements(element); 46963 composeElementClose(element); 46964 xml.exit(FHIR_NS, name); 46965 } 46966 } 46967 46968 protected void composeProcedureProcedureFocalDeviceComponentElements(Procedure.ProcedureFocalDeviceComponent element) 46969 throws IOException { 46970 composeBackboneElementElements(element); 46971 if (element.hasAction()) { 46972 composeCodeableConcept("action", element.getAction()); 46973 } 46974 if (element.hasManipulated()) { 46975 composeReference("manipulated", element.getManipulated()); 46976 } 46977 } 46978 46979 protected void composeProvenance(String name, Provenance element) throws IOException { 46980 if (element != null) { 46981 composeDomainResourceAttributes(element); 46982 xml.enter(FHIR_NS, name); 46983 composeProvenanceElements(element); 46984 composeElementClose(element); 46985 xml.exit(FHIR_NS, name); 46986 } 46987 } 46988 46989 protected void composeProvenanceElements(Provenance element) throws IOException { 46990 composeDomainResourceElements(element); 46991 if (element.hasTarget()) { 46992 for (Reference e : element.getTarget()) 46993 composeReference("target", e); 46994 } 46995 if (element.hasOccurred()) { 46996 composeType("occurred", element.getOccurred()); 46997 } 46998 if (element.hasRecordedElement()) { 46999 composeInstant("recorded", element.getRecordedElement()); 47000 } 47001 if (element.hasPolicy()) { 47002 for (UriType e : element.getPolicy()) 47003 composeUri("policy", e); 47004 } 47005 if (element.hasLocation()) { 47006 composeReference("location", element.getLocation()); 47007 } 47008 if (element.hasReason()) { 47009 for (CodeableConcept e : element.getReason()) 47010 composeCodeableConcept("reason", e); 47011 } 47012 if (element.hasActivity()) { 47013 composeCodeableConcept("activity", element.getActivity()); 47014 } 47015 if (element.hasAgent()) { 47016 for (Provenance.ProvenanceAgentComponent e : element.getAgent()) 47017 composeProvenanceProvenanceAgentComponent("agent", e); 47018 } 47019 if (element.hasEntity()) { 47020 for (Provenance.ProvenanceEntityComponent e : element.getEntity()) 47021 composeProvenanceProvenanceEntityComponent("entity", e); 47022 } 47023 if (element.hasSignature()) { 47024 for (Signature e : element.getSignature()) 47025 composeSignature("signature", e); 47026 } 47027 } 47028 47029 protected void composeProvenanceProvenanceAgentComponent(String name, Provenance.ProvenanceAgentComponent element) 47030 throws IOException { 47031 if (element != null) { 47032 composeElementAttributes(element); 47033 xml.enter(FHIR_NS, name); 47034 composeProvenanceProvenanceAgentComponentElements(element); 47035 composeElementClose(element); 47036 xml.exit(FHIR_NS, name); 47037 } 47038 } 47039 47040 protected void composeProvenanceProvenanceAgentComponentElements(Provenance.ProvenanceAgentComponent element) 47041 throws IOException { 47042 composeBackboneElementElements(element); 47043 if (element.hasType()) { 47044 composeCodeableConcept("type", element.getType()); 47045 } 47046 if (element.hasRole()) { 47047 for (CodeableConcept e : element.getRole()) 47048 composeCodeableConcept("role", e); 47049 } 47050 if (element.hasWho()) { 47051 composeReference("who", element.getWho()); 47052 } 47053 if (element.hasOnBehalfOf()) { 47054 composeReference("onBehalfOf", element.getOnBehalfOf()); 47055 } 47056 } 47057 47058 protected void composeProvenanceProvenanceEntityComponent(String name, Provenance.ProvenanceEntityComponent element) 47059 throws IOException { 47060 if (element != null) { 47061 composeElementAttributes(element); 47062 xml.enter(FHIR_NS, name); 47063 composeProvenanceProvenanceEntityComponentElements(element); 47064 composeElementClose(element); 47065 xml.exit(FHIR_NS, name); 47066 } 47067 } 47068 47069 protected void composeProvenanceProvenanceEntityComponentElements(Provenance.ProvenanceEntityComponent element) 47070 throws IOException { 47071 composeBackboneElementElements(element); 47072 if (element.hasRoleElement()) 47073 composeEnumeration("role", element.getRoleElement(), new Provenance.ProvenanceEntityRoleEnumFactory()); 47074 if (element.hasWhat()) { 47075 composeReference("what", element.getWhat()); 47076 } 47077 if (element.hasAgent()) { 47078 for (Provenance.ProvenanceAgentComponent e : element.getAgent()) 47079 composeProvenanceProvenanceAgentComponent("agent", e); 47080 } 47081 } 47082 47083 protected void composeQuestionnaire(String name, Questionnaire element) throws IOException { 47084 if (element != null) { 47085 composeDomainResourceAttributes(element); 47086 xml.enter(FHIR_NS, name); 47087 composeQuestionnaireElements(element); 47088 composeElementClose(element); 47089 xml.exit(FHIR_NS, name); 47090 } 47091 } 47092 47093 protected void composeQuestionnaireElements(Questionnaire element) throws IOException { 47094 composeDomainResourceElements(element); 47095 if (element.hasUrlElement()) { 47096 composeUri("url", element.getUrlElement()); 47097 } 47098 if (element.hasIdentifier()) { 47099 for (Identifier e : element.getIdentifier()) 47100 composeIdentifier("identifier", e); 47101 } 47102 if (element.hasVersionElement()) { 47103 composeString("version", element.getVersionElement()); 47104 } 47105 if (element.hasNameElement()) { 47106 composeString("name", element.getNameElement()); 47107 } 47108 if (element.hasTitleElement()) { 47109 composeString("title", element.getTitleElement()); 47110 } 47111 if (element.hasDerivedFrom()) { 47112 for (CanonicalType e : element.getDerivedFrom()) 47113 composeCanonical("derivedFrom", e); 47114 } 47115 if (element.hasStatusElement()) 47116 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 47117 if (element.hasExperimentalElement()) { 47118 composeBoolean("experimental", element.getExperimentalElement()); 47119 } 47120 if (element.hasSubjectType()) { 47121 for (CodeType e : element.getSubjectType()) 47122 composeCode("subjectType", e); 47123 } 47124 if (element.hasDateElement()) { 47125 composeDateTime("date", element.getDateElement()); 47126 } 47127 if (element.hasPublisherElement()) { 47128 composeString("publisher", element.getPublisherElement()); 47129 } 47130 if (element.hasContact()) { 47131 for (ContactDetail e : element.getContact()) 47132 composeContactDetail("contact", e); 47133 } 47134 if (element.hasDescriptionElement()) { 47135 composeMarkdown("description", element.getDescriptionElement()); 47136 } 47137 if (element.hasUseContext()) { 47138 for (UsageContext e : element.getUseContext()) 47139 composeUsageContext("useContext", e); 47140 } 47141 if (element.hasJurisdiction()) { 47142 for (CodeableConcept e : element.getJurisdiction()) 47143 composeCodeableConcept("jurisdiction", e); 47144 } 47145 if (element.hasPurposeElement()) { 47146 composeMarkdown("purpose", element.getPurposeElement()); 47147 } 47148 if (element.hasCopyrightElement()) { 47149 composeMarkdown("copyright", element.getCopyrightElement()); 47150 } 47151 if (element.hasApprovalDateElement()) { 47152 composeDate("approvalDate", element.getApprovalDateElement()); 47153 } 47154 if (element.hasLastReviewDateElement()) { 47155 composeDate("lastReviewDate", element.getLastReviewDateElement()); 47156 } 47157 if (element.hasEffectivePeriod()) { 47158 composePeriod("effectivePeriod", element.getEffectivePeriod()); 47159 } 47160 if (element.hasCode()) { 47161 for (Coding e : element.getCode()) 47162 composeCoding("code", e); 47163 } 47164 if (element.hasItem()) { 47165 for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) 47166 composeQuestionnaireQuestionnaireItemComponent("item", e); 47167 } 47168 } 47169 47170 protected void composeQuestionnaireQuestionnaireItemComponent(String name, 47171 Questionnaire.QuestionnaireItemComponent element) throws IOException { 47172 if (element != null) { 47173 composeElementAttributes(element); 47174 xml.enter(FHIR_NS, name); 47175 composeQuestionnaireQuestionnaireItemComponentElements(element); 47176 composeElementClose(element); 47177 xml.exit(FHIR_NS, name); 47178 } 47179 } 47180 47181 protected void composeQuestionnaireQuestionnaireItemComponentElements( 47182 Questionnaire.QuestionnaireItemComponent element) throws IOException { 47183 composeBackboneElementElements(element); 47184 if (element.hasLinkIdElement()) { 47185 composeString("linkId", element.getLinkIdElement()); 47186 } 47187 if (element.hasDefinitionElement()) { 47188 composeUri("definition", element.getDefinitionElement()); 47189 } 47190 if (element.hasCode()) { 47191 for (Coding e : element.getCode()) 47192 composeCoding("code", e); 47193 } 47194 if (element.hasPrefixElement()) { 47195 composeString("prefix", element.getPrefixElement()); 47196 } 47197 if (element.hasTextElement()) { 47198 composeString("text", element.getTextElement()); 47199 } 47200 if (element.hasTypeElement()) 47201 composeEnumeration("type", element.getTypeElement(), new Questionnaire.QuestionnaireItemTypeEnumFactory()); 47202 if (element.hasEnableWhen()) { 47203 for (Questionnaire.QuestionnaireItemEnableWhenComponent e : element.getEnableWhen()) 47204 composeQuestionnaireQuestionnaireItemEnableWhenComponent("enableWhen", e); 47205 } 47206 if (element.hasEnableBehaviorElement()) 47207 composeEnumeration("enableBehavior", element.getEnableBehaviorElement(), 47208 new Questionnaire.EnableWhenBehaviorEnumFactory()); 47209 if (element.hasRequiredElement()) { 47210 composeBoolean("required", element.getRequiredElement()); 47211 } 47212 if (element.hasRepeatsElement()) { 47213 composeBoolean("repeats", element.getRepeatsElement()); 47214 } 47215 if (element.hasReadOnlyElement()) { 47216 composeBoolean("readOnly", element.getReadOnlyElement()); 47217 } 47218 if (element.hasMaxLengthElement()) { 47219 composeInteger("maxLength", element.getMaxLengthElement()); 47220 } 47221 if (element.hasAnswerValueSetElement()) { 47222 composeCanonical("answerValueSet", element.getAnswerValueSetElement()); 47223 } 47224 if (element.hasAnswerOption()) { 47225 for (Questionnaire.QuestionnaireItemAnswerOptionComponent e : element.getAnswerOption()) 47226 composeQuestionnaireQuestionnaireItemAnswerOptionComponent("answerOption", e); 47227 } 47228 if (element.hasInitial()) { 47229 for (Questionnaire.QuestionnaireItemInitialComponent e : element.getInitial()) 47230 composeQuestionnaireQuestionnaireItemInitialComponent("initial", e); 47231 } 47232 if (element.hasItem()) { 47233 for (Questionnaire.QuestionnaireItemComponent e : element.getItem()) 47234 composeQuestionnaireQuestionnaireItemComponent("item", e); 47235 } 47236 } 47237 47238 protected void composeQuestionnaireQuestionnaireItemEnableWhenComponent(String name, 47239 Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { 47240 if (element != null) { 47241 composeElementAttributes(element); 47242 xml.enter(FHIR_NS, name); 47243 composeQuestionnaireQuestionnaireItemEnableWhenComponentElements(element); 47244 composeElementClose(element); 47245 xml.exit(FHIR_NS, name); 47246 } 47247 } 47248 47249 protected void composeQuestionnaireQuestionnaireItemEnableWhenComponentElements( 47250 Questionnaire.QuestionnaireItemEnableWhenComponent element) throws IOException { 47251 composeBackboneElementElements(element); 47252 if (element.hasQuestionElement()) { 47253 composeString("question", element.getQuestionElement()); 47254 } 47255 if (element.hasOperatorElement()) 47256 composeEnumeration("operator", element.getOperatorElement(), 47257 new Questionnaire.QuestionnaireItemOperatorEnumFactory()); 47258 if (element.hasAnswer()) { 47259 composeType("answer", element.getAnswer()); 47260 } 47261 } 47262 47263 protected void composeQuestionnaireQuestionnaireItemAnswerOptionComponent(String name, 47264 Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException { 47265 if (element != null) { 47266 composeElementAttributes(element); 47267 xml.enter(FHIR_NS, name); 47268 composeQuestionnaireQuestionnaireItemAnswerOptionComponentElements(element); 47269 composeElementClose(element); 47270 xml.exit(FHIR_NS, name); 47271 } 47272 } 47273 47274 protected void composeQuestionnaireQuestionnaireItemAnswerOptionComponentElements( 47275 Questionnaire.QuestionnaireItemAnswerOptionComponent element) throws IOException { 47276 composeBackboneElementElements(element); 47277 if (element.hasValue()) { 47278 composeType("value", element.getValue()); 47279 } 47280 if (element.hasInitialSelectedElement()) { 47281 composeBoolean("initialSelected", element.getInitialSelectedElement()); 47282 } 47283 } 47284 47285 protected void composeQuestionnaireQuestionnaireItemInitialComponent(String name, 47286 Questionnaire.QuestionnaireItemInitialComponent element) throws IOException { 47287 if (element != null) { 47288 composeElementAttributes(element); 47289 xml.enter(FHIR_NS, name); 47290 composeQuestionnaireQuestionnaireItemInitialComponentElements(element); 47291 composeElementClose(element); 47292 xml.exit(FHIR_NS, name); 47293 } 47294 } 47295 47296 protected void composeQuestionnaireQuestionnaireItemInitialComponentElements( 47297 Questionnaire.QuestionnaireItemInitialComponent element) throws IOException { 47298 composeBackboneElementElements(element); 47299 if (element.hasValue()) { 47300 composeType("value", element.getValue()); 47301 } 47302 } 47303 47304 protected void composeQuestionnaireResponse(String name, QuestionnaireResponse element) throws IOException { 47305 if (element != null) { 47306 composeDomainResourceAttributes(element); 47307 xml.enter(FHIR_NS, name); 47308 composeQuestionnaireResponseElements(element); 47309 composeElementClose(element); 47310 xml.exit(FHIR_NS, name); 47311 } 47312 } 47313 47314 protected void composeQuestionnaireResponseElements(QuestionnaireResponse element) throws IOException { 47315 composeDomainResourceElements(element); 47316 if (element.hasIdentifier()) { 47317 composeIdentifier("identifier", element.getIdentifier()); 47318 } 47319 if (element.hasBasedOn()) { 47320 for (Reference e : element.getBasedOn()) 47321 composeReference("basedOn", e); 47322 } 47323 if (element.hasPartOf()) { 47324 for (Reference e : element.getPartOf()) 47325 composeReference("partOf", e); 47326 } 47327 if (element.hasQuestionnaireElement()) { 47328 composeCanonical("questionnaire", element.getQuestionnaireElement()); 47329 } 47330 if (element.hasStatusElement()) 47331 composeEnumeration("status", element.getStatusElement(), 47332 new QuestionnaireResponse.QuestionnaireResponseStatusEnumFactory()); 47333 if (element.hasSubject()) { 47334 composeReference("subject", element.getSubject()); 47335 } 47336 if (element.hasEncounter()) { 47337 composeReference("encounter", element.getEncounter()); 47338 } 47339 if (element.hasAuthoredElement()) { 47340 composeDateTime("authored", element.getAuthoredElement()); 47341 } 47342 if (element.hasAuthor()) { 47343 composeReference("author", element.getAuthor()); 47344 } 47345 if (element.hasSource()) { 47346 composeReference("source", element.getSource()); 47347 } 47348 if (element.hasItem()) { 47349 for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) 47350 composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); 47351 } 47352 } 47353 47354 protected void composeQuestionnaireResponseQuestionnaireResponseItemComponent(String name, 47355 QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { 47356 if (element != null) { 47357 composeElementAttributes(element); 47358 xml.enter(FHIR_NS, name); 47359 composeQuestionnaireResponseQuestionnaireResponseItemComponentElements(element); 47360 composeElementClose(element); 47361 xml.exit(FHIR_NS, name); 47362 } 47363 } 47364 47365 protected void composeQuestionnaireResponseQuestionnaireResponseItemComponentElements( 47366 QuestionnaireResponse.QuestionnaireResponseItemComponent element) throws IOException { 47367 composeBackboneElementElements(element); 47368 if (element.hasLinkIdElement()) { 47369 composeString("linkId", element.getLinkIdElement()); 47370 } 47371 if (element.hasDefinitionElement()) { 47372 composeUri("definition", element.getDefinitionElement()); 47373 } 47374 if (element.hasTextElement()) { 47375 composeString("text", element.getTextElement()); 47376 } 47377 if (element.hasAnswer()) { 47378 for (QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent e : element.getAnswer()) 47379 composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent("answer", e); 47380 } 47381 if (element.hasItem()) { 47382 for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) 47383 composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); 47384 } 47385 } 47386 47387 protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponent(String name, 47388 QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { 47389 if (element != null) { 47390 composeElementAttributes(element); 47391 xml.enter(FHIR_NS, name); 47392 composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements(element); 47393 composeElementClose(element); 47394 xml.exit(FHIR_NS, name); 47395 } 47396 } 47397 47398 protected void composeQuestionnaireResponseQuestionnaireResponseItemAnswerComponentElements( 47399 QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent element) throws IOException { 47400 composeBackboneElementElements(element); 47401 if (element.hasValue()) { 47402 composeType("value", element.getValue()); 47403 } 47404 if (element.hasItem()) { 47405 for (QuestionnaireResponse.QuestionnaireResponseItemComponent e : element.getItem()) 47406 composeQuestionnaireResponseQuestionnaireResponseItemComponent("item", e); 47407 } 47408 } 47409 47410 protected void composeRelatedPerson(String name, RelatedPerson element) throws IOException { 47411 if (element != null) { 47412 composeDomainResourceAttributes(element); 47413 xml.enter(FHIR_NS, name); 47414 composeRelatedPersonElements(element); 47415 composeElementClose(element); 47416 xml.exit(FHIR_NS, name); 47417 } 47418 } 47419 47420 protected void composeRelatedPersonElements(RelatedPerson element) throws IOException { 47421 composeDomainResourceElements(element); 47422 if (element.hasIdentifier()) { 47423 for (Identifier e : element.getIdentifier()) 47424 composeIdentifier("identifier", e); 47425 } 47426 if (element.hasActiveElement()) { 47427 composeBoolean("active", element.getActiveElement()); 47428 } 47429 if (element.hasPatient()) { 47430 composeReference("patient", element.getPatient()); 47431 } 47432 if (element.hasRelationship()) { 47433 for (CodeableConcept e : element.getRelationship()) 47434 composeCodeableConcept("relationship", e); 47435 } 47436 if (element.hasName()) { 47437 for (HumanName e : element.getName()) 47438 composeHumanName("name", e); 47439 } 47440 if (element.hasTelecom()) { 47441 for (ContactPoint e : element.getTelecom()) 47442 composeContactPoint("telecom", e); 47443 } 47444 if (element.hasGenderElement()) 47445 composeEnumeration("gender", element.getGenderElement(), new Enumerations.AdministrativeGenderEnumFactory()); 47446 if (element.hasBirthDateElement()) { 47447 composeDate("birthDate", element.getBirthDateElement()); 47448 } 47449 if (element.hasAddress()) { 47450 for (Address e : element.getAddress()) 47451 composeAddress("address", e); 47452 } 47453 if (element.hasPhoto()) { 47454 for (Attachment e : element.getPhoto()) 47455 composeAttachment("photo", e); 47456 } 47457 if (element.hasPeriod()) { 47458 composePeriod("period", element.getPeriod()); 47459 } 47460 if (element.hasCommunication()) { 47461 for (RelatedPerson.RelatedPersonCommunicationComponent e : element.getCommunication()) 47462 composeRelatedPersonRelatedPersonCommunicationComponent("communication", e); 47463 } 47464 } 47465 47466 protected void composeRelatedPersonRelatedPersonCommunicationComponent(String name, 47467 RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException { 47468 if (element != null) { 47469 composeElementAttributes(element); 47470 xml.enter(FHIR_NS, name); 47471 composeRelatedPersonRelatedPersonCommunicationComponentElements(element); 47472 composeElementClose(element); 47473 xml.exit(FHIR_NS, name); 47474 } 47475 } 47476 47477 protected void composeRelatedPersonRelatedPersonCommunicationComponentElements( 47478 RelatedPerson.RelatedPersonCommunicationComponent element) throws IOException { 47479 composeBackboneElementElements(element); 47480 if (element.hasLanguage()) { 47481 composeCodeableConcept("language", element.getLanguage()); 47482 } 47483 if (element.hasPreferredElement()) { 47484 composeBoolean("preferred", element.getPreferredElement()); 47485 } 47486 } 47487 47488 protected void composeRequestGroup(String name, RequestGroup element) throws IOException { 47489 if (element != null) { 47490 composeDomainResourceAttributes(element); 47491 xml.enter(FHIR_NS, name); 47492 composeRequestGroupElements(element); 47493 composeElementClose(element); 47494 xml.exit(FHIR_NS, name); 47495 } 47496 } 47497 47498 protected void composeRequestGroupElements(RequestGroup element) throws IOException { 47499 composeDomainResourceElements(element); 47500 if (element.hasIdentifier()) { 47501 for (Identifier e : element.getIdentifier()) 47502 composeIdentifier("identifier", e); 47503 } 47504 if (element.hasInstantiatesCanonical()) { 47505 for (CanonicalType e : element.getInstantiatesCanonical()) 47506 composeCanonical("instantiatesCanonical", e); 47507 } 47508 if (element.hasInstantiatesUri()) { 47509 for (UriType e : element.getInstantiatesUri()) 47510 composeUri("instantiatesUri", e); 47511 } 47512 if (element.hasBasedOn()) { 47513 for (Reference e : element.getBasedOn()) 47514 composeReference("basedOn", e); 47515 } 47516 if (element.hasReplaces()) { 47517 for (Reference e : element.getReplaces()) 47518 composeReference("replaces", e); 47519 } 47520 if (element.hasGroupIdentifier()) { 47521 composeIdentifier("groupIdentifier", element.getGroupIdentifier()); 47522 } 47523 if (element.hasStatusElement()) 47524 composeEnumeration("status", element.getStatusElement(), new RequestGroup.RequestStatusEnumFactory()); 47525 if (element.hasIntentElement()) 47526 composeEnumeration("intent", element.getIntentElement(), new RequestGroup.RequestIntentEnumFactory()); 47527 if (element.hasPriorityElement()) 47528 composeEnumeration("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory()); 47529 if (element.hasCode()) { 47530 composeCodeableConcept("code", element.getCode()); 47531 } 47532 if (element.hasSubject()) { 47533 composeReference("subject", element.getSubject()); 47534 } 47535 if (element.hasEncounter()) { 47536 composeReference("encounter", element.getEncounter()); 47537 } 47538 if (element.hasAuthoredOnElement()) { 47539 composeDateTime("authoredOn", element.getAuthoredOnElement()); 47540 } 47541 if (element.hasAuthor()) { 47542 composeReference("author", element.getAuthor()); 47543 } 47544 if (element.hasReasonCode()) { 47545 for (CodeableConcept e : element.getReasonCode()) 47546 composeCodeableConcept("reasonCode", e); 47547 } 47548 if (element.hasReasonReference()) { 47549 for (Reference e : element.getReasonReference()) 47550 composeReference("reasonReference", e); 47551 } 47552 if (element.hasNote()) { 47553 for (Annotation e : element.getNote()) 47554 composeAnnotation("note", e); 47555 } 47556 if (element.hasAction()) { 47557 for (RequestGroup.RequestGroupActionComponent e : element.getAction()) 47558 composeRequestGroupRequestGroupActionComponent("action", e); 47559 } 47560 } 47561 47562 protected void composeRequestGroupRequestGroupActionComponent(String name, 47563 RequestGroup.RequestGroupActionComponent element) throws IOException { 47564 if (element != null) { 47565 composeElementAttributes(element); 47566 xml.enter(FHIR_NS, name); 47567 composeRequestGroupRequestGroupActionComponentElements(element); 47568 composeElementClose(element); 47569 xml.exit(FHIR_NS, name); 47570 } 47571 } 47572 47573 protected void composeRequestGroupRequestGroupActionComponentElements( 47574 RequestGroup.RequestGroupActionComponent element) throws IOException { 47575 composeBackboneElementElements(element); 47576 if (element.hasPrefixElement()) { 47577 composeString("prefix", element.getPrefixElement()); 47578 } 47579 if (element.hasTitleElement()) { 47580 composeString("title", element.getTitleElement()); 47581 } 47582 if (element.hasDescriptionElement()) { 47583 composeString("description", element.getDescriptionElement()); 47584 } 47585 if (element.hasTextEquivalentElement()) { 47586 composeString("textEquivalent", element.getTextEquivalentElement()); 47587 } 47588 if (element.hasPriorityElement()) 47589 composeEnumeration("priority", element.getPriorityElement(), new RequestGroup.RequestPriorityEnumFactory()); 47590 if (element.hasCode()) { 47591 for (CodeableConcept e : element.getCode()) 47592 composeCodeableConcept("code", e); 47593 } 47594 if (element.hasDocumentation()) { 47595 for (RelatedArtifact e : element.getDocumentation()) 47596 composeRelatedArtifact("documentation", e); 47597 } 47598 if (element.hasCondition()) { 47599 for (RequestGroup.RequestGroupActionConditionComponent e : element.getCondition()) 47600 composeRequestGroupRequestGroupActionConditionComponent("condition", e); 47601 } 47602 if (element.hasRelatedAction()) { 47603 for (RequestGroup.RequestGroupActionRelatedActionComponent e : element.getRelatedAction()) 47604 composeRequestGroupRequestGroupActionRelatedActionComponent("relatedAction", e); 47605 } 47606 if (element.hasTiming()) { 47607 composeType("timing", element.getTiming()); 47608 } 47609 if (element.hasParticipant()) { 47610 for (Reference e : element.getParticipant()) 47611 composeReference("participant", e); 47612 } 47613 if (element.hasType()) { 47614 composeCodeableConcept("type", element.getType()); 47615 } 47616 if (element.hasGroupingBehaviorElement()) 47617 composeEnumeration("groupingBehavior", element.getGroupingBehaviorElement(), 47618 new RequestGroup.ActionGroupingBehaviorEnumFactory()); 47619 if (element.hasSelectionBehaviorElement()) 47620 composeEnumeration("selectionBehavior", element.getSelectionBehaviorElement(), 47621 new RequestGroup.ActionSelectionBehaviorEnumFactory()); 47622 if (element.hasRequiredBehaviorElement()) 47623 composeEnumeration("requiredBehavior", element.getRequiredBehaviorElement(), 47624 new RequestGroup.ActionRequiredBehaviorEnumFactory()); 47625 if (element.hasPrecheckBehaviorElement()) 47626 composeEnumeration("precheckBehavior", element.getPrecheckBehaviorElement(), 47627 new RequestGroup.ActionPrecheckBehaviorEnumFactory()); 47628 if (element.hasCardinalityBehaviorElement()) 47629 composeEnumeration("cardinalityBehavior", element.getCardinalityBehaviorElement(), 47630 new RequestGroup.ActionCardinalityBehaviorEnumFactory()); 47631 if (element.hasResource()) { 47632 composeReference("resource", element.getResource()); 47633 } 47634 if (element.hasAction()) { 47635 for (RequestGroup.RequestGroupActionComponent e : element.getAction()) 47636 composeRequestGroupRequestGroupActionComponent("action", e); 47637 } 47638 } 47639 47640 protected void composeRequestGroupRequestGroupActionConditionComponent(String name, 47641 RequestGroup.RequestGroupActionConditionComponent element) throws IOException { 47642 if (element != null) { 47643 composeElementAttributes(element); 47644 xml.enter(FHIR_NS, name); 47645 composeRequestGroupRequestGroupActionConditionComponentElements(element); 47646 composeElementClose(element); 47647 xml.exit(FHIR_NS, name); 47648 } 47649 } 47650 47651 protected void composeRequestGroupRequestGroupActionConditionComponentElements( 47652 RequestGroup.RequestGroupActionConditionComponent element) throws IOException { 47653 composeBackboneElementElements(element); 47654 if (element.hasKindElement()) 47655 composeEnumeration("kind", element.getKindElement(), new RequestGroup.ActionConditionKindEnumFactory()); 47656 if (element.hasExpression()) { 47657 composeExpression("expression", element.getExpression()); 47658 } 47659 } 47660 47661 protected void composeRequestGroupRequestGroupActionRelatedActionComponent(String name, 47662 RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { 47663 if (element != null) { 47664 composeElementAttributes(element); 47665 xml.enter(FHIR_NS, name); 47666 composeRequestGroupRequestGroupActionRelatedActionComponentElements(element); 47667 composeElementClose(element); 47668 xml.exit(FHIR_NS, name); 47669 } 47670 } 47671 47672 protected void composeRequestGroupRequestGroupActionRelatedActionComponentElements( 47673 RequestGroup.RequestGroupActionRelatedActionComponent element) throws IOException { 47674 composeBackboneElementElements(element); 47675 if (element.hasActionIdElement()) { 47676 composeId("actionId", element.getActionIdElement()); 47677 } 47678 if (element.hasRelationshipElement()) 47679 composeEnumeration("relationship", element.getRelationshipElement(), 47680 new RequestGroup.ActionRelationshipTypeEnumFactory()); 47681 if (element.hasOffset()) { 47682 composeType("offset", element.getOffset()); 47683 } 47684 } 47685 47686 protected void composeResearchDefinition(String name, ResearchDefinition element) throws IOException { 47687 if (element != null) { 47688 composeDomainResourceAttributes(element); 47689 xml.enter(FHIR_NS, name); 47690 composeResearchDefinitionElements(element); 47691 composeElementClose(element); 47692 xml.exit(FHIR_NS, name); 47693 } 47694 } 47695 47696 protected void composeResearchDefinitionElements(ResearchDefinition element) throws IOException { 47697 composeDomainResourceElements(element); 47698 if (element.hasUrlElement()) { 47699 composeUri("url", element.getUrlElement()); 47700 } 47701 if (element.hasIdentifier()) { 47702 for (Identifier e : element.getIdentifier()) 47703 composeIdentifier("identifier", e); 47704 } 47705 if (element.hasVersionElement()) { 47706 composeString("version", element.getVersionElement()); 47707 } 47708 if (element.hasNameElement()) { 47709 composeString("name", element.getNameElement()); 47710 } 47711 if (element.hasTitleElement()) { 47712 composeString("title", element.getTitleElement()); 47713 } 47714 if (element.hasShortTitleElement()) { 47715 composeString("shortTitle", element.getShortTitleElement()); 47716 } 47717 if (element.hasSubtitleElement()) { 47718 composeString("subtitle", element.getSubtitleElement()); 47719 } 47720 if (element.hasStatusElement()) 47721 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 47722 if (element.hasExperimentalElement()) { 47723 composeBoolean("experimental", element.getExperimentalElement()); 47724 } 47725 if (element.hasSubject()) { 47726 composeType("subject", element.getSubject()); 47727 } 47728 if (element.hasDateElement()) { 47729 composeDateTime("date", element.getDateElement()); 47730 } 47731 if (element.hasPublisherElement()) { 47732 composeString("publisher", element.getPublisherElement()); 47733 } 47734 if (element.hasContact()) { 47735 for (ContactDetail e : element.getContact()) 47736 composeContactDetail("contact", e); 47737 } 47738 if (element.hasDescriptionElement()) { 47739 composeMarkdown("description", element.getDescriptionElement()); 47740 } 47741 if (element.hasComment()) { 47742 for (StringType e : element.getComment()) 47743 composeString("comment", e); 47744 } 47745 if (element.hasUseContext()) { 47746 for (UsageContext e : element.getUseContext()) 47747 composeUsageContext("useContext", e); 47748 } 47749 if (element.hasJurisdiction()) { 47750 for (CodeableConcept e : element.getJurisdiction()) 47751 composeCodeableConcept("jurisdiction", e); 47752 } 47753 if (element.hasPurposeElement()) { 47754 composeMarkdown("purpose", element.getPurposeElement()); 47755 } 47756 if (element.hasUsageElement()) { 47757 composeString("usage", element.getUsageElement()); 47758 } 47759 if (element.hasCopyrightElement()) { 47760 composeMarkdown("copyright", element.getCopyrightElement()); 47761 } 47762 if (element.hasApprovalDateElement()) { 47763 composeDate("approvalDate", element.getApprovalDateElement()); 47764 } 47765 if (element.hasLastReviewDateElement()) { 47766 composeDate("lastReviewDate", element.getLastReviewDateElement()); 47767 } 47768 if (element.hasEffectivePeriod()) { 47769 composePeriod("effectivePeriod", element.getEffectivePeriod()); 47770 } 47771 if (element.hasTopic()) { 47772 for (CodeableConcept e : element.getTopic()) 47773 composeCodeableConcept("topic", e); 47774 } 47775 if (element.hasAuthor()) { 47776 for (ContactDetail e : element.getAuthor()) 47777 composeContactDetail("author", e); 47778 } 47779 if (element.hasEditor()) { 47780 for (ContactDetail e : element.getEditor()) 47781 composeContactDetail("editor", e); 47782 } 47783 if (element.hasReviewer()) { 47784 for (ContactDetail e : element.getReviewer()) 47785 composeContactDetail("reviewer", e); 47786 } 47787 if (element.hasEndorser()) { 47788 for (ContactDetail e : element.getEndorser()) 47789 composeContactDetail("endorser", e); 47790 } 47791 if (element.hasRelatedArtifact()) { 47792 for (RelatedArtifact e : element.getRelatedArtifact()) 47793 composeRelatedArtifact("relatedArtifact", e); 47794 } 47795 if (element.hasLibrary()) { 47796 for (CanonicalType e : element.getLibrary()) 47797 composeCanonical("library", e); 47798 } 47799 if (element.hasPopulation()) { 47800 composeReference("population", element.getPopulation()); 47801 } 47802 if (element.hasExposure()) { 47803 composeReference("exposure", element.getExposure()); 47804 } 47805 if (element.hasExposureAlternative()) { 47806 composeReference("exposureAlternative", element.getExposureAlternative()); 47807 } 47808 if (element.hasOutcome()) { 47809 composeReference("outcome", element.getOutcome()); 47810 } 47811 } 47812 47813 protected void composeResearchElementDefinition(String name, ResearchElementDefinition element) throws IOException { 47814 if (element != null) { 47815 composeDomainResourceAttributes(element); 47816 xml.enter(FHIR_NS, name); 47817 composeResearchElementDefinitionElements(element); 47818 composeElementClose(element); 47819 xml.exit(FHIR_NS, name); 47820 } 47821 } 47822 47823 protected void composeResearchElementDefinitionElements(ResearchElementDefinition element) throws IOException { 47824 composeDomainResourceElements(element); 47825 if (element.hasUrlElement()) { 47826 composeUri("url", element.getUrlElement()); 47827 } 47828 if (element.hasIdentifier()) { 47829 for (Identifier e : element.getIdentifier()) 47830 composeIdentifier("identifier", e); 47831 } 47832 if (element.hasVersionElement()) { 47833 composeString("version", element.getVersionElement()); 47834 } 47835 if (element.hasNameElement()) { 47836 composeString("name", element.getNameElement()); 47837 } 47838 if (element.hasTitleElement()) { 47839 composeString("title", element.getTitleElement()); 47840 } 47841 if (element.hasShortTitleElement()) { 47842 composeString("shortTitle", element.getShortTitleElement()); 47843 } 47844 if (element.hasSubtitleElement()) { 47845 composeString("subtitle", element.getSubtitleElement()); 47846 } 47847 if (element.hasStatusElement()) 47848 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 47849 if (element.hasExperimentalElement()) { 47850 composeBoolean("experimental", element.getExperimentalElement()); 47851 } 47852 if (element.hasSubject()) { 47853 composeType("subject", element.getSubject()); 47854 } 47855 if (element.hasDateElement()) { 47856 composeDateTime("date", element.getDateElement()); 47857 } 47858 if (element.hasPublisherElement()) { 47859 composeString("publisher", element.getPublisherElement()); 47860 } 47861 if (element.hasContact()) { 47862 for (ContactDetail e : element.getContact()) 47863 composeContactDetail("contact", e); 47864 } 47865 if (element.hasDescriptionElement()) { 47866 composeMarkdown("description", element.getDescriptionElement()); 47867 } 47868 if (element.hasComment()) { 47869 for (StringType e : element.getComment()) 47870 composeString("comment", e); 47871 } 47872 if (element.hasUseContext()) { 47873 for (UsageContext e : element.getUseContext()) 47874 composeUsageContext("useContext", e); 47875 } 47876 if (element.hasJurisdiction()) { 47877 for (CodeableConcept e : element.getJurisdiction()) 47878 composeCodeableConcept("jurisdiction", e); 47879 } 47880 if (element.hasPurposeElement()) { 47881 composeMarkdown("purpose", element.getPurposeElement()); 47882 } 47883 if (element.hasUsageElement()) { 47884 composeString("usage", element.getUsageElement()); 47885 } 47886 if (element.hasCopyrightElement()) { 47887 composeMarkdown("copyright", element.getCopyrightElement()); 47888 } 47889 if (element.hasApprovalDateElement()) { 47890 composeDate("approvalDate", element.getApprovalDateElement()); 47891 } 47892 if (element.hasLastReviewDateElement()) { 47893 composeDate("lastReviewDate", element.getLastReviewDateElement()); 47894 } 47895 if (element.hasEffectivePeriod()) { 47896 composePeriod("effectivePeriod", element.getEffectivePeriod()); 47897 } 47898 if (element.hasTopic()) { 47899 for (CodeableConcept e : element.getTopic()) 47900 composeCodeableConcept("topic", e); 47901 } 47902 if (element.hasAuthor()) { 47903 for (ContactDetail e : element.getAuthor()) 47904 composeContactDetail("author", e); 47905 } 47906 if (element.hasEditor()) { 47907 for (ContactDetail e : element.getEditor()) 47908 composeContactDetail("editor", e); 47909 } 47910 if (element.hasReviewer()) { 47911 for (ContactDetail e : element.getReviewer()) 47912 composeContactDetail("reviewer", e); 47913 } 47914 if (element.hasEndorser()) { 47915 for (ContactDetail e : element.getEndorser()) 47916 composeContactDetail("endorser", e); 47917 } 47918 if (element.hasRelatedArtifact()) { 47919 for (RelatedArtifact e : element.getRelatedArtifact()) 47920 composeRelatedArtifact("relatedArtifact", e); 47921 } 47922 if (element.hasLibrary()) { 47923 for (CanonicalType e : element.getLibrary()) 47924 composeCanonical("library", e); 47925 } 47926 if (element.hasTypeElement()) 47927 composeEnumeration("type", element.getTypeElement(), 47928 new ResearchElementDefinition.ResearchElementTypeEnumFactory()); 47929 if (element.hasVariableTypeElement()) 47930 composeEnumeration("variableType", element.getVariableTypeElement(), 47931 new ResearchElementDefinition.VariableTypeEnumFactory()); 47932 if (element.hasCharacteristic()) { 47933 for (ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent e : element.getCharacteristic()) 47934 composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponent("characteristic", e); 47935 } 47936 } 47937 47938 protected void composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponent(String name, 47939 ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent element) throws IOException { 47940 if (element != null) { 47941 composeElementAttributes(element); 47942 xml.enter(FHIR_NS, name); 47943 composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponentElements(element); 47944 composeElementClose(element); 47945 xml.exit(FHIR_NS, name); 47946 } 47947 } 47948 47949 protected void composeResearchElementDefinitionResearchElementDefinitionCharacteristicComponentElements( 47950 ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent element) throws IOException { 47951 composeBackboneElementElements(element); 47952 if (element.hasDefinition()) { 47953 composeType("definition", element.getDefinition()); 47954 } 47955 if (element.hasUsageContext()) { 47956 for (UsageContext e : element.getUsageContext()) 47957 composeUsageContext("usageContext", e); 47958 } 47959 if (element.hasExcludeElement()) { 47960 composeBoolean("exclude", element.getExcludeElement()); 47961 } 47962 if (element.hasUnitOfMeasure()) { 47963 composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure()); 47964 } 47965 if (element.hasStudyEffectiveDescriptionElement()) { 47966 composeString("studyEffectiveDescription", element.getStudyEffectiveDescriptionElement()); 47967 } 47968 if (element.hasStudyEffective()) { 47969 composeType("studyEffective", element.getStudyEffective()); 47970 } 47971 if (element.hasStudyEffectiveTimeFromStart()) { 47972 composeDuration("studyEffectiveTimeFromStart", element.getStudyEffectiveTimeFromStart()); 47973 } 47974 if (element.hasStudyEffectiveGroupMeasureElement()) 47975 composeEnumeration("studyEffectiveGroupMeasure", element.getStudyEffectiveGroupMeasureElement(), 47976 new ResearchElementDefinition.GroupMeasureEnumFactory()); 47977 if (element.hasParticipantEffectiveDescriptionElement()) { 47978 composeString("participantEffectiveDescription", element.getParticipantEffectiveDescriptionElement()); 47979 } 47980 if (element.hasParticipantEffective()) { 47981 composeType("participantEffective", element.getParticipantEffective()); 47982 } 47983 if (element.hasParticipantEffectiveTimeFromStart()) { 47984 composeDuration("participantEffectiveTimeFromStart", element.getParticipantEffectiveTimeFromStart()); 47985 } 47986 if (element.hasParticipantEffectiveGroupMeasureElement()) 47987 composeEnumeration("participantEffectiveGroupMeasure", element.getParticipantEffectiveGroupMeasureElement(), 47988 new ResearchElementDefinition.GroupMeasureEnumFactory()); 47989 } 47990 47991 protected void composeResearchStudy(String name, ResearchStudy element) throws IOException { 47992 if (element != null) { 47993 composeDomainResourceAttributes(element); 47994 xml.enter(FHIR_NS, name); 47995 composeResearchStudyElements(element); 47996 composeElementClose(element); 47997 xml.exit(FHIR_NS, name); 47998 } 47999 } 48000 48001 protected void composeResearchStudyElements(ResearchStudy element) throws IOException { 48002 composeDomainResourceElements(element); 48003 if (element.hasIdentifier()) { 48004 for (Identifier e : element.getIdentifier()) 48005 composeIdentifier("identifier", e); 48006 } 48007 if (element.hasTitleElement()) { 48008 composeString("title", element.getTitleElement()); 48009 } 48010 if (element.hasProtocol()) { 48011 for (Reference e : element.getProtocol()) 48012 composeReference("protocol", e); 48013 } 48014 if (element.hasPartOf()) { 48015 for (Reference e : element.getPartOf()) 48016 composeReference("partOf", e); 48017 } 48018 if (element.hasStatusElement()) 48019 composeEnumeration("status", element.getStatusElement(), new ResearchStudy.ResearchStudyStatusEnumFactory()); 48020 if (element.hasPrimaryPurposeType()) { 48021 composeCodeableConcept("primaryPurposeType", element.getPrimaryPurposeType()); 48022 } 48023 if (element.hasPhase()) { 48024 composeCodeableConcept("phase", element.getPhase()); 48025 } 48026 if (element.hasCategory()) { 48027 for (CodeableConcept e : element.getCategory()) 48028 composeCodeableConcept("category", e); 48029 } 48030 if (element.hasFocus()) { 48031 for (CodeableConcept e : element.getFocus()) 48032 composeCodeableConcept("focus", e); 48033 } 48034 if (element.hasCondition()) { 48035 for (CodeableConcept e : element.getCondition()) 48036 composeCodeableConcept("condition", e); 48037 } 48038 if (element.hasContact()) { 48039 for (ContactDetail e : element.getContact()) 48040 composeContactDetail("contact", e); 48041 } 48042 if (element.hasRelatedArtifact()) { 48043 for (RelatedArtifact e : element.getRelatedArtifact()) 48044 composeRelatedArtifact("relatedArtifact", e); 48045 } 48046 if (element.hasKeyword()) { 48047 for (CodeableConcept e : element.getKeyword()) 48048 composeCodeableConcept("keyword", e); 48049 } 48050 if (element.hasLocation()) { 48051 for (CodeableConcept e : element.getLocation()) 48052 composeCodeableConcept("location", e); 48053 } 48054 if (element.hasDescriptionElement()) { 48055 composeMarkdown("description", element.getDescriptionElement()); 48056 } 48057 if (element.hasEnrollment()) { 48058 for (Reference e : element.getEnrollment()) 48059 composeReference("enrollment", e); 48060 } 48061 if (element.hasPeriod()) { 48062 composePeriod("period", element.getPeriod()); 48063 } 48064 if (element.hasSponsor()) { 48065 composeReference("sponsor", element.getSponsor()); 48066 } 48067 if (element.hasPrincipalInvestigator()) { 48068 composeReference("principalInvestigator", element.getPrincipalInvestigator()); 48069 } 48070 if (element.hasSite()) { 48071 for (Reference e : element.getSite()) 48072 composeReference("site", e); 48073 } 48074 if (element.hasReasonStopped()) { 48075 composeCodeableConcept("reasonStopped", element.getReasonStopped()); 48076 } 48077 if (element.hasNote()) { 48078 for (Annotation e : element.getNote()) 48079 composeAnnotation("note", e); 48080 } 48081 if (element.hasArm()) { 48082 for (ResearchStudy.ResearchStudyArmComponent e : element.getArm()) 48083 composeResearchStudyResearchStudyArmComponent("arm", e); 48084 } 48085 if (element.hasObjective()) { 48086 for (ResearchStudy.ResearchStudyObjectiveComponent e : element.getObjective()) 48087 composeResearchStudyResearchStudyObjectiveComponent("objective", e); 48088 } 48089 } 48090 48091 protected void composeResearchStudyResearchStudyArmComponent(String name, 48092 ResearchStudy.ResearchStudyArmComponent element) throws IOException { 48093 if (element != null) { 48094 composeElementAttributes(element); 48095 xml.enter(FHIR_NS, name); 48096 composeResearchStudyResearchStudyArmComponentElements(element); 48097 composeElementClose(element); 48098 xml.exit(FHIR_NS, name); 48099 } 48100 } 48101 48102 protected void composeResearchStudyResearchStudyArmComponentElements(ResearchStudy.ResearchStudyArmComponent element) 48103 throws IOException { 48104 composeBackboneElementElements(element); 48105 if (element.hasNameElement()) { 48106 composeString("name", element.getNameElement()); 48107 } 48108 if (element.hasType()) { 48109 composeCodeableConcept("type", element.getType()); 48110 } 48111 if (element.hasDescriptionElement()) { 48112 composeString("description", element.getDescriptionElement()); 48113 } 48114 } 48115 48116 protected void composeResearchStudyResearchStudyObjectiveComponent(String name, 48117 ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException { 48118 if (element != null) { 48119 composeElementAttributes(element); 48120 xml.enter(FHIR_NS, name); 48121 composeResearchStudyResearchStudyObjectiveComponentElements(element); 48122 composeElementClose(element); 48123 xml.exit(FHIR_NS, name); 48124 } 48125 } 48126 48127 protected void composeResearchStudyResearchStudyObjectiveComponentElements( 48128 ResearchStudy.ResearchStudyObjectiveComponent element) throws IOException { 48129 composeBackboneElementElements(element); 48130 if (element.hasNameElement()) { 48131 composeString("name", element.getNameElement()); 48132 } 48133 if (element.hasType()) { 48134 composeCodeableConcept("type", element.getType()); 48135 } 48136 } 48137 48138 protected void composeResearchSubject(String name, ResearchSubject element) throws IOException { 48139 if (element != null) { 48140 composeDomainResourceAttributes(element); 48141 xml.enter(FHIR_NS, name); 48142 composeResearchSubjectElements(element); 48143 composeElementClose(element); 48144 xml.exit(FHIR_NS, name); 48145 } 48146 } 48147 48148 protected void composeResearchSubjectElements(ResearchSubject element) throws IOException { 48149 composeDomainResourceElements(element); 48150 if (element.hasIdentifier()) { 48151 for (Identifier e : element.getIdentifier()) 48152 composeIdentifier("identifier", e); 48153 } 48154 if (element.hasStatusElement()) 48155 composeEnumeration("status", element.getStatusElement(), new ResearchSubject.ResearchSubjectStatusEnumFactory()); 48156 if (element.hasPeriod()) { 48157 composePeriod("period", element.getPeriod()); 48158 } 48159 if (element.hasStudy()) { 48160 composeReference("study", element.getStudy()); 48161 } 48162 if (element.hasIndividual()) { 48163 composeReference("individual", element.getIndividual()); 48164 } 48165 if (element.hasAssignedArmElement()) { 48166 composeString("assignedArm", element.getAssignedArmElement()); 48167 } 48168 if (element.hasActualArmElement()) { 48169 composeString("actualArm", element.getActualArmElement()); 48170 } 48171 if (element.hasConsent()) { 48172 composeReference("consent", element.getConsent()); 48173 } 48174 } 48175 48176 protected void composeRiskAssessment(String name, RiskAssessment element) throws IOException { 48177 if (element != null) { 48178 composeDomainResourceAttributes(element); 48179 xml.enter(FHIR_NS, name); 48180 composeRiskAssessmentElements(element); 48181 composeElementClose(element); 48182 xml.exit(FHIR_NS, name); 48183 } 48184 } 48185 48186 protected void composeRiskAssessmentElements(RiskAssessment element) throws IOException { 48187 composeDomainResourceElements(element); 48188 if (element.hasIdentifier()) { 48189 for (Identifier e : element.getIdentifier()) 48190 composeIdentifier("identifier", e); 48191 } 48192 if (element.hasBasedOn()) { 48193 composeReference("basedOn", element.getBasedOn()); 48194 } 48195 if (element.hasParent()) { 48196 composeReference("parent", element.getParent()); 48197 } 48198 if (element.hasStatusElement()) 48199 composeEnumeration("status", element.getStatusElement(), new RiskAssessment.RiskAssessmentStatusEnumFactory()); 48200 if (element.hasMethod()) { 48201 composeCodeableConcept("method", element.getMethod()); 48202 } 48203 if (element.hasCode()) { 48204 composeCodeableConcept("code", element.getCode()); 48205 } 48206 if (element.hasSubject()) { 48207 composeReference("subject", element.getSubject()); 48208 } 48209 if (element.hasEncounter()) { 48210 composeReference("encounter", element.getEncounter()); 48211 } 48212 if (element.hasOccurrence()) { 48213 composeType("occurrence", element.getOccurrence()); 48214 } 48215 if (element.hasCondition()) { 48216 composeReference("condition", element.getCondition()); 48217 } 48218 if (element.hasPerformer()) { 48219 composeReference("performer", element.getPerformer()); 48220 } 48221 if (element.hasReasonCode()) { 48222 for (CodeableConcept e : element.getReasonCode()) 48223 composeCodeableConcept("reasonCode", e); 48224 } 48225 if (element.hasReasonReference()) { 48226 for (Reference e : element.getReasonReference()) 48227 composeReference("reasonReference", e); 48228 } 48229 if (element.hasBasis()) { 48230 for (Reference e : element.getBasis()) 48231 composeReference("basis", e); 48232 } 48233 if (element.hasPrediction()) { 48234 for (RiskAssessment.RiskAssessmentPredictionComponent e : element.getPrediction()) 48235 composeRiskAssessmentRiskAssessmentPredictionComponent("prediction", e); 48236 } 48237 if (element.hasMitigationElement()) { 48238 composeString("mitigation", element.getMitigationElement()); 48239 } 48240 if (element.hasNote()) { 48241 for (Annotation e : element.getNote()) 48242 composeAnnotation("note", e); 48243 } 48244 } 48245 48246 protected void composeRiskAssessmentRiskAssessmentPredictionComponent(String name, 48247 RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { 48248 if (element != null) { 48249 composeElementAttributes(element); 48250 xml.enter(FHIR_NS, name); 48251 composeRiskAssessmentRiskAssessmentPredictionComponentElements(element); 48252 composeElementClose(element); 48253 xml.exit(FHIR_NS, name); 48254 } 48255 } 48256 48257 protected void composeRiskAssessmentRiskAssessmentPredictionComponentElements( 48258 RiskAssessment.RiskAssessmentPredictionComponent element) throws IOException { 48259 composeBackboneElementElements(element); 48260 if (element.hasOutcome()) { 48261 composeCodeableConcept("outcome", element.getOutcome()); 48262 } 48263 if (element.hasProbability()) { 48264 composeType("probability", element.getProbability()); 48265 } 48266 if (element.hasQualitativeRisk()) { 48267 composeCodeableConcept("qualitativeRisk", element.getQualitativeRisk()); 48268 } 48269 if (element.hasRelativeRiskElement()) { 48270 composeDecimal("relativeRisk", element.getRelativeRiskElement()); 48271 } 48272 if (element.hasWhen()) { 48273 composeType("when", element.getWhen()); 48274 } 48275 if (element.hasRationaleElement()) { 48276 composeString("rationale", element.getRationaleElement()); 48277 } 48278 } 48279 48280 protected void composeRiskEvidenceSynthesis(String name, RiskEvidenceSynthesis element) throws IOException { 48281 if (element != null) { 48282 composeDomainResourceAttributes(element); 48283 xml.enter(FHIR_NS, name); 48284 composeRiskEvidenceSynthesisElements(element); 48285 composeElementClose(element); 48286 xml.exit(FHIR_NS, name); 48287 } 48288 } 48289 48290 protected void composeRiskEvidenceSynthesisElements(RiskEvidenceSynthesis element) throws IOException { 48291 composeDomainResourceElements(element); 48292 if (element.hasUrlElement()) { 48293 composeUri("url", element.getUrlElement()); 48294 } 48295 if (element.hasIdentifier()) { 48296 for (Identifier e : element.getIdentifier()) 48297 composeIdentifier("identifier", e); 48298 } 48299 if (element.hasVersionElement()) { 48300 composeString("version", element.getVersionElement()); 48301 } 48302 if (element.hasNameElement()) { 48303 composeString("name", element.getNameElement()); 48304 } 48305 if (element.hasTitleElement()) { 48306 composeString("title", element.getTitleElement()); 48307 } 48308 if (element.hasStatusElement()) 48309 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 48310 if (element.hasDateElement()) { 48311 composeDateTime("date", element.getDateElement()); 48312 } 48313 if (element.hasPublisherElement()) { 48314 composeString("publisher", element.getPublisherElement()); 48315 } 48316 if (element.hasContact()) { 48317 for (ContactDetail e : element.getContact()) 48318 composeContactDetail("contact", e); 48319 } 48320 if (element.hasDescriptionElement()) { 48321 composeMarkdown("description", element.getDescriptionElement()); 48322 } 48323 if (element.hasNote()) { 48324 for (Annotation e : element.getNote()) 48325 composeAnnotation("note", e); 48326 } 48327 if (element.hasUseContext()) { 48328 for (UsageContext e : element.getUseContext()) 48329 composeUsageContext("useContext", e); 48330 } 48331 if (element.hasJurisdiction()) { 48332 for (CodeableConcept e : element.getJurisdiction()) 48333 composeCodeableConcept("jurisdiction", e); 48334 } 48335 if (element.hasCopyrightElement()) { 48336 composeMarkdown("copyright", element.getCopyrightElement()); 48337 } 48338 if (element.hasApprovalDateElement()) { 48339 composeDate("approvalDate", element.getApprovalDateElement()); 48340 } 48341 if (element.hasLastReviewDateElement()) { 48342 composeDate("lastReviewDate", element.getLastReviewDateElement()); 48343 } 48344 if (element.hasEffectivePeriod()) { 48345 composePeriod("effectivePeriod", element.getEffectivePeriod()); 48346 } 48347 if (element.hasTopic()) { 48348 for (CodeableConcept e : element.getTopic()) 48349 composeCodeableConcept("topic", e); 48350 } 48351 if (element.hasAuthor()) { 48352 for (ContactDetail e : element.getAuthor()) 48353 composeContactDetail("author", e); 48354 } 48355 if (element.hasEditor()) { 48356 for (ContactDetail e : element.getEditor()) 48357 composeContactDetail("editor", e); 48358 } 48359 if (element.hasReviewer()) { 48360 for (ContactDetail e : element.getReviewer()) 48361 composeContactDetail("reviewer", e); 48362 } 48363 if (element.hasEndorser()) { 48364 for (ContactDetail e : element.getEndorser()) 48365 composeContactDetail("endorser", e); 48366 } 48367 if (element.hasRelatedArtifact()) { 48368 for (RelatedArtifact e : element.getRelatedArtifact()) 48369 composeRelatedArtifact("relatedArtifact", e); 48370 } 48371 if (element.hasSynthesisType()) { 48372 composeCodeableConcept("synthesisType", element.getSynthesisType()); 48373 } 48374 if (element.hasStudyType()) { 48375 composeCodeableConcept("studyType", element.getStudyType()); 48376 } 48377 if (element.hasPopulation()) { 48378 composeReference("population", element.getPopulation()); 48379 } 48380 if (element.hasExposure()) { 48381 composeReference("exposure", element.getExposure()); 48382 } 48383 if (element.hasOutcome()) { 48384 composeReference("outcome", element.getOutcome()); 48385 } 48386 if (element.hasSampleSize()) { 48387 composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent("sampleSize", element.getSampleSize()); 48388 } 48389 if (element.hasRiskEstimate()) { 48390 composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent("riskEstimate", element.getRiskEstimate()); 48391 } 48392 if (element.hasCertainty()) { 48393 for (RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent e : element.getCertainty()) 48394 composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent("certainty", e); 48395 } 48396 } 48397 48398 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponent(String name, 48399 RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent element) throws IOException { 48400 if (element != null) { 48401 composeElementAttributes(element); 48402 xml.enter(FHIR_NS, name); 48403 composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentElements(element); 48404 composeElementClose(element); 48405 xml.exit(FHIR_NS, name); 48406 } 48407 } 48408 48409 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisSampleSizeComponentElements( 48410 RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent element) throws IOException { 48411 composeBackboneElementElements(element); 48412 if (element.hasDescriptionElement()) { 48413 composeString("description", element.getDescriptionElement()); 48414 } 48415 if (element.hasNumberOfStudiesElement()) { 48416 composeInteger("numberOfStudies", element.getNumberOfStudiesElement()); 48417 } 48418 if (element.hasNumberOfParticipantsElement()) { 48419 composeInteger("numberOfParticipants", element.getNumberOfParticipantsElement()); 48420 } 48421 } 48422 48423 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponent(String name, 48424 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent element) throws IOException { 48425 if (element != null) { 48426 composeElementAttributes(element); 48427 xml.enter(FHIR_NS, name); 48428 composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentElements(element); 48429 composeElementClose(element); 48430 xml.exit(FHIR_NS, name); 48431 } 48432 } 48433 48434 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimateComponentElements( 48435 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent element) throws IOException { 48436 composeBackboneElementElements(element); 48437 if (element.hasDescriptionElement()) { 48438 composeString("description", element.getDescriptionElement()); 48439 } 48440 if (element.hasType()) { 48441 composeCodeableConcept("type", element.getType()); 48442 } 48443 if (element.hasValueElement()) { 48444 composeDecimal("value", element.getValueElement()); 48445 } 48446 if (element.hasUnitOfMeasure()) { 48447 composeCodeableConcept("unitOfMeasure", element.getUnitOfMeasure()); 48448 } 48449 if (element.hasDenominatorCountElement()) { 48450 composeInteger("denominatorCount", element.getDenominatorCountElement()); 48451 } 48452 if (element.hasNumeratorCountElement()) { 48453 composeInteger("numeratorCount", element.getNumeratorCountElement()); 48454 } 48455 if (element.hasPrecisionEstimate()) { 48456 for (RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent e : element 48457 .getPrecisionEstimate()) 48458 composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent("precisionEstimate", e); 48459 } 48460 } 48461 48462 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(String name, 48463 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent element) throws IOException { 48464 if (element != null) { 48465 composeElementAttributes(element); 48466 xml.enter(FHIR_NS, name); 48467 composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentElements(element); 48468 composeElementClose(element); 48469 xml.exit(FHIR_NS, name); 48470 } 48471 } 48472 48473 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponentElements( 48474 RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent element) throws IOException { 48475 composeBackboneElementElements(element); 48476 if (element.hasType()) { 48477 composeCodeableConcept("type", element.getType()); 48478 } 48479 if (element.hasLevelElement()) { 48480 composeDecimal("level", element.getLevelElement()); 48481 } 48482 if (element.hasFromElement()) { 48483 composeDecimal("from", element.getFromElement()); 48484 } 48485 if (element.hasToElement()) { 48486 composeDecimal("to", element.getToElement()); 48487 } 48488 } 48489 48490 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponent(String name, 48491 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent element) throws IOException { 48492 if (element != null) { 48493 composeElementAttributes(element); 48494 xml.enter(FHIR_NS, name); 48495 composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentElements(element); 48496 composeElementClose(element); 48497 xml.exit(FHIR_NS, name); 48498 } 48499 } 48500 48501 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyComponentElements( 48502 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent element) throws IOException { 48503 composeBackboneElementElements(element); 48504 if (element.hasRating()) { 48505 for (CodeableConcept e : element.getRating()) 48506 composeCodeableConcept("rating", e); 48507 } 48508 if (element.hasNote()) { 48509 for (Annotation e : element.getNote()) 48510 composeAnnotation("note", e); 48511 } 48512 if (element.hasCertaintySubcomponent()) { 48513 for (RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent e : element 48514 .getCertaintySubcomponent()) 48515 composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent( 48516 "certaintySubcomponent", e); 48517 } 48518 } 48519 48520 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(String name, 48521 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) throws IOException { 48522 if (element != null) { 48523 composeElementAttributes(element); 48524 xml.enter(FHIR_NS, name); 48525 composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentElements(element); 48526 composeElementClose(element); 48527 xml.exit(FHIR_NS, name); 48528 } 48529 } 48530 48531 protected void composeRiskEvidenceSynthesisRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponentElements( 48532 RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent element) throws IOException { 48533 composeBackboneElementElements(element); 48534 if (element.hasType()) { 48535 composeCodeableConcept("type", element.getType()); 48536 } 48537 if (element.hasRating()) { 48538 for (CodeableConcept e : element.getRating()) 48539 composeCodeableConcept("rating", e); 48540 } 48541 if (element.hasNote()) { 48542 for (Annotation e : element.getNote()) 48543 composeAnnotation("note", e); 48544 } 48545 } 48546 48547 protected void composeSchedule(String name, Schedule element) throws IOException { 48548 if (element != null) { 48549 composeDomainResourceAttributes(element); 48550 xml.enter(FHIR_NS, name); 48551 composeScheduleElements(element); 48552 composeElementClose(element); 48553 xml.exit(FHIR_NS, name); 48554 } 48555 } 48556 48557 protected void composeScheduleElements(Schedule element) throws IOException { 48558 composeDomainResourceElements(element); 48559 if (element.hasIdentifier()) { 48560 for (Identifier e : element.getIdentifier()) 48561 composeIdentifier("identifier", e); 48562 } 48563 if (element.hasActiveElement()) { 48564 composeBoolean("active", element.getActiveElement()); 48565 } 48566 if (element.hasServiceCategory()) { 48567 for (CodeableConcept e : element.getServiceCategory()) 48568 composeCodeableConcept("serviceCategory", e); 48569 } 48570 if (element.hasServiceType()) { 48571 for (CodeableConcept e : element.getServiceType()) 48572 composeCodeableConcept("serviceType", e); 48573 } 48574 if (element.hasSpecialty()) { 48575 for (CodeableConcept e : element.getSpecialty()) 48576 composeCodeableConcept("specialty", e); 48577 } 48578 if (element.hasActor()) { 48579 for (Reference e : element.getActor()) 48580 composeReference("actor", e); 48581 } 48582 if (element.hasPlanningHorizon()) { 48583 composePeriod("planningHorizon", element.getPlanningHorizon()); 48584 } 48585 if (element.hasCommentElement()) { 48586 composeString("comment", element.getCommentElement()); 48587 } 48588 } 48589 48590 protected void composeSearchParameter(String name, SearchParameter element) throws IOException { 48591 if (element != null) { 48592 composeDomainResourceAttributes(element); 48593 xml.enter(FHIR_NS, name); 48594 composeSearchParameterElements(element); 48595 composeElementClose(element); 48596 xml.exit(FHIR_NS, name); 48597 } 48598 } 48599 48600 protected void composeSearchParameterElements(SearchParameter element) throws IOException { 48601 composeDomainResourceElements(element); 48602 if (element.hasUrlElement()) { 48603 composeUri("url", element.getUrlElement()); 48604 } 48605 if (element.hasVersionElement()) { 48606 composeString("version", element.getVersionElement()); 48607 } 48608 if (element.hasNameElement()) { 48609 composeString("name", element.getNameElement()); 48610 } 48611 if (element.hasDerivedFromElement()) { 48612 composeCanonical("derivedFrom", element.getDerivedFromElement()); 48613 } 48614 if (element.hasStatusElement()) 48615 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 48616 if (element.hasExperimentalElement()) { 48617 composeBoolean("experimental", element.getExperimentalElement()); 48618 } 48619 if (element.hasDateElement()) { 48620 composeDateTime("date", element.getDateElement()); 48621 } 48622 if (element.hasPublisherElement()) { 48623 composeString("publisher", element.getPublisherElement()); 48624 } 48625 if (element.hasContact()) { 48626 for (ContactDetail e : element.getContact()) 48627 composeContactDetail("contact", e); 48628 } 48629 if (element.hasDescriptionElement()) { 48630 composeMarkdown("description", element.getDescriptionElement()); 48631 } 48632 if (element.hasUseContext()) { 48633 for (UsageContext e : element.getUseContext()) 48634 composeUsageContext("useContext", e); 48635 } 48636 if (element.hasJurisdiction()) { 48637 for (CodeableConcept e : element.getJurisdiction()) 48638 composeCodeableConcept("jurisdiction", e); 48639 } 48640 if (element.hasPurposeElement()) { 48641 composeMarkdown("purpose", element.getPurposeElement()); 48642 } 48643 if (element.hasCodeElement()) { 48644 composeCode("code", element.getCodeElement()); 48645 } 48646 if (element.hasBase()) { 48647 for (CodeType e : element.getBase()) 48648 composeCode("base", e); 48649 } 48650 if (element.hasTypeElement()) 48651 composeEnumeration("type", element.getTypeElement(), new Enumerations.SearchParamTypeEnumFactory()); 48652 if (element.hasExpressionElement()) { 48653 composeString("expression", element.getExpressionElement()); 48654 } 48655 if (element.hasXpathElement()) { 48656 composeString("xpath", element.getXpathElement()); 48657 } 48658 if (element.hasXpathUsageElement()) 48659 composeEnumeration("xpathUsage", element.getXpathUsageElement(), new SearchParameter.XPathUsageTypeEnumFactory()); 48660 if (element.hasTarget()) { 48661 for (CodeType e : element.getTarget()) 48662 composeCode("target", e); 48663 } 48664 if (element.hasMultipleOrElement()) { 48665 composeBoolean("multipleOr", element.getMultipleOrElement()); 48666 } 48667 if (element.hasMultipleAndElement()) { 48668 composeBoolean("multipleAnd", element.getMultipleAndElement()); 48669 } 48670 if (element.hasComparator()) 48671 for (Enumeration<SearchParameter.SearchComparator> e : element.getComparator()) 48672 composeEnumeration("comparator", e, new SearchParameter.SearchComparatorEnumFactory()); 48673 if (element.hasModifier()) 48674 for (Enumeration<SearchParameter.SearchModifierCode> e : element.getModifier()) 48675 composeEnumeration("modifier", e, new SearchParameter.SearchModifierCodeEnumFactory()); 48676 if (element.hasChain()) { 48677 for (StringType e : element.getChain()) 48678 composeString("chain", e); 48679 } 48680 if (element.hasComponent()) { 48681 for (SearchParameter.SearchParameterComponentComponent e : element.getComponent()) 48682 composeSearchParameterSearchParameterComponentComponent("component", e); 48683 } 48684 } 48685 48686 protected void composeSearchParameterSearchParameterComponentComponent(String name, 48687 SearchParameter.SearchParameterComponentComponent element) throws IOException { 48688 if (element != null) { 48689 composeElementAttributes(element); 48690 xml.enter(FHIR_NS, name); 48691 composeSearchParameterSearchParameterComponentComponentElements(element); 48692 composeElementClose(element); 48693 xml.exit(FHIR_NS, name); 48694 } 48695 } 48696 48697 protected void composeSearchParameterSearchParameterComponentComponentElements( 48698 SearchParameter.SearchParameterComponentComponent element) throws IOException { 48699 composeBackboneElementElements(element); 48700 if (element.hasDefinitionElement()) { 48701 composeCanonical("definition", element.getDefinitionElement()); 48702 } 48703 if (element.hasExpressionElement()) { 48704 composeString("expression", element.getExpressionElement()); 48705 } 48706 } 48707 48708 protected void composeServiceRequest(String name, ServiceRequest element) throws IOException { 48709 if (element != null) { 48710 composeDomainResourceAttributes(element); 48711 xml.enter(FHIR_NS, name); 48712 composeServiceRequestElements(element); 48713 composeElementClose(element); 48714 xml.exit(FHIR_NS, name); 48715 } 48716 } 48717 48718 protected void composeServiceRequestElements(ServiceRequest element) throws IOException { 48719 composeDomainResourceElements(element); 48720 if (element.hasIdentifier()) { 48721 for (Identifier e : element.getIdentifier()) 48722 composeIdentifier("identifier", e); 48723 } 48724 if (element.hasInstantiatesCanonical()) { 48725 for (CanonicalType e : element.getInstantiatesCanonical()) 48726 composeCanonical("instantiatesCanonical", e); 48727 } 48728 if (element.hasInstantiatesUri()) { 48729 for (UriType e : element.getInstantiatesUri()) 48730 composeUri("instantiatesUri", e); 48731 } 48732 if (element.hasBasedOn()) { 48733 for (Reference e : element.getBasedOn()) 48734 composeReference("basedOn", e); 48735 } 48736 if (element.hasReplaces()) { 48737 for (Reference e : element.getReplaces()) 48738 composeReference("replaces", e); 48739 } 48740 if (element.hasRequisition()) { 48741 composeIdentifier("requisition", element.getRequisition()); 48742 } 48743 if (element.hasStatusElement()) 48744 composeEnumeration("status", element.getStatusElement(), new ServiceRequest.ServiceRequestStatusEnumFactory()); 48745 if (element.hasIntentElement()) 48746 composeEnumeration("intent", element.getIntentElement(), new ServiceRequest.ServiceRequestIntentEnumFactory()); 48747 if (element.hasCategory()) { 48748 for (CodeableConcept e : element.getCategory()) 48749 composeCodeableConcept("category", e); 48750 } 48751 if (element.hasPriorityElement()) 48752 composeEnumeration("priority", element.getPriorityElement(), 48753 new ServiceRequest.ServiceRequestPriorityEnumFactory()); 48754 if (element.hasDoNotPerformElement()) { 48755 composeBoolean("doNotPerform", element.getDoNotPerformElement()); 48756 } 48757 if (element.hasCode()) { 48758 composeCodeableConcept("code", element.getCode()); 48759 } 48760 if (element.hasOrderDetail()) { 48761 for (CodeableConcept e : element.getOrderDetail()) 48762 composeCodeableConcept("orderDetail", e); 48763 } 48764 if (element.hasQuantity()) { 48765 composeType("quantity", element.getQuantity()); 48766 } 48767 if (element.hasSubject()) { 48768 composeReference("subject", element.getSubject()); 48769 } 48770 if (element.hasEncounter()) { 48771 composeReference("encounter", element.getEncounter()); 48772 } 48773 if (element.hasOccurrence()) { 48774 composeType("occurrence", element.getOccurrence()); 48775 } 48776 if (element.hasAsNeeded()) { 48777 composeType("asNeeded", element.getAsNeeded()); 48778 } 48779 if (element.hasAuthoredOnElement()) { 48780 composeDateTime("authoredOn", element.getAuthoredOnElement()); 48781 } 48782 if (element.hasRequester()) { 48783 composeReference("requester", element.getRequester()); 48784 } 48785 if (element.hasPerformerType()) { 48786 composeCodeableConcept("performerType", element.getPerformerType()); 48787 } 48788 if (element.hasPerformer()) { 48789 for (Reference e : element.getPerformer()) 48790 composeReference("performer", e); 48791 } 48792 if (element.hasLocationCode()) { 48793 for (CodeableConcept e : element.getLocationCode()) 48794 composeCodeableConcept("locationCode", e); 48795 } 48796 if (element.hasLocationReference()) { 48797 for (Reference e : element.getLocationReference()) 48798 composeReference("locationReference", e); 48799 } 48800 if (element.hasReasonCode()) { 48801 for (CodeableConcept e : element.getReasonCode()) 48802 composeCodeableConcept("reasonCode", e); 48803 } 48804 if (element.hasReasonReference()) { 48805 for (Reference e : element.getReasonReference()) 48806 composeReference("reasonReference", e); 48807 } 48808 if (element.hasInsurance()) { 48809 for (Reference e : element.getInsurance()) 48810 composeReference("insurance", e); 48811 } 48812 if (element.hasSupportingInfo()) { 48813 for (Reference e : element.getSupportingInfo()) 48814 composeReference("supportingInfo", e); 48815 } 48816 if (element.hasSpecimen()) { 48817 for (Reference e : element.getSpecimen()) 48818 composeReference("specimen", e); 48819 } 48820 if (element.hasBodySite()) { 48821 for (CodeableConcept e : element.getBodySite()) 48822 composeCodeableConcept("bodySite", e); 48823 } 48824 if (element.hasNote()) { 48825 for (Annotation e : element.getNote()) 48826 composeAnnotation("note", e); 48827 } 48828 if (element.hasPatientInstructionElement()) { 48829 composeString("patientInstruction", element.getPatientInstructionElement()); 48830 } 48831 if (element.hasRelevantHistory()) { 48832 for (Reference e : element.getRelevantHistory()) 48833 composeReference("relevantHistory", e); 48834 } 48835 } 48836 48837 protected void composeSlot(String name, Slot element) throws IOException { 48838 if (element != null) { 48839 composeDomainResourceAttributes(element); 48840 xml.enter(FHIR_NS, name); 48841 composeSlotElements(element); 48842 composeElementClose(element); 48843 xml.exit(FHIR_NS, name); 48844 } 48845 } 48846 48847 protected void composeSlotElements(Slot element) throws IOException { 48848 composeDomainResourceElements(element); 48849 if (element.hasIdentifier()) { 48850 for (Identifier e : element.getIdentifier()) 48851 composeIdentifier("identifier", e); 48852 } 48853 if (element.hasServiceCategory()) { 48854 for (CodeableConcept e : element.getServiceCategory()) 48855 composeCodeableConcept("serviceCategory", e); 48856 } 48857 if (element.hasServiceType()) { 48858 for (CodeableConcept e : element.getServiceType()) 48859 composeCodeableConcept("serviceType", e); 48860 } 48861 if (element.hasSpecialty()) { 48862 for (CodeableConcept e : element.getSpecialty()) 48863 composeCodeableConcept("specialty", e); 48864 } 48865 if (element.hasAppointmentType()) { 48866 composeCodeableConcept("appointmentType", element.getAppointmentType()); 48867 } 48868 if (element.hasSchedule()) { 48869 composeReference("schedule", element.getSchedule()); 48870 } 48871 if (element.hasStatusElement()) 48872 composeEnumeration("status", element.getStatusElement(), new Slot.SlotStatusEnumFactory()); 48873 if (element.hasStartElement()) { 48874 composeInstant("start", element.getStartElement()); 48875 } 48876 if (element.hasEndElement()) { 48877 composeInstant("end", element.getEndElement()); 48878 } 48879 if (element.hasOverbookedElement()) { 48880 composeBoolean("overbooked", element.getOverbookedElement()); 48881 } 48882 if (element.hasCommentElement()) { 48883 composeString("comment", element.getCommentElement()); 48884 } 48885 } 48886 48887 protected void composeSpecimen(String name, Specimen element) throws IOException { 48888 if (element != null) { 48889 composeDomainResourceAttributes(element); 48890 xml.enter(FHIR_NS, name); 48891 composeSpecimenElements(element); 48892 composeElementClose(element); 48893 xml.exit(FHIR_NS, name); 48894 } 48895 } 48896 48897 protected void composeSpecimenElements(Specimen element) throws IOException { 48898 composeDomainResourceElements(element); 48899 if (element.hasIdentifier()) { 48900 for (Identifier e : element.getIdentifier()) 48901 composeIdentifier("identifier", e); 48902 } 48903 if (element.hasAccessionIdentifier()) { 48904 composeIdentifier("accessionIdentifier", element.getAccessionIdentifier()); 48905 } 48906 if (element.hasStatusElement()) 48907 composeEnumeration("status", element.getStatusElement(), new Specimen.SpecimenStatusEnumFactory()); 48908 if (element.hasType()) { 48909 composeCodeableConcept("type", element.getType()); 48910 } 48911 if (element.hasSubject()) { 48912 composeReference("subject", element.getSubject()); 48913 } 48914 if (element.hasReceivedTimeElement()) { 48915 composeDateTime("receivedTime", element.getReceivedTimeElement()); 48916 } 48917 if (element.hasParent()) { 48918 for (Reference e : element.getParent()) 48919 composeReference("parent", e); 48920 } 48921 if (element.hasRequest()) { 48922 for (Reference e : element.getRequest()) 48923 composeReference("request", e); 48924 } 48925 if (element.hasCollection()) { 48926 composeSpecimenSpecimenCollectionComponent("collection", element.getCollection()); 48927 } 48928 if (element.hasProcessing()) { 48929 for (Specimen.SpecimenProcessingComponent e : element.getProcessing()) 48930 composeSpecimenSpecimenProcessingComponent("processing", e); 48931 } 48932 if (element.hasContainer()) { 48933 for (Specimen.SpecimenContainerComponent e : element.getContainer()) 48934 composeSpecimenSpecimenContainerComponent("container", e); 48935 } 48936 if (element.hasCondition()) { 48937 for (CodeableConcept e : element.getCondition()) 48938 composeCodeableConcept("condition", e); 48939 } 48940 if (element.hasNote()) { 48941 for (Annotation e : element.getNote()) 48942 composeAnnotation("note", e); 48943 } 48944 } 48945 48946 protected void composeSpecimenSpecimenCollectionComponent(String name, Specimen.SpecimenCollectionComponent element) 48947 throws IOException { 48948 if (element != null) { 48949 composeElementAttributes(element); 48950 xml.enter(FHIR_NS, name); 48951 composeSpecimenSpecimenCollectionComponentElements(element); 48952 composeElementClose(element); 48953 xml.exit(FHIR_NS, name); 48954 } 48955 } 48956 48957 protected void composeSpecimenSpecimenCollectionComponentElements(Specimen.SpecimenCollectionComponent element) 48958 throws IOException { 48959 composeBackboneElementElements(element); 48960 if (element.hasCollector()) { 48961 composeReference("collector", element.getCollector()); 48962 } 48963 if (element.hasCollected()) { 48964 composeType("collected", element.getCollected()); 48965 } 48966 if (element.hasDuration()) { 48967 composeDuration("duration", element.getDuration()); 48968 } 48969 if (element.hasQuantity()) { 48970 composeQuantity("quantity", element.getQuantity()); 48971 } 48972 if (element.hasMethod()) { 48973 composeCodeableConcept("method", element.getMethod()); 48974 } 48975 if (element.hasBodySite()) { 48976 composeCodeableConcept("bodySite", element.getBodySite()); 48977 } 48978 if (element.hasFastingStatus()) { 48979 composeType("fastingStatus", element.getFastingStatus()); 48980 } 48981 } 48982 48983 protected void composeSpecimenSpecimenProcessingComponent(String name, Specimen.SpecimenProcessingComponent element) 48984 throws IOException { 48985 if (element != null) { 48986 composeElementAttributes(element); 48987 xml.enter(FHIR_NS, name); 48988 composeSpecimenSpecimenProcessingComponentElements(element); 48989 composeElementClose(element); 48990 xml.exit(FHIR_NS, name); 48991 } 48992 } 48993 48994 protected void composeSpecimenSpecimenProcessingComponentElements(Specimen.SpecimenProcessingComponent element) 48995 throws IOException { 48996 composeBackboneElementElements(element); 48997 if (element.hasDescriptionElement()) { 48998 composeString("description", element.getDescriptionElement()); 48999 } 49000 if (element.hasProcedure()) { 49001 composeCodeableConcept("procedure", element.getProcedure()); 49002 } 49003 if (element.hasAdditive()) { 49004 for (Reference e : element.getAdditive()) 49005 composeReference("additive", e); 49006 } 49007 if (element.hasTime()) { 49008 composeType("time", element.getTime()); 49009 } 49010 } 49011 49012 protected void composeSpecimenSpecimenContainerComponent(String name, Specimen.SpecimenContainerComponent element) 49013 throws IOException { 49014 if (element != null) { 49015 composeElementAttributes(element); 49016 xml.enter(FHIR_NS, name); 49017 composeSpecimenSpecimenContainerComponentElements(element); 49018 composeElementClose(element); 49019 xml.exit(FHIR_NS, name); 49020 } 49021 } 49022 49023 protected void composeSpecimenSpecimenContainerComponentElements(Specimen.SpecimenContainerComponent element) 49024 throws IOException { 49025 composeBackboneElementElements(element); 49026 if (element.hasIdentifier()) { 49027 for (Identifier e : element.getIdentifier()) 49028 composeIdentifier("identifier", e); 49029 } 49030 if (element.hasDescriptionElement()) { 49031 composeString("description", element.getDescriptionElement()); 49032 } 49033 if (element.hasType()) { 49034 composeCodeableConcept("type", element.getType()); 49035 } 49036 if (element.hasCapacity()) { 49037 composeQuantity("capacity", element.getCapacity()); 49038 } 49039 if (element.hasSpecimenQuantity()) { 49040 composeQuantity("specimenQuantity", element.getSpecimenQuantity()); 49041 } 49042 if (element.hasAdditive()) { 49043 composeType("additive", element.getAdditive()); 49044 } 49045 } 49046 49047 protected void composeSpecimenDefinition(String name, SpecimenDefinition element) throws IOException { 49048 if (element != null) { 49049 composeDomainResourceAttributes(element); 49050 xml.enter(FHIR_NS, name); 49051 composeSpecimenDefinitionElements(element); 49052 composeElementClose(element); 49053 xml.exit(FHIR_NS, name); 49054 } 49055 } 49056 49057 protected void composeSpecimenDefinitionElements(SpecimenDefinition element) throws IOException { 49058 composeDomainResourceElements(element); 49059 if (element.hasIdentifier()) { 49060 composeIdentifier("identifier", element.getIdentifier()); 49061 } 49062 if (element.hasTypeCollected()) { 49063 composeCodeableConcept("typeCollected", element.getTypeCollected()); 49064 } 49065 if (element.hasPatientPreparation()) { 49066 for (CodeableConcept e : element.getPatientPreparation()) 49067 composeCodeableConcept("patientPreparation", e); 49068 } 49069 if (element.hasTimeAspectElement()) { 49070 composeString("timeAspect", element.getTimeAspectElement()); 49071 } 49072 if (element.hasCollection()) { 49073 for (CodeableConcept e : element.getCollection()) 49074 composeCodeableConcept("collection", e); 49075 } 49076 if (element.hasTypeTested()) { 49077 for (SpecimenDefinition.SpecimenDefinitionTypeTestedComponent e : element.getTypeTested()) 49078 composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponent("typeTested", e); 49079 } 49080 } 49081 49082 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponent(String name, 49083 SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException { 49084 if (element != null) { 49085 composeElementAttributes(element); 49086 xml.enter(FHIR_NS, name); 49087 composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponentElements(element); 49088 composeElementClose(element); 49089 xml.exit(FHIR_NS, name); 49090 } 49091 } 49092 49093 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedComponentElements( 49094 SpecimenDefinition.SpecimenDefinitionTypeTestedComponent element) throws IOException { 49095 composeBackboneElementElements(element); 49096 if (element.hasIsDerivedElement()) { 49097 composeBoolean("isDerived", element.getIsDerivedElement()); 49098 } 49099 if (element.hasType()) { 49100 composeCodeableConcept("type", element.getType()); 49101 } 49102 if (element.hasPreferenceElement()) 49103 composeEnumeration("preference", element.getPreferenceElement(), 49104 new SpecimenDefinition.SpecimenContainedPreferenceEnumFactory()); 49105 if (element.hasContainer()) { 49106 composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent("container", element.getContainer()); 49107 } 49108 if (element.hasRequirementElement()) { 49109 composeString("requirement", element.getRequirementElement()); 49110 } 49111 if (element.hasRetentionTime()) { 49112 composeDuration("retentionTime", element.getRetentionTime()); 49113 } 49114 if (element.hasRejectionCriterion()) { 49115 for (CodeableConcept e : element.getRejectionCriterion()) 49116 composeCodeableConcept("rejectionCriterion", e); 49117 } 49118 if (element.hasHandling()) { 49119 for (SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent e : element.getHandling()) 49120 composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent("handling", e); 49121 } 49122 } 49123 49124 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponent(String name, 49125 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException { 49126 if (element != null) { 49127 composeElementAttributes(element); 49128 xml.enter(FHIR_NS, name); 49129 composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentElements(element); 49130 composeElementClose(element); 49131 xml.exit(FHIR_NS, name); 49132 } 49133 } 49134 49135 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerComponentElements( 49136 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerComponent element) throws IOException { 49137 composeBackboneElementElements(element); 49138 if (element.hasMaterial()) { 49139 composeCodeableConcept("material", element.getMaterial()); 49140 } 49141 if (element.hasType()) { 49142 composeCodeableConcept("type", element.getType()); 49143 } 49144 if (element.hasCap()) { 49145 composeCodeableConcept("cap", element.getCap()); 49146 } 49147 if (element.hasDescriptionElement()) { 49148 composeString("description", element.getDescriptionElement()); 49149 } 49150 if (element.hasCapacity()) { 49151 composeQuantity("capacity", element.getCapacity()); 49152 } 49153 if (element.hasMinimumVolume()) { 49154 composeType("minimumVolume", element.getMinimumVolume()); 49155 } 49156 if (element.hasAdditive()) { 49157 for (SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent e : element.getAdditive()) 49158 composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent("additive", e); 49159 } 49160 if (element.hasPreparationElement()) { 49161 composeString("preparation", element.getPreparationElement()); 49162 } 49163 } 49164 49165 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponent(String name, 49166 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException { 49167 if (element != null) { 49168 composeElementAttributes(element); 49169 xml.enter(FHIR_NS, name); 49170 composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentElements(element); 49171 composeElementClose(element); 49172 xml.exit(FHIR_NS, name); 49173 } 49174 } 49175 49176 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedContainerAdditiveComponentElements( 49177 SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent element) throws IOException { 49178 composeBackboneElementElements(element); 49179 if (element.hasAdditive()) { 49180 composeType("additive", element.getAdditive()); 49181 } 49182 } 49183 49184 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponent(String name, 49185 SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException { 49186 if (element != null) { 49187 composeElementAttributes(element); 49188 xml.enter(FHIR_NS, name); 49189 composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentElements(element); 49190 composeElementClose(element); 49191 xml.exit(FHIR_NS, name); 49192 } 49193 } 49194 49195 protected void composeSpecimenDefinitionSpecimenDefinitionTypeTestedHandlingComponentElements( 49196 SpecimenDefinition.SpecimenDefinitionTypeTestedHandlingComponent element) throws IOException { 49197 composeBackboneElementElements(element); 49198 if (element.hasTemperatureQualifier()) { 49199 composeCodeableConcept("temperatureQualifier", element.getTemperatureQualifier()); 49200 } 49201 if (element.hasTemperatureRange()) { 49202 composeRange("temperatureRange", element.getTemperatureRange()); 49203 } 49204 if (element.hasMaxDuration()) { 49205 composeDuration("maxDuration", element.getMaxDuration()); 49206 } 49207 if (element.hasInstructionElement()) { 49208 composeString("instruction", element.getInstructionElement()); 49209 } 49210 } 49211 49212 protected void composeStructureDefinition(String name, StructureDefinition element) throws IOException { 49213 if (element != null) { 49214 composeDomainResourceAttributes(element); 49215 xml.enter(FHIR_NS, name); 49216 composeStructureDefinitionElements(element); 49217 composeElementClose(element); 49218 xml.exit(FHIR_NS, name); 49219 } 49220 } 49221 49222 protected void composeStructureDefinitionElements(StructureDefinition element) throws IOException { 49223 composeDomainResourceElements(element); 49224 if (element.hasUrlElement()) { 49225 composeUri("url", element.getUrlElement()); 49226 } 49227 if (element.hasIdentifier()) { 49228 for (Identifier e : element.getIdentifier()) 49229 composeIdentifier("identifier", e); 49230 } 49231 if (element.hasVersionElement()) { 49232 composeString("version", element.getVersionElement()); 49233 } 49234 if (element.hasNameElement()) { 49235 composeString("name", element.getNameElement()); 49236 } 49237 if (element.hasTitleElement()) { 49238 composeString("title", element.getTitleElement()); 49239 } 49240 if (element.hasStatusElement()) 49241 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 49242 if (element.hasExperimentalElement()) { 49243 composeBoolean("experimental", element.getExperimentalElement()); 49244 } 49245 if (element.hasDateElement()) { 49246 composeDateTime("date", element.getDateElement()); 49247 } 49248 if (element.hasPublisherElement()) { 49249 composeString("publisher", element.getPublisherElement()); 49250 } 49251 if (element.hasContact()) { 49252 for (ContactDetail e : element.getContact()) 49253 composeContactDetail("contact", e); 49254 } 49255 if (element.hasDescriptionElement()) { 49256 composeMarkdown("description", element.getDescriptionElement()); 49257 } 49258 if (element.hasUseContext()) { 49259 for (UsageContext e : element.getUseContext()) 49260 composeUsageContext("useContext", e); 49261 } 49262 if (element.hasJurisdiction()) { 49263 for (CodeableConcept e : element.getJurisdiction()) 49264 composeCodeableConcept("jurisdiction", e); 49265 } 49266 if (element.hasPurposeElement()) { 49267 composeMarkdown("purpose", element.getPurposeElement()); 49268 } 49269 if (element.hasCopyrightElement()) { 49270 composeMarkdown("copyright", element.getCopyrightElement()); 49271 } 49272 if (element.hasKeyword()) { 49273 for (Coding e : element.getKeyword()) 49274 composeCoding("keyword", e); 49275 } 49276 if (element.hasFhirVersionElement()) 49277 composeEnumeration("fhirVersion", element.getFhirVersionElement(), new Enumerations.FHIRVersionEnumFactory()); 49278 if (element.hasMapping()) { 49279 for (StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping()) 49280 composeStructureDefinitionStructureDefinitionMappingComponent("mapping", e); 49281 } 49282 if (element.hasKindElement()) 49283 composeEnumeration("kind", element.getKindElement(), 49284 new StructureDefinition.StructureDefinitionKindEnumFactory()); 49285 if (element.hasAbstractElement()) { 49286 composeBoolean("abstract", element.getAbstractElement()); 49287 } 49288 if (element.hasContext()) { 49289 for (StructureDefinition.StructureDefinitionContextComponent e : element.getContext()) 49290 composeStructureDefinitionStructureDefinitionContextComponent("context", e); 49291 } 49292 if (element.hasContextInvariant()) { 49293 for (StringType e : element.getContextInvariant()) 49294 composeString("contextInvariant", e); 49295 } 49296 if (element.hasTypeElement()) { 49297 composeUri("type", element.getTypeElement()); 49298 } 49299 if (element.hasBaseDefinitionElement()) { 49300 composeCanonical("baseDefinition", element.getBaseDefinitionElement()); 49301 } 49302 if (element.hasDerivationElement()) 49303 composeEnumeration("derivation", element.getDerivationElement(), 49304 new StructureDefinition.TypeDerivationRuleEnumFactory()); 49305 if (element.hasSnapshot()) { 49306 composeStructureDefinitionStructureDefinitionSnapshotComponent("snapshot", element.getSnapshot()); 49307 } 49308 if (element.hasDifferential()) { 49309 composeStructureDefinitionStructureDefinitionDifferentialComponent("differential", element.getDifferential()); 49310 } 49311 } 49312 49313 protected void composeStructureDefinitionStructureDefinitionMappingComponent(String name, 49314 StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { 49315 if (element != null) { 49316 composeElementAttributes(element); 49317 xml.enter(FHIR_NS, name); 49318 composeStructureDefinitionStructureDefinitionMappingComponentElements(element); 49319 composeElementClose(element); 49320 xml.exit(FHIR_NS, name); 49321 } 49322 } 49323 49324 protected void composeStructureDefinitionStructureDefinitionMappingComponentElements( 49325 StructureDefinition.StructureDefinitionMappingComponent element) throws IOException { 49326 composeBackboneElementElements(element); 49327 if (element.hasIdentityElement()) { 49328 composeId("identity", element.getIdentityElement()); 49329 } 49330 if (element.hasUriElement()) { 49331 composeUri("uri", element.getUriElement()); 49332 } 49333 if (element.hasNameElement()) { 49334 composeString("name", element.getNameElement()); 49335 } 49336 if (element.hasCommentElement()) { 49337 composeString("comment", element.getCommentElement()); 49338 } 49339 } 49340 49341 protected void composeStructureDefinitionStructureDefinitionContextComponent(String name, 49342 StructureDefinition.StructureDefinitionContextComponent element) throws IOException { 49343 if (element != null) { 49344 composeElementAttributes(element); 49345 xml.enter(FHIR_NS, name); 49346 composeStructureDefinitionStructureDefinitionContextComponentElements(element); 49347 composeElementClose(element); 49348 xml.exit(FHIR_NS, name); 49349 } 49350 } 49351 49352 protected void composeStructureDefinitionStructureDefinitionContextComponentElements( 49353 StructureDefinition.StructureDefinitionContextComponent element) throws IOException { 49354 composeBackboneElementElements(element); 49355 if (element.hasTypeElement()) 49356 composeEnumeration("type", element.getTypeElement(), new StructureDefinition.ExtensionContextTypeEnumFactory()); 49357 if (element.hasExpressionElement()) { 49358 composeString("expression", element.getExpressionElement()); 49359 } 49360 } 49361 49362 protected void composeStructureDefinitionStructureDefinitionSnapshotComponent(String name, 49363 StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { 49364 if (element != null) { 49365 composeElementAttributes(element); 49366 xml.enter(FHIR_NS, name); 49367 composeStructureDefinitionStructureDefinitionSnapshotComponentElements(element); 49368 composeElementClose(element); 49369 xml.exit(FHIR_NS, name); 49370 } 49371 } 49372 49373 protected void composeStructureDefinitionStructureDefinitionSnapshotComponentElements( 49374 StructureDefinition.StructureDefinitionSnapshotComponent element) throws IOException { 49375 composeBackboneElementElements(element); 49376 if (element.hasElement()) { 49377 for (ElementDefinition e : element.getElement()) 49378 composeElementDefinition("element", e); 49379 } 49380 } 49381 49382 protected void composeStructureDefinitionStructureDefinitionDifferentialComponent(String name, 49383 StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { 49384 if (element != null) { 49385 composeElementAttributes(element); 49386 xml.enter(FHIR_NS, name); 49387 composeStructureDefinitionStructureDefinitionDifferentialComponentElements(element); 49388 composeElementClose(element); 49389 xml.exit(FHIR_NS, name); 49390 } 49391 } 49392 49393 protected void composeStructureDefinitionStructureDefinitionDifferentialComponentElements( 49394 StructureDefinition.StructureDefinitionDifferentialComponent element) throws IOException { 49395 composeBackboneElementElements(element); 49396 if (element.hasElement()) { 49397 for (ElementDefinition e : element.getElement()) 49398 composeElementDefinition("element", e); 49399 } 49400 } 49401 49402 protected void composeStructureMap(String name, StructureMap element) throws IOException { 49403 if (element != null) { 49404 composeDomainResourceAttributes(element); 49405 xml.enter(FHIR_NS, name); 49406 composeStructureMapElements(element); 49407 composeElementClose(element); 49408 xml.exit(FHIR_NS, name); 49409 } 49410 } 49411 49412 protected void composeStructureMapElements(StructureMap element) throws IOException { 49413 composeDomainResourceElements(element); 49414 if (element.hasUrlElement()) { 49415 composeUri("url", element.getUrlElement()); 49416 } 49417 if (element.hasIdentifier()) { 49418 for (Identifier e : element.getIdentifier()) 49419 composeIdentifier("identifier", e); 49420 } 49421 if (element.hasVersionElement()) { 49422 composeString("version", element.getVersionElement()); 49423 } 49424 if (element.hasNameElement()) { 49425 composeString("name", element.getNameElement()); 49426 } 49427 if (element.hasTitleElement()) { 49428 composeString("title", element.getTitleElement()); 49429 } 49430 if (element.hasStatusElement()) 49431 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 49432 if (element.hasExperimentalElement()) { 49433 composeBoolean("experimental", element.getExperimentalElement()); 49434 } 49435 if (element.hasDateElement()) { 49436 composeDateTime("date", element.getDateElement()); 49437 } 49438 if (element.hasPublisherElement()) { 49439 composeString("publisher", element.getPublisherElement()); 49440 } 49441 if (element.hasContact()) { 49442 for (ContactDetail e : element.getContact()) 49443 composeContactDetail("contact", e); 49444 } 49445 if (element.hasDescriptionElement()) { 49446 composeMarkdown("description", element.getDescriptionElement()); 49447 } 49448 if (element.hasUseContext()) { 49449 for (UsageContext e : element.getUseContext()) 49450 composeUsageContext("useContext", e); 49451 } 49452 if (element.hasJurisdiction()) { 49453 for (CodeableConcept e : element.getJurisdiction()) 49454 composeCodeableConcept("jurisdiction", e); 49455 } 49456 if (element.hasPurposeElement()) { 49457 composeMarkdown("purpose", element.getPurposeElement()); 49458 } 49459 if (element.hasCopyrightElement()) { 49460 composeMarkdown("copyright", element.getCopyrightElement()); 49461 } 49462 if (element.hasStructure()) { 49463 for (StructureMap.StructureMapStructureComponent e : element.getStructure()) 49464 composeStructureMapStructureMapStructureComponent("structure", e); 49465 } 49466 if (element.hasImport()) { 49467 for (CanonicalType e : element.getImport()) 49468 composeCanonical("import", e); 49469 } 49470 if (element.hasGroup()) { 49471 for (StructureMap.StructureMapGroupComponent e : element.getGroup()) 49472 composeStructureMapStructureMapGroupComponent("group", e); 49473 } 49474 } 49475 49476 protected void composeStructureMapStructureMapStructureComponent(String name, 49477 StructureMap.StructureMapStructureComponent element) throws IOException { 49478 if (element != null) { 49479 composeElementAttributes(element); 49480 xml.enter(FHIR_NS, name); 49481 composeStructureMapStructureMapStructureComponentElements(element); 49482 composeElementClose(element); 49483 xml.exit(FHIR_NS, name); 49484 } 49485 } 49486 49487 protected void composeStructureMapStructureMapStructureComponentElements( 49488 StructureMap.StructureMapStructureComponent element) throws IOException { 49489 composeBackboneElementElements(element); 49490 if (element.hasUrlElement()) { 49491 composeCanonical("url", element.getUrlElement()); 49492 } 49493 if (element.hasModeElement()) 49494 composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapModelModeEnumFactory()); 49495 if (element.hasAliasElement()) { 49496 composeString("alias", element.getAliasElement()); 49497 } 49498 if (element.hasDocumentationElement()) { 49499 composeString("documentation", element.getDocumentationElement()); 49500 } 49501 } 49502 49503 protected void composeStructureMapStructureMapGroupComponent(String name, 49504 StructureMap.StructureMapGroupComponent element) throws IOException { 49505 if (element != null) { 49506 composeElementAttributes(element); 49507 xml.enter(FHIR_NS, name); 49508 composeStructureMapStructureMapGroupComponentElements(element); 49509 composeElementClose(element); 49510 xml.exit(FHIR_NS, name); 49511 } 49512 } 49513 49514 protected void composeStructureMapStructureMapGroupComponentElements(StructureMap.StructureMapGroupComponent element) 49515 throws IOException { 49516 composeBackboneElementElements(element); 49517 if (element.hasNameElement()) { 49518 composeId("name", element.getNameElement()); 49519 } 49520 if (element.hasExtendsElement()) { 49521 composeId("extends", element.getExtendsElement()); 49522 } 49523 if (element.hasTypeModeElement()) 49524 composeEnumeration("typeMode", element.getTypeModeElement(), 49525 new StructureMap.StructureMapGroupTypeModeEnumFactory()); 49526 if (element.hasDocumentationElement()) { 49527 composeString("documentation", element.getDocumentationElement()); 49528 } 49529 if (element.hasInput()) { 49530 for (StructureMap.StructureMapGroupInputComponent e : element.getInput()) 49531 composeStructureMapStructureMapGroupInputComponent("input", e); 49532 } 49533 if (element.hasRule()) { 49534 for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) 49535 composeStructureMapStructureMapGroupRuleComponent("rule", e); 49536 } 49537 } 49538 49539 protected void composeStructureMapStructureMapGroupInputComponent(String name, 49540 StructureMap.StructureMapGroupInputComponent element) throws IOException { 49541 if (element != null) { 49542 composeElementAttributes(element); 49543 xml.enter(FHIR_NS, name); 49544 composeStructureMapStructureMapGroupInputComponentElements(element); 49545 composeElementClose(element); 49546 xml.exit(FHIR_NS, name); 49547 } 49548 } 49549 49550 protected void composeStructureMapStructureMapGroupInputComponentElements( 49551 StructureMap.StructureMapGroupInputComponent element) throws IOException { 49552 composeBackboneElementElements(element); 49553 if (element.hasNameElement()) { 49554 composeId("name", element.getNameElement()); 49555 } 49556 if (element.hasTypeElement()) { 49557 composeString("type", element.getTypeElement()); 49558 } 49559 if (element.hasModeElement()) 49560 composeEnumeration("mode", element.getModeElement(), new StructureMap.StructureMapInputModeEnumFactory()); 49561 if (element.hasDocumentationElement()) { 49562 composeString("documentation", element.getDocumentationElement()); 49563 } 49564 } 49565 49566 protected void composeStructureMapStructureMapGroupRuleComponent(String name, 49567 StructureMap.StructureMapGroupRuleComponent element) throws IOException { 49568 if (element != null) { 49569 composeElementAttributes(element); 49570 xml.enter(FHIR_NS, name); 49571 composeStructureMapStructureMapGroupRuleComponentElements(element); 49572 composeElementClose(element); 49573 xml.exit(FHIR_NS, name); 49574 } 49575 } 49576 49577 protected void composeStructureMapStructureMapGroupRuleComponentElements( 49578 StructureMap.StructureMapGroupRuleComponent element) throws IOException { 49579 composeBackboneElementElements(element); 49580 if (element.hasNameElement()) { 49581 composeId("name", element.getNameElement()); 49582 } 49583 if (element.hasSource()) { 49584 for (StructureMap.StructureMapGroupRuleSourceComponent e : element.getSource()) 49585 composeStructureMapStructureMapGroupRuleSourceComponent("source", e); 49586 } 49587 if (element.hasTarget()) { 49588 for (StructureMap.StructureMapGroupRuleTargetComponent e : element.getTarget()) 49589 composeStructureMapStructureMapGroupRuleTargetComponent("target", e); 49590 } 49591 if (element.hasRule()) { 49592 for (StructureMap.StructureMapGroupRuleComponent e : element.getRule()) 49593 composeStructureMapStructureMapGroupRuleComponent("rule", e); 49594 } 49595 if (element.hasDependent()) { 49596 for (StructureMap.StructureMapGroupRuleDependentComponent e : element.getDependent()) 49597 composeStructureMapStructureMapGroupRuleDependentComponent("dependent", e); 49598 } 49599 if (element.hasDocumentationElement()) { 49600 composeString("documentation", element.getDocumentationElement()); 49601 } 49602 } 49603 49604 protected void composeStructureMapStructureMapGroupRuleSourceComponent(String name, 49605 StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { 49606 if (element != null) { 49607 composeElementAttributes(element); 49608 xml.enter(FHIR_NS, name); 49609 composeStructureMapStructureMapGroupRuleSourceComponentElements(element); 49610 composeElementClose(element); 49611 xml.exit(FHIR_NS, name); 49612 } 49613 } 49614 49615 protected void composeStructureMapStructureMapGroupRuleSourceComponentElements( 49616 StructureMap.StructureMapGroupRuleSourceComponent element) throws IOException { 49617 composeBackboneElementElements(element); 49618 if (element.hasContextElement()) { 49619 composeId("context", element.getContextElement()); 49620 } 49621 if (element.hasMinElement()) { 49622 composeInteger("min", element.getMinElement()); 49623 } 49624 if (element.hasMaxElement()) { 49625 composeString("max", element.getMaxElement()); 49626 } 49627 if (element.hasTypeElement()) { 49628 composeString("type", element.getTypeElement()); 49629 } 49630 if (element.hasDefaultValue()) { 49631 composeType("defaultValue", element.getDefaultValue()); 49632 } 49633 if (element.hasElementElement()) { 49634 composeString("element", element.getElementElement()); 49635 } 49636 if (element.hasListModeElement()) 49637 composeEnumeration("listMode", element.getListModeElement(), 49638 new StructureMap.StructureMapSourceListModeEnumFactory()); 49639 if (element.hasVariableElement()) { 49640 composeId("variable", element.getVariableElement()); 49641 } 49642 if (element.hasConditionElement()) { 49643 composeString("condition", element.getConditionElement()); 49644 } 49645 if (element.hasCheckElement()) { 49646 composeString("check", element.getCheckElement()); 49647 } 49648 if (element.hasLogMessageElement()) { 49649 composeString("logMessage", element.getLogMessageElement()); 49650 } 49651 } 49652 49653 protected void composeStructureMapStructureMapGroupRuleTargetComponent(String name, 49654 StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { 49655 if (element != null) { 49656 composeElementAttributes(element); 49657 xml.enter(FHIR_NS, name); 49658 composeStructureMapStructureMapGroupRuleTargetComponentElements(element); 49659 composeElementClose(element); 49660 xml.exit(FHIR_NS, name); 49661 } 49662 } 49663 49664 protected void composeStructureMapStructureMapGroupRuleTargetComponentElements( 49665 StructureMap.StructureMapGroupRuleTargetComponent element) throws IOException { 49666 composeBackboneElementElements(element); 49667 if (element.hasContextElement()) { 49668 composeId("context", element.getContextElement()); 49669 } 49670 if (element.hasContextTypeElement()) 49671 composeEnumeration("contextType", element.getContextTypeElement(), 49672 new StructureMap.StructureMapContextTypeEnumFactory()); 49673 if (element.hasElementElement()) { 49674 composeString("element", element.getElementElement()); 49675 } 49676 if (element.hasVariableElement()) { 49677 composeId("variable", element.getVariableElement()); 49678 } 49679 if (element.hasListMode()) 49680 for (Enumeration<StructureMap.StructureMapTargetListMode> e : element.getListMode()) 49681 composeEnumeration("listMode", e, new StructureMap.StructureMapTargetListModeEnumFactory()); 49682 if (element.hasListRuleIdElement()) { 49683 composeId("listRuleId", element.getListRuleIdElement()); 49684 } 49685 if (element.hasTransformElement()) 49686 composeEnumeration("transform", element.getTransformElement(), 49687 new StructureMap.StructureMapTransformEnumFactory()); 49688 if (element.hasParameter()) { 49689 for (StructureMap.StructureMapGroupRuleTargetParameterComponent e : element.getParameter()) 49690 composeStructureMapStructureMapGroupRuleTargetParameterComponent("parameter", e); 49691 } 49692 } 49693 49694 protected void composeStructureMapStructureMapGroupRuleTargetParameterComponent(String name, 49695 StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { 49696 if (element != null) { 49697 composeElementAttributes(element); 49698 xml.enter(FHIR_NS, name); 49699 composeStructureMapStructureMapGroupRuleTargetParameterComponentElements(element); 49700 composeElementClose(element); 49701 xml.exit(FHIR_NS, name); 49702 } 49703 } 49704 49705 protected void composeStructureMapStructureMapGroupRuleTargetParameterComponentElements( 49706 StructureMap.StructureMapGroupRuleTargetParameterComponent element) throws IOException { 49707 composeBackboneElementElements(element); 49708 if (element.hasValue()) { 49709 composeType("value", element.getValue()); 49710 } 49711 } 49712 49713 protected void composeStructureMapStructureMapGroupRuleDependentComponent(String name, 49714 StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { 49715 if (element != null) { 49716 composeElementAttributes(element); 49717 xml.enter(FHIR_NS, name); 49718 composeStructureMapStructureMapGroupRuleDependentComponentElements(element); 49719 composeElementClose(element); 49720 xml.exit(FHIR_NS, name); 49721 } 49722 } 49723 49724 protected void composeStructureMapStructureMapGroupRuleDependentComponentElements( 49725 StructureMap.StructureMapGroupRuleDependentComponent element) throws IOException { 49726 composeBackboneElementElements(element); 49727 if (element.hasNameElement()) { 49728 composeId("name", element.getNameElement()); 49729 } 49730 if (element.hasVariable()) { 49731 for (StringType e : element.getVariable()) 49732 composeString("variable", e); 49733 } 49734 } 49735 49736 protected void composeSubscription(String name, Subscription element) throws IOException { 49737 if (element != null) { 49738 composeDomainResourceAttributes(element); 49739 xml.enter(FHIR_NS, name); 49740 composeSubscriptionElements(element); 49741 composeElementClose(element); 49742 xml.exit(FHIR_NS, name); 49743 } 49744 } 49745 49746 protected void composeSubscriptionElements(Subscription element) throws IOException { 49747 composeDomainResourceElements(element); 49748 if (element.hasStatusElement()) 49749 composeEnumeration("status", element.getStatusElement(), new Subscription.SubscriptionStatusEnumFactory()); 49750 if (element.hasContact()) { 49751 for (ContactPoint e : element.getContact()) 49752 composeContactPoint("contact", e); 49753 } 49754 if (element.hasEndElement()) { 49755 composeInstant("end", element.getEndElement()); 49756 } 49757 if (element.hasReasonElement()) { 49758 composeString("reason", element.getReasonElement()); 49759 } 49760 if (element.hasCriteriaElement()) { 49761 composeString("criteria", element.getCriteriaElement()); 49762 } 49763 if (element.hasErrorElement()) { 49764 composeString("error", element.getErrorElement()); 49765 } 49766 if (element.hasChannel()) { 49767 composeSubscriptionSubscriptionChannelComponent("channel", element.getChannel()); 49768 } 49769 } 49770 49771 protected void composeSubscriptionSubscriptionChannelComponent(String name, 49772 Subscription.SubscriptionChannelComponent element) throws IOException { 49773 if (element != null) { 49774 composeElementAttributes(element); 49775 xml.enter(FHIR_NS, name); 49776 composeSubscriptionSubscriptionChannelComponentElements(element); 49777 composeElementClose(element); 49778 xml.exit(FHIR_NS, name); 49779 } 49780 } 49781 49782 protected void composeSubscriptionSubscriptionChannelComponentElements( 49783 Subscription.SubscriptionChannelComponent element) throws IOException { 49784 composeBackboneElementElements(element); 49785 if (element.hasTypeElement()) 49786 composeEnumeration("type", element.getTypeElement(), new Subscription.SubscriptionChannelTypeEnumFactory()); 49787 if (element.hasEndpointElement()) { 49788 composeUrl("endpoint", element.getEndpointElement()); 49789 } 49790 if (element.hasPayloadElement()) { 49791 composeCode("payload", element.getPayloadElement()); 49792 } 49793 if (element.hasHeader()) { 49794 for (StringType e : element.getHeader()) 49795 composeString("header", e); 49796 } 49797 } 49798 49799 protected void composeSubstance(String name, Substance element) throws IOException { 49800 if (element != null) { 49801 composeDomainResourceAttributes(element); 49802 xml.enter(FHIR_NS, name); 49803 composeSubstanceElements(element); 49804 composeElementClose(element); 49805 xml.exit(FHIR_NS, name); 49806 } 49807 } 49808 49809 protected void composeSubstanceElements(Substance element) throws IOException { 49810 composeDomainResourceElements(element); 49811 if (element.hasIdentifier()) { 49812 for (Identifier e : element.getIdentifier()) 49813 composeIdentifier("identifier", e); 49814 } 49815 if (element.hasStatusElement()) 49816 composeEnumeration("status", element.getStatusElement(), new Substance.FHIRSubstanceStatusEnumFactory()); 49817 if (element.hasCategory()) { 49818 for (CodeableConcept e : element.getCategory()) 49819 composeCodeableConcept("category", e); 49820 } 49821 if (element.hasCode()) { 49822 composeCodeableConcept("code", element.getCode()); 49823 } 49824 if (element.hasDescriptionElement()) { 49825 composeString("description", element.getDescriptionElement()); 49826 } 49827 if (element.hasInstance()) { 49828 for (Substance.SubstanceInstanceComponent e : element.getInstance()) 49829 composeSubstanceSubstanceInstanceComponent("instance", e); 49830 } 49831 if (element.hasIngredient()) { 49832 for (Substance.SubstanceIngredientComponent e : element.getIngredient()) 49833 composeSubstanceSubstanceIngredientComponent("ingredient", e); 49834 } 49835 } 49836 49837 protected void composeSubstanceSubstanceInstanceComponent(String name, Substance.SubstanceInstanceComponent element) 49838 throws IOException { 49839 if (element != null) { 49840 composeElementAttributes(element); 49841 xml.enter(FHIR_NS, name); 49842 composeSubstanceSubstanceInstanceComponentElements(element); 49843 composeElementClose(element); 49844 xml.exit(FHIR_NS, name); 49845 } 49846 } 49847 49848 protected void composeSubstanceSubstanceInstanceComponentElements(Substance.SubstanceInstanceComponent element) 49849 throws IOException { 49850 composeBackboneElementElements(element); 49851 if (element.hasIdentifier()) { 49852 composeIdentifier("identifier", element.getIdentifier()); 49853 } 49854 if (element.hasExpiryElement()) { 49855 composeDateTime("expiry", element.getExpiryElement()); 49856 } 49857 if (element.hasQuantity()) { 49858 composeQuantity("quantity", element.getQuantity()); 49859 } 49860 } 49861 49862 protected void composeSubstanceSubstanceIngredientComponent(String name, 49863 Substance.SubstanceIngredientComponent element) throws IOException { 49864 if (element != null) { 49865 composeElementAttributes(element); 49866 xml.enter(FHIR_NS, name); 49867 composeSubstanceSubstanceIngredientComponentElements(element); 49868 composeElementClose(element); 49869 xml.exit(FHIR_NS, name); 49870 } 49871 } 49872 49873 protected void composeSubstanceSubstanceIngredientComponentElements(Substance.SubstanceIngredientComponent element) 49874 throws IOException { 49875 composeBackboneElementElements(element); 49876 if (element.hasQuantity()) { 49877 composeRatio("quantity", element.getQuantity()); 49878 } 49879 if (element.hasSubstance()) { 49880 composeType("substance", element.getSubstance()); 49881 } 49882 } 49883 49884 protected void composeSubstanceNucleicAcid(String name, SubstanceNucleicAcid element) throws IOException { 49885 if (element != null) { 49886 composeDomainResourceAttributes(element); 49887 xml.enter(FHIR_NS, name); 49888 composeSubstanceNucleicAcidElements(element); 49889 composeElementClose(element); 49890 xml.exit(FHIR_NS, name); 49891 } 49892 } 49893 49894 protected void composeSubstanceNucleicAcidElements(SubstanceNucleicAcid element) throws IOException { 49895 composeDomainResourceElements(element); 49896 if (element.hasSequenceType()) { 49897 composeCodeableConcept("sequenceType", element.getSequenceType()); 49898 } 49899 if (element.hasNumberOfSubunitsElement()) { 49900 composeInteger("numberOfSubunits", element.getNumberOfSubunitsElement()); 49901 } 49902 if (element.hasAreaOfHybridisationElement()) { 49903 composeString("areaOfHybridisation", element.getAreaOfHybridisationElement()); 49904 } 49905 if (element.hasOligoNucleotideType()) { 49906 composeCodeableConcept("oligoNucleotideType", element.getOligoNucleotideType()); 49907 } 49908 if (element.hasSubunit()) { 49909 for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent e : element.getSubunit()) 49910 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent("subunit", e); 49911 } 49912 } 49913 49914 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponent(String name, 49915 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException { 49916 if (element != null) { 49917 composeElementAttributes(element); 49918 xml.enter(FHIR_NS, name); 49919 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentElements(element); 49920 composeElementClose(element); 49921 xml.exit(FHIR_NS, name); 49922 } 49923 } 49924 49925 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitComponentElements( 49926 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitComponent element) throws IOException { 49927 composeBackboneElementElements(element); 49928 if (element.hasSubunitElement()) { 49929 composeInteger("subunit", element.getSubunitElement()); 49930 } 49931 if (element.hasSequenceElement()) { 49932 composeString("sequence", element.getSequenceElement()); 49933 } 49934 if (element.hasLengthElement()) { 49935 composeInteger("length", element.getLengthElement()); 49936 } 49937 if (element.hasSequenceAttachment()) { 49938 composeAttachment("sequenceAttachment", element.getSequenceAttachment()); 49939 } 49940 if (element.hasFivePrime()) { 49941 composeCodeableConcept("fivePrime", element.getFivePrime()); 49942 } 49943 if (element.hasThreePrime()) { 49944 composeCodeableConcept("threePrime", element.getThreePrime()); 49945 } 49946 if (element.hasLinkage()) { 49947 for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent e : element.getLinkage()) 49948 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent("linkage", e); 49949 } 49950 if (element.hasSugar()) { 49951 for (SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent e : element.getSugar()) 49952 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent("sugar", e); 49953 } 49954 } 49955 49956 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponent(String name, 49957 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException { 49958 if (element != null) { 49959 composeElementAttributes(element); 49960 xml.enter(FHIR_NS, name); 49961 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentElements(element); 49962 composeElementClose(element); 49963 xml.exit(FHIR_NS, name); 49964 } 49965 } 49966 49967 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitLinkageComponentElements( 49968 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitLinkageComponent element) throws IOException { 49969 composeBackboneElementElements(element); 49970 if (element.hasConnectivityElement()) { 49971 composeString("connectivity", element.getConnectivityElement()); 49972 } 49973 if (element.hasIdentifier()) { 49974 composeIdentifier("identifier", element.getIdentifier()); 49975 } 49976 if (element.hasNameElement()) { 49977 composeString("name", element.getNameElement()); 49978 } 49979 if (element.hasResidueSiteElement()) { 49980 composeString("residueSite", element.getResidueSiteElement()); 49981 } 49982 } 49983 49984 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponent(String name, 49985 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException { 49986 if (element != null) { 49987 composeElementAttributes(element); 49988 xml.enter(FHIR_NS, name); 49989 composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentElements(element); 49990 composeElementClose(element); 49991 xml.exit(FHIR_NS, name); 49992 } 49993 } 49994 49995 protected void composeSubstanceNucleicAcidSubstanceNucleicAcidSubunitSugarComponentElements( 49996 SubstanceNucleicAcid.SubstanceNucleicAcidSubunitSugarComponent element) throws IOException { 49997 composeBackboneElementElements(element); 49998 if (element.hasIdentifier()) { 49999 composeIdentifier("identifier", element.getIdentifier()); 50000 } 50001 if (element.hasNameElement()) { 50002 composeString("name", element.getNameElement()); 50003 } 50004 if (element.hasResidueSiteElement()) { 50005 composeString("residueSite", element.getResidueSiteElement()); 50006 } 50007 } 50008 50009 protected void composeSubstancePolymer(String name, SubstancePolymer element) throws IOException { 50010 if (element != null) { 50011 composeDomainResourceAttributes(element); 50012 xml.enter(FHIR_NS, name); 50013 composeSubstancePolymerElements(element); 50014 composeElementClose(element); 50015 xml.exit(FHIR_NS, name); 50016 } 50017 } 50018 50019 protected void composeSubstancePolymerElements(SubstancePolymer element) throws IOException { 50020 composeDomainResourceElements(element); 50021 if (element.hasClass_()) { 50022 composeCodeableConcept("class", element.getClass_()); 50023 } 50024 if (element.hasGeometry()) { 50025 composeCodeableConcept("geometry", element.getGeometry()); 50026 } 50027 if (element.hasCopolymerConnectivity()) { 50028 for (CodeableConcept e : element.getCopolymerConnectivity()) 50029 composeCodeableConcept("copolymerConnectivity", e); 50030 } 50031 if (element.hasModification()) { 50032 for (StringType e : element.getModification()) 50033 composeString("modification", e); 50034 } 50035 if (element.hasMonomerSet()) { 50036 for (SubstancePolymer.SubstancePolymerMonomerSetComponent e : element.getMonomerSet()) 50037 composeSubstancePolymerSubstancePolymerMonomerSetComponent("monomerSet", e); 50038 } 50039 if (element.hasRepeat()) { 50040 for (SubstancePolymer.SubstancePolymerRepeatComponent e : element.getRepeat()) 50041 composeSubstancePolymerSubstancePolymerRepeatComponent("repeat", e); 50042 } 50043 } 50044 50045 protected void composeSubstancePolymerSubstancePolymerMonomerSetComponent(String name, 50046 SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException { 50047 if (element != null) { 50048 composeElementAttributes(element); 50049 xml.enter(FHIR_NS, name); 50050 composeSubstancePolymerSubstancePolymerMonomerSetComponentElements(element); 50051 composeElementClose(element); 50052 xml.exit(FHIR_NS, name); 50053 } 50054 } 50055 50056 protected void composeSubstancePolymerSubstancePolymerMonomerSetComponentElements( 50057 SubstancePolymer.SubstancePolymerMonomerSetComponent element) throws IOException { 50058 composeBackboneElementElements(element); 50059 if (element.hasRatioType()) { 50060 composeCodeableConcept("ratioType", element.getRatioType()); 50061 } 50062 if (element.hasStartingMaterial()) { 50063 for (SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent e : element.getStartingMaterial()) 50064 composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent("startingMaterial", e); 50065 } 50066 } 50067 50068 protected void composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponent(String name, 50069 SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException { 50070 if (element != null) { 50071 composeElementAttributes(element); 50072 xml.enter(FHIR_NS, name); 50073 composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentElements(element); 50074 composeElementClose(element); 50075 xml.exit(FHIR_NS, name); 50076 } 50077 } 50078 50079 protected void composeSubstancePolymerSubstancePolymerMonomerSetStartingMaterialComponentElements( 50080 SubstancePolymer.SubstancePolymerMonomerSetStartingMaterialComponent element) throws IOException { 50081 composeBackboneElementElements(element); 50082 if (element.hasMaterial()) { 50083 composeCodeableConcept("material", element.getMaterial()); 50084 } 50085 if (element.hasType()) { 50086 composeCodeableConcept("type", element.getType()); 50087 } 50088 if (element.hasIsDefiningElement()) { 50089 composeBoolean("isDefining", element.getIsDefiningElement()); 50090 } 50091 if (element.hasAmount()) { 50092 composeSubstanceAmount("amount", element.getAmount()); 50093 } 50094 } 50095 50096 protected void composeSubstancePolymerSubstancePolymerRepeatComponent(String name, 50097 SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException { 50098 if (element != null) { 50099 composeElementAttributes(element); 50100 xml.enter(FHIR_NS, name); 50101 composeSubstancePolymerSubstancePolymerRepeatComponentElements(element); 50102 composeElementClose(element); 50103 xml.exit(FHIR_NS, name); 50104 } 50105 } 50106 50107 protected void composeSubstancePolymerSubstancePolymerRepeatComponentElements( 50108 SubstancePolymer.SubstancePolymerRepeatComponent element) throws IOException { 50109 composeBackboneElementElements(element); 50110 if (element.hasNumberOfUnitsElement()) { 50111 composeInteger("numberOfUnits", element.getNumberOfUnitsElement()); 50112 } 50113 if (element.hasAverageMolecularFormulaElement()) { 50114 composeString("averageMolecularFormula", element.getAverageMolecularFormulaElement()); 50115 } 50116 if (element.hasRepeatUnitAmountType()) { 50117 composeCodeableConcept("repeatUnitAmountType", element.getRepeatUnitAmountType()); 50118 } 50119 if (element.hasRepeatUnit()) { 50120 for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent e : element.getRepeatUnit()) 50121 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent("repeatUnit", e); 50122 } 50123 } 50124 50125 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponent(String name, 50126 SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException { 50127 if (element != null) { 50128 composeElementAttributes(element); 50129 xml.enter(FHIR_NS, name); 50130 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentElements(element); 50131 composeElementClose(element); 50132 xml.exit(FHIR_NS, name); 50133 } 50134 } 50135 50136 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitComponentElements( 50137 SubstancePolymer.SubstancePolymerRepeatRepeatUnitComponent element) throws IOException { 50138 composeBackboneElementElements(element); 50139 if (element.hasOrientationOfPolymerisation()) { 50140 composeCodeableConcept("orientationOfPolymerisation", element.getOrientationOfPolymerisation()); 50141 } 50142 if (element.hasRepeatUnitElement()) { 50143 composeString("repeatUnit", element.getRepeatUnitElement()); 50144 } 50145 if (element.hasAmount()) { 50146 composeSubstanceAmount("amount", element.getAmount()); 50147 } 50148 if (element.hasDegreeOfPolymerisation()) { 50149 for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent e : element 50150 .getDegreeOfPolymerisation()) 50151 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent("degreeOfPolymerisation", 50152 e); 50153 } 50154 if (element.hasStructuralRepresentation()) { 50155 for (SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent e : element 50156 .getStructuralRepresentation()) 50157 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent( 50158 "structuralRepresentation", e); 50159 } 50160 } 50161 50162 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(String name, 50163 SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException { 50164 if (element != null) { 50165 composeElementAttributes(element); 50166 xml.enter(FHIR_NS, name); 50167 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentElements(element); 50168 composeElementClose(element); 50169 xml.exit(FHIR_NS, name); 50170 } 50171 } 50172 50173 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponentElements( 50174 SubstancePolymer.SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent element) throws IOException { 50175 composeBackboneElementElements(element); 50176 if (element.hasDegree()) { 50177 composeCodeableConcept("degree", element.getDegree()); 50178 } 50179 if (element.hasAmount()) { 50180 composeSubstanceAmount("amount", element.getAmount()); 50181 } 50182 } 50183 50184 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent(String name, 50185 SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException { 50186 if (element != null) { 50187 composeElementAttributes(element); 50188 xml.enter(FHIR_NS, name); 50189 composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentElements(element); 50190 composeElementClose(element); 50191 xml.exit(FHIR_NS, name); 50192 } 50193 } 50194 50195 protected void composeSubstancePolymerSubstancePolymerRepeatRepeatUnitStructuralRepresentationComponentElements( 50196 SubstancePolymer.SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent element) throws IOException { 50197 composeBackboneElementElements(element); 50198 if (element.hasType()) { 50199 composeCodeableConcept("type", element.getType()); 50200 } 50201 if (element.hasRepresentationElement()) { 50202 composeString("representation", element.getRepresentationElement()); 50203 } 50204 if (element.hasAttachment()) { 50205 composeAttachment("attachment", element.getAttachment()); 50206 } 50207 } 50208 50209 protected void composeSubstanceProtein(String name, SubstanceProtein element) throws IOException { 50210 if (element != null) { 50211 composeDomainResourceAttributes(element); 50212 xml.enter(FHIR_NS, name); 50213 composeSubstanceProteinElements(element); 50214 composeElementClose(element); 50215 xml.exit(FHIR_NS, name); 50216 } 50217 } 50218 50219 protected void composeSubstanceProteinElements(SubstanceProtein element) throws IOException { 50220 composeDomainResourceElements(element); 50221 if (element.hasSequenceType()) { 50222 composeCodeableConcept("sequenceType", element.getSequenceType()); 50223 } 50224 if (element.hasNumberOfSubunitsElement()) { 50225 composeInteger("numberOfSubunits", element.getNumberOfSubunitsElement()); 50226 } 50227 if (element.hasDisulfideLinkage()) { 50228 for (StringType e : element.getDisulfideLinkage()) 50229 composeString("disulfideLinkage", e); 50230 } 50231 if (element.hasSubunit()) { 50232 for (SubstanceProtein.SubstanceProteinSubunitComponent e : element.getSubunit()) 50233 composeSubstanceProteinSubstanceProteinSubunitComponent("subunit", e); 50234 } 50235 } 50236 50237 protected void composeSubstanceProteinSubstanceProteinSubunitComponent(String name, 50238 SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException { 50239 if (element != null) { 50240 composeElementAttributes(element); 50241 xml.enter(FHIR_NS, name); 50242 composeSubstanceProteinSubstanceProteinSubunitComponentElements(element); 50243 composeElementClose(element); 50244 xml.exit(FHIR_NS, name); 50245 } 50246 } 50247 50248 protected void composeSubstanceProteinSubstanceProteinSubunitComponentElements( 50249 SubstanceProtein.SubstanceProteinSubunitComponent element) throws IOException { 50250 composeBackboneElementElements(element); 50251 if (element.hasSubunitElement()) { 50252 composeInteger("subunit", element.getSubunitElement()); 50253 } 50254 if (element.hasSequenceElement()) { 50255 composeString("sequence", element.getSequenceElement()); 50256 } 50257 if (element.hasLengthElement()) { 50258 composeInteger("length", element.getLengthElement()); 50259 } 50260 if (element.hasSequenceAttachment()) { 50261 composeAttachment("sequenceAttachment", element.getSequenceAttachment()); 50262 } 50263 if (element.hasNTerminalModificationId()) { 50264 composeIdentifier("nTerminalModificationId", element.getNTerminalModificationId()); 50265 } 50266 if (element.hasNTerminalModificationElement()) { 50267 composeString("nTerminalModification", element.getNTerminalModificationElement()); 50268 } 50269 if (element.hasCTerminalModificationId()) { 50270 composeIdentifier("cTerminalModificationId", element.getCTerminalModificationId()); 50271 } 50272 if (element.hasCTerminalModificationElement()) { 50273 composeString("cTerminalModification", element.getCTerminalModificationElement()); 50274 } 50275 } 50276 50277 protected void composeSubstanceReferenceInformation(String name, SubstanceReferenceInformation element) 50278 throws IOException { 50279 if (element != null) { 50280 composeDomainResourceAttributes(element); 50281 xml.enter(FHIR_NS, name); 50282 composeSubstanceReferenceInformationElements(element); 50283 composeElementClose(element); 50284 xml.exit(FHIR_NS, name); 50285 } 50286 } 50287 50288 protected void composeSubstanceReferenceInformationElements(SubstanceReferenceInformation element) 50289 throws IOException { 50290 composeDomainResourceElements(element); 50291 if (element.hasCommentElement()) { 50292 composeString("comment", element.getCommentElement()); 50293 } 50294 if (element.hasGene()) { 50295 for (SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent e : element.getGene()) 50296 composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent("gene", e); 50297 } 50298 if (element.hasGeneElement()) { 50299 for (SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent e : element.getGeneElement()) 50300 composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent("geneElement", e); 50301 } 50302 if (element.hasClassification()) { 50303 for (SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent e : element 50304 .getClassification()) 50305 composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent("classification", e); 50306 } 50307 if (element.hasTarget()) { 50308 for (SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent e : element.getTarget()) 50309 composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent("target", e); 50310 } 50311 } 50312 50313 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponent(String name, 50314 SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException { 50315 if (element != null) { 50316 composeElementAttributes(element); 50317 xml.enter(FHIR_NS, name); 50318 composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentElements(element); 50319 composeElementClose(element); 50320 xml.exit(FHIR_NS, name); 50321 } 50322 } 50323 50324 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneComponentElements( 50325 SubstanceReferenceInformation.SubstanceReferenceInformationGeneComponent element) throws IOException { 50326 composeBackboneElementElements(element); 50327 if (element.hasGeneSequenceOrigin()) { 50328 composeCodeableConcept("geneSequenceOrigin", element.getGeneSequenceOrigin()); 50329 } 50330 if (element.hasGene()) { 50331 composeCodeableConcept("gene", element.getGene()); 50332 } 50333 if (element.hasSource()) { 50334 for (Reference e : element.getSource()) 50335 composeReference("source", e); 50336 } 50337 } 50338 50339 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponent(String name, 50340 SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException { 50341 if (element != null) { 50342 composeElementAttributes(element); 50343 xml.enter(FHIR_NS, name); 50344 composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentElements(element); 50345 composeElementClose(element); 50346 xml.exit(FHIR_NS, name); 50347 } 50348 } 50349 50350 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationGeneElementComponentElements( 50351 SubstanceReferenceInformation.SubstanceReferenceInformationGeneElementComponent element) throws IOException { 50352 composeBackboneElementElements(element); 50353 if (element.hasType()) { 50354 composeCodeableConcept("type", element.getType()); 50355 } 50356 if (element.hasElement()) { 50357 composeIdentifier("element", element.getElement()); 50358 } 50359 if (element.hasSource()) { 50360 for (Reference e : element.getSource()) 50361 composeReference("source", e); 50362 } 50363 } 50364 50365 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponent(String name, 50366 SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent element) throws IOException { 50367 if (element != null) { 50368 composeElementAttributes(element); 50369 xml.enter(FHIR_NS, name); 50370 composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentElements(element); 50371 composeElementClose(element); 50372 xml.exit(FHIR_NS, name); 50373 } 50374 } 50375 50376 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationClassificationComponentElements( 50377 SubstanceReferenceInformation.SubstanceReferenceInformationClassificationComponent element) throws IOException { 50378 composeBackboneElementElements(element); 50379 if (element.hasDomain()) { 50380 composeCodeableConcept("domain", element.getDomain()); 50381 } 50382 if (element.hasClassification()) { 50383 composeCodeableConcept("classification", element.getClassification()); 50384 } 50385 if (element.hasSubtype()) { 50386 for (CodeableConcept e : element.getSubtype()) 50387 composeCodeableConcept("subtype", e); 50388 } 50389 if (element.hasSource()) { 50390 for (Reference e : element.getSource()) 50391 composeReference("source", e); 50392 } 50393 } 50394 50395 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponent(String name, 50396 SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException { 50397 if (element != null) { 50398 composeElementAttributes(element); 50399 xml.enter(FHIR_NS, name); 50400 composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentElements(element); 50401 composeElementClose(element); 50402 xml.exit(FHIR_NS, name); 50403 } 50404 } 50405 50406 protected void composeSubstanceReferenceInformationSubstanceReferenceInformationTargetComponentElements( 50407 SubstanceReferenceInformation.SubstanceReferenceInformationTargetComponent element) throws IOException { 50408 composeBackboneElementElements(element); 50409 if (element.hasTarget()) { 50410 composeIdentifier("target", element.getTarget()); 50411 } 50412 if (element.hasType()) { 50413 composeCodeableConcept("type", element.getType()); 50414 } 50415 if (element.hasInteraction()) { 50416 composeCodeableConcept("interaction", element.getInteraction()); 50417 } 50418 if (element.hasOrganism()) { 50419 composeCodeableConcept("organism", element.getOrganism()); 50420 } 50421 if (element.hasOrganismType()) { 50422 composeCodeableConcept("organismType", element.getOrganismType()); 50423 } 50424 if (element.hasAmount()) { 50425 composeType("amount", element.getAmount()); 50426 } 50427 if (element.hasAmountType()) { 50428 composeCodeableConcept("amountType", element.getAmountType()); 50429 } 50430 if (element.hasSource()) { 50431 for (Reference e : element.getSource()) 50432 composeReference("source", e); 50433 } 50434 } 50435 50436 protected void composeSubstanceSourceMaterial(String name, SubstanceSourceMaterial element) throws IOException { 50437 if (element != null) { 50438 composeDomainResourceAttributes(element); 50439 xml.enter(FHIR_NS, name); 50440 composeSubstanceSourceMaterialElements(element); 50441 composeElementClose(element); 50442 xml.exit(FHIR_NS, name); 50443 } 50444 } 50445 50446 protected void composeSubstanceSourceMaterialElements(SubstanceSourceMaterial element) throws IOException { 50447 composeDomainResourceElements(element); 50448 if (element.hasSourceMaterialClass()) { 50449 composeCodeableConcept("sourceMaterialClass", element.getSourceMaterialClass()); 50450 } 50451 if (element.hasSourceMaterialType()) { 50452 composeCodeableConcept("sourceMaterialType", element.getSourceMaterialType()); 50453 } 50454 if (element.hasSourceMaterialState()) { 50455 composeCodeableConcept("sourceMaterialState", element.getSourceMaterialState()); 50456 } 50457 if (element.hasOrganismId()) { 50458 composeIdentifier("organismId", element.getOrganismId()); 50459 } 50460 if (element.hasOrganismNameElement()) { 50461 composeString("organismName", element.getOrganismNameElement()); 50462 } 50463 if (element.hasParentSubstanceId()) { 50464 for (Identifier e : element.getParentSubstanceId()) 50465 composeIdentifier("parentSubstanceId", e); 50466 } 50467 if (element.hasParentSubstanceName()) { 50468 for (StringType e : element.getParentSubstanceName()) 50469 composeString("parentSubstanceName", e); 50470 } 50471 if (element.hasCountryOfOrigin()) { 50472 for (CodeableConcept e : element.getCountryOfOrigin()) 50473 composeCodeableConcept("countryOfOrigin", e); 50474 } 50475 if (element.hasGeographicalLocation()) { 50476 for (StringType e : element.getGeographicalLocation()) 50477 composeString("geographicalLocation", e); 50478 } 50479 if (element.hasDevelopmentStage()) { 50480 composeCodeableConcept("developmentStage", element.getDevelopmentStage()); 50481 } 50482 if (element.hasFractionDescription()) { 50483 for (SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent e : element 50484 .getFractionDescription()) 50485 composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent("fractionDescription", e); 50486 } 50487 if (element.hasOrganism()) { 50488 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent("organism", element.getOrganism()); 50489 } 50490 if (element.hasPartDescription()) { 50491 for (SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent e : element.getPartDescription()) 50492 composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent("partDescription", e); 50493 } 50494 } 50495 50496 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponent(String name, 50497 SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException { 50498 if (element != null) { 50499 composeElementAttributes(element); 50500 xml.enter(FHIR_NS, name); 50501 composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentElements(element); 50502 composeElementClose(element); 50503 xml.exit(FHIR_NS, name); 50504 } 50505 } 50506 50507 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialFractionDescriptionComponentElements( 50508 SubstanceSourceMaterial.SubstanceSourceMaterialFractionDescriptionComponent element) throws IOException { 50509 composeBackboneElementElements(element); 50510 if (element.hasFractionElement()) { 50511 composeString("fraction", element.getFractionElement()); 50512 } 50513 if (element.hasMaterialType()) { 50514 composeCodeableConcept("materialType", element.getMaterialType()); 50515 } 50516 } 50517 50518 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponent(String name, 50519 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException { 50520 if (element != null) { 50521 composeElementAttributes(element); 50522 xml.enter(FHIR_NS, name); 50523 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentElements(element); 50524 composeElementClose(element); 50525 xml.exit(FHIR_NS, name); 50526 } 50527 } 50528 50529 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismComponentElements( 50530 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismComponent element) throws IOException { 50531 composeBackboneElementElements(element); 50532 if (element.hasFamily()) { 50533 composeCodeableConcept("family", element.getFamily()); 50534 } 50535 if (element.hasGenus()) { 50536 composeCodeableConcept("genus", element.getGenus()); 50537 } 50538 if (element.hasSpecies()) { 50539 composeCodeableConcept("species", element.getSpecies()); 50540 } 50541 if (element.hasIntraspecificType()) { 50542 composeCodeableConcept("intraspecificType", element.getIntraspecificType()); 50543 } 50544 if (element.hasIntraspecificDescriptionElement()) { 50545 composeString("intraspecificDescription", element.getIntraspecificDescriptionElement()); 50546 } 50547 if (element.hasAuthor()) { 50548 for (SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent e : element.getAuthor()) 50549 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent("author", e); 50550 } 50551 if (element.hasHybrid()) { 50552 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent("hybrid", element.getHybrid()); 50553 } 50554 if (element.hasOrganismGeneral()) { 50555 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent("organismGeneral", 50556 element.getOrganismGeneral()); 50557 } 50558 } 50559 50560 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponent(String name, 50561 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException { 50562 if (element != null) { 50563 composeElementAttributes(element); 50564 xml.enter(FHIR_NS, name); 50565 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentElements(element); 50566 composeElementClose(element); 50567 xml.exit(FHIR_NS, name); 50568 } 50569 } 50570 50571 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismAuthorComponentElements( 50572 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismAuthorComponent element) throws IOException { 50573 composeBackboneElementElements(element); 50574 if (element.hasAuthorType()) { 50575 composeCodeableConcept("authorType", element.getAuthorType()); 50576 } 50577 if (element.hasAuthorDescriptionElement()) { 50578 composeString("authorDescription", element.getAuthorDescriptionElement()); 50579 } 50580 } 50581 50582 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponent(String name, 50583 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException { 50584 if (element != null) { 50585 composeElementAttributes(element); 50586 xml.enter(FHIR_NS, name); 50587 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentElements(element); 50588 composeElementClose(element); 50589 xml.exit(FHIR_NS, name); 50590 } 50591 } 50592 50593 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismHybridComponentElements( 50594 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismHybridComponent element) throws IOException { 50595 composeBackboneElementElements(element); 50596 if (element.hasMaternalOrganismIdElement()) { 50597 composeString("maternalOrganismId", element.getMaternalOrganismIdElement()); 50598 } 50599 if (element.hasMaternalOrganismNameElement()) { 50600 composeString("maternalOrganismName", element.getMaternalOrganismNameElement()); 50601 } 50602 if (element.hasPaternalOrganismIdElement()) { 50603 composeString("paternalOrganismId", element.getPaternalOrganismIdElement()); 50604 } 50605 if (element.hasPaternalOrganismNameElement()) { 50606 composeString("paternalOrganismName", element.getPaternalOrganismNameElement()); 50607 } 50608 if (element.hasHybridType()) { 50609 composeCodeableConcept("hybridType", element.getHybridType()); 50610 } 50611 } 50612 50613 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponent(String name, 50614 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException { 50615 if (element != null) { 50616 composeElementAttributes(element); 50617 xml.enter(FHIR_NS, name); 50618 composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentElements(element); 50619 composeElementClose(element); 50620 xml.exit(FHIR_NS, name); 50621 } 50622 } 50623 50624 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialOrganismOrganismGeneralComponentElements( 50625 SubstanceSourceMaterial.SubstanceSourceMaterialOrganismOrganismGeneralComponent element) throws IOException { 50626 composeBackboneElementElements(element); 50627 if (element.hasKingdom()) { 50628 composeCodeableConcept("kingdom", element.getKingdom()); 50629 } 50630 if (element.hasPhylum()) { 50631 composeCodeableConcept("phylum", element.getPhylum()); 50632 } 50633 if (element.hasClass_()) { 50634 composeCodeableConcept("class", element.getClass_()); 50635 } 50636 if (element.hasOrder()) { 50637 composeCodeableConcept("order", element.getOrder()); 50638 } 50639 } 50640 50641 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponent(String name, 50642 SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException { 50643 if (element != null) { 50644 composeElementAttributes(element); 50645 xml.enter(FHIR_NS, name); 50646 composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentElements(element); 50647 composeElementClose(element); 50648 xml.exit(FHIR_NS, name); 50649 } 50650 } 50651 50652 protected void composeSubstanceSourceMaterialSubstanceSourceMaterialPartDescriptionComponentElements( 50653 SubstanceSourceMaterial.SubstanceSourceMaterialPartDescriptionComponent element) throws IOException { 50654 composeBackboneElementElements(element); 50655 if (element.hasPart()) { 50656 composeCodeableConcept("part", element.getPart()); 50657 } 50658 if (element.hasPartLocation()) { 50659 composeCodeableConcept("partLocation", element.getPartLocation()); 50660 } 50661 } 50662 50663 protected void composeSubstanceSpecification(String name, SubstanceSpecification element) throws IOException { 50664 if (element != null) { 50665 composeDomainResourceAttributes(element); 50666 xml.enter(FHIR_NS, name); 50667 composeSubstanceSpecificationElements(element); 50668 composeElementClose(element); 50669 xml.exit(FHIR_NS, name); 50670 } 50671 } 50672 50673 protected void composeSubstanceSpecificationElements(SubstanceSpecification element) throws IOException { 50674 composeDomainResourceElements(element); 50675 if (element.hasIdentifier()) { 50676 composeIdentifier("identifier", element.getIdentifier()); 50677 } 50678 if (element.hasType()) { 50679 composeCodeableConcept("type", element.getType()); 50680 } 50681 if (element.hasStatus()) { 50682 composeCodeableConcept("status", element.getStatus()); 50683 } 50684 if (element.hasDomain()) { 50685 composeCodeableConcept("domain", element.getDomain()); 50686 } 50687 if (element.hasDescriptionElement()) { 50688 composeString("description", element.getDescriptionElement()); 50689 } 50690 if (element.hasSource()) { 50691 for (Reference e : element.getSource()) 50692 composeReference("source", e); 50693 } 50694 if (element.hasCommentElement()) { 50695 composeString("comment", element.getCommentElement()); 50696 } 50697 if (element.hasMoiety()) { 50698 for (SubstanceSpecification.SubstanceSpecificationMoietyComponent e : element.getMoiety()) 50699 composeSubstanceSpecificationSubstanceSpecificationMoietyComponent("moiety", e); 50700 } 50701 if (element.hasProperty()) { 50702 for (SubstanceSpecification.SubstanceSpecificationPropertyComponent e : element.getProperty()) 50703 composeSubstanceSpecificationSubstanceSpecificationPropertyComponent("property", e); 50704 } 50705 if (element.hasReferenceInformation()) { 50706 composeReference("referenceInformation", element.getReferenceInformation()); 50707 } 50708 if (element.hasStructure()) { 50709 composeSubstanceSpecificationSubstanceSpecificationStructureComponent("structure", element.getStructure()); 50710 } 50711 if (element.hasCode()) { 50712 for (SubstanceSpecification.SubstanceSpecificationCodeComponent e : element.getCode()) 50713 composeSubstanceSpecificationSubstanceSpecificationCodeComponent("code", e); 50714 } 50715 if (element.hasName()) { 50716 for (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getName()) 50717 composeSubstanceSpecificationSubstanceSpecificationNameComponent("name", e); 50718 } 50719 if (element.hasMolecularWeight()) { 50720 for (SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent e : element 50721 .getMolecularWeight()) 50722 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent("molecularWeight", 50723 e); 50724 } 50725 if (element.hasRelationship()) { 50726 for (SubstanceSpecification.SubstanceSpecificationRelationshipComponent e : element.getRelationship()) 50727 composeSubstanceSpecificationSubstanceSpecificationRelationshipComponent("relationship", e); 50728 } 50729 if (element.hasNucleicAcid()) { 50730 composeReference("nucleicAcid", element.getNucleicAcid()); 50731 } 50732 if (element.hasPolymer()) { 50733 composeReference("polymer", element.getPolymer()); 50734 } 50735 if (element.hasProtein()) { 50736 composeReference("protein", element.getProtein()); 50737 } 50738 if (element.hasSourceMaterial()) { 50739 composeReference("sourceMaterial", element.getSourceMaterial()); 50740 } 50741 } 50742 50743 protected void composeSubstanceSpecificationSubstanceSpecificationMoietyComponent(String name, 50744 SubstanceSpecification.SubstanceSpecificationMoietyComponent element) throws IOException { 50745 if (element != null) { 50746 composeElementAttributes(element); 50747 xml.enter(FHIR_NS, name); 50748 composeSubstanceSpecificationSubstanceSpecificationMoietyComponentElements(element); 50749 composeElementClose(element); 50750 xml.exit(FHIR_NS, name); 50751 } 50752 } 50753 50754 protected void composeSubstanceSpecificationSubstanceSpecificationMoietyComponentElements( 50755 SubstanceSpecification.SubstanceSpecificationMoietyComponent element) throws IOException { 50756 composeBackboneElementElements(element); 50757 if (element.hasRole()) { 50758 composeCodeableConcept("role", element.getRole()); 50759 } 50760 if (element.hasIdentifier()) { 50761 composeIdentifier("identifier", element.getIdentifier()); 50762 } 50763 if (element.hasNameElement()) { 50764 composeString("name", element.getNameElement()); 50765 } 50766 if (element.hasStereochemistry()) { 50767 composeCodeableConcept("stereochemistry", element.getStereochemistry()); 50768 } 50769 if (element.hasOpticalActivity()) { 50770 composeCodeableConcept("opticalActivity", element.getOpticalActivity()); 50771 } 50772 if (element.hasMolecularFormulaElement()) { 50773 composeString("molecularFormula", element.getMolecularFormulaElement()); 50774 } 50775 if (element.hasAmount()) { 50776 composeType("amount", element.getAmount()); 50777 } 50778 } 50779 50780 protected void composeSubstanceSpecificationSubstanceSpecificationPropertyComponent(String name, 50781 SubstanceSpecification.SubstanceSpecificationPropertyComponent element) throws IOException { 50782 if (element != null) { 50783 composeElementAttributes(element); 50784 xml.enter(FHIR_NS, name); 50785 composeSubstanceSpecificationSubstanceSpecificationPropertyComponentElements(element); 50786 composeElementClose(element); 50787 xml.exit(FHIR_NS, name); 50788 } 50789 } 50790 50791 protected void composeSubstanceSpecificationSubstanceSpecificationPropertyComponentElements( 50792 SubstanceSpecification.SubstanceSpecificationPropertyComponent element) throws IOException { 50793 composeBackboneElementElements(element); 50794 if (element.hasCategory()) { 50795 composeCodeableConcept("category", element.getCategory()); 50796 } 50797 if (element.hasCode()) { 50798 composeCodeableConcept("code", element.getCode()); 50799 } 50800 if (element.hasParametersElement()) { 50801 composeString("parameters", element.getParametersElement()); 50802 } 50803 if (element.hasDefiningSubstance()) { 50804 composeType("definingSubstance", element.getDefiningSubstance()); 50805 } 50806 if (element.hasAmount()) { 50807 composeType("amount", element.getAmount()); 50808 } 50809 } 50810 50811 protected void composeSubstanceSpecificationSubstanceSpecificationStructureComponent(String name, 50812 SubstanceSpecification.SubstanceSpecificationStructureComponent element) throws IOException { 50813 if (element != null) { 50814 composeElementAttributes(element); 50815 xml.enter(FHIR_NS, name); 50816 composeSubstanceSpecificationSubstanceSpecificationStructureComponentElements(element); 50817 composeElementClose(element); 50818 xml.exit(FHIR_NS, name); 50819 } 50820 } 50821 50822 protected void composeSubstanceSpecificationSubstanceSpecificationStructureComponentElements( 50823 SubstanceSpecification.SubstanceSpecificationStructureComponent element) throws IOException { 50824 composeBackboneElementElements(element); 50825 if (element.hasStereochemistry()) { 50826 composeCodeableConcept("stereochemistry", element.getStereochemistry()); 50827 } 50828 if (element.hasOpticalActivity()) { 50829 composeCodeableConcept("opticalActivity", element.getOpticalActivity()); 50830 } 50831 if (element.hasMolecularFormulaElement()) { 50832 composeString("molecularFormula", element.getMolecularFormulaElement()); 50833 } 50834 if (element.hasMolecularFormulaByMoietyElement()) { 50835 composeString("molecularFormulaByMoiety", element.getMolecularFormulaByMoietyElement()); 50836 } 50837 if (element.hasIsotope()) { 50838 for (SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent e : element.getIsotope()) 50839 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent("isotope", e); 50840 } 50841 if (element.hasMolecularWeight()) { 50842 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent("molecularWeight", 50843 element.getMolecularWeight()); 50844 } 50845 if (element.hasSource()) { 50846 for (Reference e : element.getSource()) 50847 composeReference("source", e); 50848 } 50849 if (element.hasRepresentation()) { 50850 for (SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent e : element 50851 .getRepresentation()) 50852 composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent("representation", e); 50853 } 50854 } 50855 50856 protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponent(String name, 50857 SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent element) throws IOException { 50858 if (element != null) { 50859 composeElementAttributes(element); 50860 xml.enter(FHIR_NS, name); 50861 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentElements(element); 50862 composeElementClose(element); 50863 xml.exit(FHIR_NS, name); 50864 } 50865 } 50866 50867 protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeComponentElements( 50868 SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent element) throws IOException { 50869 composeBackboneElementElements(element); 50870 if (element.hasIdentifier()) { 50871 composeIdentifier("identifier", element.getIdentifier()); 50872 } 50873 if (element.hasName()) { 50874 composeCodeableConcept("name", element.getName()); 50875 } 50876 if (element.hasSubstitution()) { 50877 composeCodeableConcept("substitution", element.getSubstitution()); 50878 } 50879 if (element.hasHalfLife()) { 50880 composeQuantity("halfLife", element.getHalfLife()); 50881 } 50882 if (element.hasMolecularWeight()) { 50883 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent("molecularWeight", 50884 element.getMolecularWeight()); 50885 } 50886 } 50887 50888 protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponent( 50889 String name, SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent element) 50890 throws IOException { 50891 if (element != null) { 50892 composeElementAttributes(element); 50893 xml.enter(FHIR_NS, name); 50894 composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentElements(element); 50895 composeElementClose(element); 50896 xml.exit(FHIR_NS, name); 50897 } 50898 } 50899 50900 protected void composeSubstanceSpecificationSubstanceSpecificationStructureIsotopeMolecularWeightComponentElements( 50901 SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent element) 50902 throws IOException { 50903 composeBackboneElementElements(element); 50904 if (element.hasMethod()) { 50905 composeCodeableConcept("method", element.getMethod()); 50906 } 50907 if (element.hasType()) { 50908 composeCodeableConcept("type", element.getType()); 50909 } 50910 if (element.hasAmount()) { 50911 composeQuantity("amount", element.getAmount()); 50912 } 50913 } 50914 50915 protected void composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponent(String name, 50916 SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent element) throws IOException { 50917 if (element != null) { 50918 composeElementAttributes(element); 50919 xml.enter(FHIR_NS, name); 50920 composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentElements(element); 50921 composeElementClose(element); 50922 xml.exit(FHIR_NS, name); 50923 } 50924 } 50925 50926 protected void composeSubstanceSpecificationSubstanceSpecificationStructureRepresentationComponentElements( 50927 SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent element) throws IOException { 50928 composeBackboneElementElements(element); 50929 if (element.hasType()) { 50930 composeCodeableConcept("type", element.getType()); 50931 } 50932 if (element.hasRepresentationElement()) { 50933 composeString("representation", element.getRepresentationElement()); 50934 } 50935 if (element.hasAttachment()) { 50936 composeAttachment("attachment", element.getAttachment()); 50937 } 50938 } 50939 50940 protected void composeSubstanceSpecificationSubstanceSpecificationCodeComponent(String name, 50941 SubstanceSpecification.SubstanceSpecificationCodeComponent element) throws IOException { 50942 if (element != null) { 50943 composeElementAttributes(element); 50944 xml.enter(FHIR_NS, name); 50945 composeSubstanceSpecificationSubstanceSpecificationCodeComponentElements(element); 50946 composeElementClose(element); 50947 xml.exit(FHIR_NS, name); 50948 } 50949 } 50950 50951 protected void composeSubstanceSpecificationSubstanceSpecificationCodeComponentElements( 50952 SubstanceSpecification.SubstanceSpecificationCodeComponent element) throws IOException { 50953 composeBackboneElementElements(element); 50954 if (element.hasCode()) { 50955 composeCodeableConcept("code", element.getCode()); 50956 } 50957 if (element.hasStatus()) { 50958 composeCodeableConcept("status", element.getStatus()); 50959 } 50960 if (element.hasStatusDateElement()) { 50961 composeDateTime("statusDate", element.getStatusDateElement()); 50962 } 50963 if (element.hasCommentElement()) { 50964 composeString("comment", element.getCommentElement()); 50965 } 50966 if (element.hasSource()) { 50967 for (Reference e : element.getSource()) 50968 composeReference("source", e); 50969 } 50970 } 50971 50972 protected void composeSubstanceSpecificationSubstanceSpecificationNameComponent(String name, 50973 SubstanceSpecification.SubstanceSpecificationNameComponent element) throws IOException { 50974 if (element != null) { 50975 composeElementAttributes(element); 50976 xml.enter(FHIR_NS, name); 50977 composeSubstanceSpecificationSubstanceSpecificationNameComponentElements(element); 50978 composeElementClose(element); 50979 xml.exit(FHIR_NS, name); 50980 } 50981 } 50982 50983 protected void composeSubstanceSpecificationSubstanceSpecificationNameComponentElements( 50984 SubstanceSpecification.SubstanceSpecificationNameComponent element) throws IOException { 50985 composeBackboneElementElements(element); 50986 if (element.hasNameElement()) { 50987 composeString("name", element.getNameElement()); 50988 } 50989 if (element.hasType()) { 50990 composeCodeableConcept("type", element.getType()); 50991 } 50992 if (element.hasStatus()) { 50993 composeCodeableConcept("status", element.getStatus()); 50994 } 50995 if (element.hasPreferredElement()) { 50996 composeBoolean("preferred", element.getPreferredElement()); 50997 } 50998 if (element.hasLanguage()) { 50999 for (CodeableConcept e : element.getLanguage()) 51000 composeCodeableConcept("language", e); 51001 } 51002 if (element.hasDomain()) { 51003 for (CodeableConcept e : element.getDomain()) 51004 composeCodeableConcept("domain", e); 51005 } 51006 if (element.hasJurisdiction()) { 51007 for (CodeableConcept e : element.getJurisdiction()) 51008 composeCodeableConcept("jurisdiction", e); 51009 } 51010 if (element.hasSynonym()) { 51011 for (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getSynonym()) 51012 composeSubstanceSpecificationSubstanceSpecificationNameComponent("synonym", e); 51013 } 51014 if (element.hasTranslation()) { 51015 for (SubstanceSpecification.SubstanceSpecificationNameComponent e : element.getTranslation()) 51016 composeSubstanceSpecificationSubstanceSpecificationNameComponent("translation", e); 51017 } 51018 if (element.hasOfficial()) { 51019 for (SubstanceSpecification.SubstanceSpecificationNameOfficialComponent e : element.getOfficial()) 51020 composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponent("official", e); 51021 } 51022 if (element.hasSource()) { 51023 for (Reference e : element.getSource()) 51024 composeReference("source", e); 51025 } 51026 } 51027 51028 protected void composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponent(String name, 51029 SubstanceSpecification.SubstanceSpecificationNameOfficialComponent element) throws IOException { 51030 if (element != null) { 51031 composeElementAttributes(element); 51032 xml.enter(FHIR_NS, name); 51033 composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponentElements(element); 51034 composeElementClose(element); 51035 xml.exit(FHIR_NS, name); 51036 } 51037 } 51038 51039 protected void composeSubstanceSpecificationSubstanceSpecificationNameOfficialComponentElements( 51040 SubstanceSpecification.SubstanceSpecificationNameOfficialComponent element) throws IOException { 51041 composeBackboneElementElements(element); 51042 if (element.hasAuthority()) { 51043 composeCodeableConcept("authority", element.getAuthority()); 51044 } 51045 if (element.hasStatus()) { 51046 composeCodeableConcept("status", element.getStatus()); 51047 } 51048 if (element.hasDateElement()) { 51049 composeDateTime("date", element.getDateElement()); 51050 } 51051 } 51052 51053 protected void composeSubstanceSpecificationSubstanceSpecificationRelationshipComponent(String name, 51054 SubstanceSpecification.SubstanceSpecificationRelationshipComponent element) throws IOException { 51055 if (element != null) { 51056 composeElementAttributes(element); 51057 xml.enter(FHIR_NS, name); 51058 composeSubstanceSpecificationSubstanceSpecificationRelationshipComponentElements(element); 51059 composeElementClose(element); 51060 xml.exit(FHIR_NS, name); 51061 } 51062 } 51063 51064 protected void composeSubstanceSpecificationSubstanceSpecificationRelationshipComponentElements( 51065 SubstanceSpecification.SubstanceSpecificationRelationshipComponent element) throws IOException { 51066 composeBackboneElementElements(element); 51067 if (element.hasSubstance()) { 51068 composeType("substance", element.getSubstance()); 51069 } 51070 if (element.hasRelationship()) { 51071 composeCodeableConcept("relationship", element.getRelationship()); 51072 } 51073 if (element.hasIsDefiningElement()) { 51074 composeBoolean("isDefining", element.getIsDefiningElement()); 51075 } 51076 if (element.hasAmount()) { 51077 composeType("amount", element.getAmount()); 51078 } 51079 if (element.hasAmountRatioLowLimit()) { 51080 composeRatio("amountRatioLowLimit", element.getAmountRatioLowLimit()); 51081 } 51082 if (element.hasAmountType()) { 51083 composeCodeableConcept("amountType", element.getAmountType()); 51084 } 51085 if (element.hasSource()) { 51086 for (Reference e : element.getSource()) 51087 composeReference("source", e); 51088 } 51089 } 51090 51091 protected void composeSupplyDelivery(String name, SupplyDelivery element) throws IOException { 51092 if (element != null) { 51093 composeDomainResourceAttributes(element); 51094 xml.enter(FHIR_NS, name); 51095 composeSupplyDeliveryElements(element); 51096 composeElementClose(element); 51097 xml.exit(FHIR_NS, name); 51098 } 51099 } 51100 51101 protected void composeSupplyDeliveryElements(SupplyDelivery element) throws IOException { 51102 composeDomainResourceElements(element); 51103 if (element.hasIdentifier()) { 51104 for (Identifier e : element.getIdentifier()) 51105 composeIdentifier("identifier", e); 51106 } 51107 if (element.hasBasedOn()) { 51108 for (Reference e : element.getBasedOn()) 51109 composeReference("basedOn", e); 51110 } 51111 if (element.hasPartOf()) { 51112 for (Reference e : element.getPartOf()) 51113 composeReference("partOf", e); 51114 } 51115 if (element.hasStatusElement()) 51116 composeEnumeration("status", element.getStatusElement(), new SupplyDelivery.SupplyDeliveryStatusEnumFactory()); 51117 if (element.hasPatient()) { 51118 composeReference("patient", element.getPatient()); 51119 } 51120 if (element.hasType()) { 51121 composeCodeableConcept("type", element.getType()); 51122 } 51123 if (element.hasSuppliedItem()) { 51124 composeSupplyDeliverySupplyDeliverySuppliedItemComponent("suppliedItem", element.getSuppliedItem()); 51125 } 51126 if (element.hasOccurrence()) { 51127 composeType("occurrence", element.getOccurrence()); 51128 } 51129 if (element.hasSupplier()) { 51130 composeReference("supplier", element.getSupplier()); 51131 } 51132 if (element.hasDestination()) { 51133 composeReference("destination", element.getDestination()); 51134 } 51135 if (element.hasReceiver()) { 51136 for (Reference e : element.getReceiver()) 51137 composeReference("receiver", e); 51138 } 51139 } 51140 51141 protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponent(String name, 51142 SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { 51143 if (element != null) { 51144 composeElementAttributes(element); 51145 xml.enter(FHIR_NS, name); 51146 composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements(element); 51147 composeElementClose(element); 51148 xml.exit(FHIR_NS, name); 51149 } 51150 } 51151 51152 protected void composeSupplyDeliverySupplyDeliverySuppliedItemComponentElements( 51153 SupplyDelivery.SupplyDeliverySuppliedItemComponent element) throws IOException { 51154 composeBackboneElementElements(element); 51155 if (element.hasQuantity()) { 51156 composeQuantity("quantity", element.getQuantity()); 51157 } 51158 if (element.hasItem()) { 51159 composeType("item", element.getItem()); 51160 } 51161 } 51162 51163 protected void composeSupplyRequest(String name, SupplyRequest element) throws IOException { 51164 if (element != null) { 51165 composeDomainResourceAttributes(element); 51166 xml.enter(FHIR_NS, name); 51167 composeSupplyRequestElements(element); 51168 composeElementClose(element); 51169 xml.exit(FHIR_NS, name); 51170 } 51171 } 51172 51173 protected void composeSupplyRequestElements(SupplyRequest element) throws IOException { 51174 composeDomainResourceElements(element); 51175 if (element.hasIdentifier()) { 51176 for (Identifier e : element.getIdentifier()) 51177 composeIdentifier("identifier", e); 51178 } 51179 if (element.hasStatusElement()) 51180 composeEnumeration("status", element.getStatusElement(), new SupplyRequest.SupplyRequestStatusEnumFactory()); 51181 if (element.hasCategory()) { 51182 composeCodeableConcept("category", element.getCategory()); 51183 } 51184 if (element.hasPriorityElement()) 51185 composeEnumeration("priority", element.getPriorityElement(), new SupplyRequest.RequestPriorityEnumFactory()); 51186 if (element.hasItem()) { 51187 composeType("item", element.getItem()); 51188 } 51189 if (element.hasQuantity()) { 51190 composeQuantity("quantity", element.getQuantity()); 51191 } 51192 if (element.hasParameter()) { 51193 for (SupplyRequest.SupplyRequestParameterComponent e : element.getParameter()) 51194 composeSupplyRequestSupplyRequestParameterComponent("parameter", e); 51195 } 51196 if (element.hasOccurrence()) { 51197 composeType("occurrence", element.getOccurrence()); 51198 } 51199 if (element.hasAuthoredOnElement()) { 51200 composeDateTime("authoredOn", element.getAuthoredOnElement()); 51201 } 51202 if (element.hasRequester()) { 51203 composeReference("requester", element.getRequester()); 51204 } 51205 if (element.hasSupplier()) { 51206 for (Reference e : element.getSupplier()) 51207 composeReference("supplier", e); 51208 } 51209 if (element.hasReasonCode()) { 51210 for (CodeableConcept e : element.getReasonCode()) 51211 composeCodeableConcept("reasonCode", e); 51212 } 51213 if (element.hasReasonReference()) { 51214 for (Reference e : element.getReasonReference()) 51215 composeReference("reasonReference", e); 51216 } 51217 if (element.hasDeliverFrom()) { 51218 composeReference("deliverFrom", element.getDeliverFrom()); 51219 } 51220 if (element.hasDeliverTo()) { 51221 composeReference("deliverTo", element.getDeliverTo()); 51222 } 51223 } 51224 51225 protected void composeSupplyRequestSupplyRequestParameterComponent(String name, 51226 SupplyRequest.SupplyRequestParameterComponent element) throws IOException { 51227 if (element != null) { 51228 composeElementAttributes(element); 51229 xml.enter(FHIR_NS, name); 51230 composeSupplyRequestSupplyRequestParameterComponentElements(element); 51231 composeElementClose(element); 51232 xml.exit(FHIR_NS, name); 51233 } 51234 } 51235 51236 protected void composeSupplyRequestSupplyRequestParameterComponentElements( 51237 SupplyRequest.SupplyRequestParameterComponent element) throws IOException { 51238 composeBackboneElementElements(element); 51239 if (element.hasCode()) { 51240 composeCodeableConcept("code", element.getCode()); 51241 } 51242 if (element.hasValue()) { 51243 composeType("value", element.getValue()); 51244 } 51245 } 51246 51247 protected void composeTask(String name, Task element) throws IOException { 51248 if (element != null) { 51249 composeDomainResourceAttributes(element); 51250 xml.enter(FHIR_NS, name); 51251 composeTaskElements(element); 51252 composeElementClose(element); 51253 xml.exit(FHIR_NS, name); 51254 } 51255 } 51256 51257 protected void composeTaskElements(Task element) throws IOException { 51258 composeDomainResourceElements(element); 51259 if (element.hasIdentifier()) { 51260 for (Identifier e : element.getIdentifier()) 51261 composeIdentifier("identifier", e); 51262 } 51263 if (element.hasInstantiatesCanonicalElement()) { 51264 composeCanonical("instantiatesCanonical", element.getInstantiatesCanonicalElement()); 51265 } 51266 if (element.hasInstantiatesUriElement()) { 51267 composeUri("instantiatesUri", element.getInstantiatesUriElement()); 51268 } 51269 if (element.hasBasedOn()) { 51270 for (Reference e : element.getBasedOn()) 51271 composeReference("basedOn", e); 51272 } 51273 if (element.hasGroupIdentifier()) { 51274 composeIdentifier("groupIdentifier", element.getGroupIdentifier()); 51275 } 51276 if (element.hasPartOf()) { 51277 for (Reference e : element.getPartOf()) 51278 composeReference("partOf", e); 51279 } 51280 if (element.hasStatusElement()) 51281 composeEnumeration("status", element.getStatusElement(), new Task.TaskStatusEnumFactory()); 51282 if (element.hasStatusReason()) { 51283 composeCodeableConcept("statusReason", element.getStatusReason()); 51284 } 51285 if (element.hasBusinessStatus()) { 51286 composeCodeableConcept("businessStatus", element.getBusinessStatus()); 51287 } 51288 if (element.hasIntentElement()) 51289 composeEnumeration("intent", element.getIntentElement(), new Task.TaskIntentEnumFactory()); 51290 if (element.hasPriorityElement()) 51291 composeEnumeration("priority", element.getPriorityElement(), new Task.TaskPriorityEnumFactory()); 51292 if (element.hasCode()) { 51293 composeCodeableConcept("code", element.getCode()); 51294 } 51295 if (element.hasDescriptionElement()) { 51296 composeString("description", element.getDescriptionElement()); 51297 } 51298 if (element.hasFocus()) { 51299 composeReference("focus", element.getFocus()); 51300 } 51301 if (element.hasFor()) { 51302 composeReference("for", element.getFor()); 51303 } 51304 if (element.hasEncounter()) { 51305 composeReference("encounter", element.getEncounter()); 51306 } 51307 if (element.hasExecutionPeriod()) { 51308 composePeriod("executionPeriod", element.getExecutionPeriod()); 51309 } 51310 if (element.hasAuthoredOnElement()) { 51311 composeDateTime("authoredOn", element.getAuthoredOnElement()); 51312 } 51313 if (element.hasLastModifiedElement()) { 51314 composeDateTime("lastModified", element.getLastModifiedElement()); 51315 } 51316 if (element.hasRequester()) { 51317 composeReference("requester", element.getRequester()); 51318 } 51319 if (element.hasPerformerType()) { 51320 for (CodeableConcept e : element.getPerformerType()) 51321 composeCodeableConcept("performerType", e); 51322 } 51323 if (element.hasOwner()) { 51324 composeReference("owner", element.getOwner()); 51325 } 51326 if (element.hasLocation()) { 51327 composeReference("location", element.getLocation()); 51328 } 51329 if (element.hasReasonCode()) { 51330 composeCodeableConcept("reasonCode", element.getReasonCode()); 51331 } 51332 if (element.hasReasonReference()) { 51333 composeReference("reasonReference", element.getReasonReference()); 51334 } 51335 if (element.hasInsurance()) { 51336 for (Reference e : element.getInsurance()) 51337 composeReference("insurance", e); 51338 } 51339 if (element.hasNote()) { 51340 for (Annotation e : element.getNote()) 51341 composeAnnotation("note", e); 51342 } 51343 if (element.hasRelevantHistory()) { 51344 for (Reference e : element.getRelevantHistory()) 51345 composeReference("relevantHistory", e); 51346 } 51347 if (element.hasRestriction()) { 51348 composeTaskTaskRestrictionComponent("restriction", element.getRestriction()); 51349 } 51350 if (element.hasInput()) { 51351 for (Task.ParameterComponent e : element.getInput()) 51352 composeTaskParameterComponent("input", e); 51353 } 51354 if (element.hasOutput()) { 51355 for (Task.TaskOutputComponent e : element.getOutput()) 51356 composeTaskTaskOutputComponent("output", e); 51357 } 51358 } 51359 51360 protected void composeTaskTaskRestrictionComponent(String name, Task.TaskRestrictionComponent element) 51361 throws IOException { 51362 if (element != null) { 51363 composeElementAttributes(element); 51364 xml.enter(FHIR_NS, name); 51365 composeTaskTaskRestrictionComponentElements(element); 51366 composeElementClose(element); 51367 xml.exit(FHIR_NS, name); 51368 } 51369 } 51370 51371 protected void composeTaskTaskRestrictionComponentElements(Task.TaskRestrictionComponent element) throws IOException { 51372 composeBackboneElementElements(element); 51373 if (element.hasRepetitionsElement()) { 51374 composePositiveInt("repetitions", element.getRepetitionsElement()); 51375 } 51376 if (element.hasPeriod()) { 51377 composePeriod("period", element.getPeriod()); 51378 } 51379 if (element.hasRecipient()) { 51380 for (Reference e : element.getRecipient()) 51381 composeReference("recipient", e); 51382 } 51383 } 51384 51385 protected void composeTaskParameterComponent(String name, Task.ParameterComponent element) throws IOException { 51386 if (element != null) { 51387 composeElementAttributes(element); 51388 xml.enter(FHIR_NS, name); 51389 composeTaskParameterComponentElements(element); 51390 composeElementClose(element); 51391 xml.exit(FHIR_NS, name); 51392 } 51393 } 51394 51395 protected void composeTaskParameterComponentElements(Task.ParameterComponent element) throws IOException { 51396 composeBackboneElementElements(element); 51397 if (element.hasType()) { 51398 composeCodeableConcept("type", element.getType()); 51399 } 51400 if (element.hasValue()) { 51401 composeType("value", element.getValue()); 51402 } 51403 } 51404 51405 protected void composeTaskTaskOutputComponent(String name, Task.TaskOutputComponent element) throws IOException { 51406 if (element != null) { 51407 composeElementAttributes(element); 51408 xml.enter(FHIR_NS, name); 51409 composeTaskTaskOutputComponentElements(element); 51410 composeElementClose(element); 51411 xml.exit(FHIR_NS, name); 51412 } 51413 } 51414 51415 protected void composeTaskTaskOutputComponentElements(Task.TaskOutputComponent element) throws IOException { 51416 composeBackboneElementElements(element); 51417 if (element.hasType()) { 51418 composeCodeableConcept("type", element.getType()); 51419 } 51420 if (element.hasValue()) { 51421 composeType("value", element.getValue()); 51422 } 51423 } 51424 51425 protected void composeTerminologyCapabilities(String name, TerminologyCapabilities element) throws IOException { 51426 if (element != null) { 51427 composeDomainResourceAttributes(element); 51428 xml.enter(FHIR_NS, name); 51429 composeTerminologyCapabilitiesElements(element); 51430 composeElementClose(element); 51431 xml.exit(FHIR_NS, name); 51432 } 51433 } 51434 51435 protected void composeTerminologyCapabilitiesElements(TerminologyCapabilities element) throws IOException { 51436 composeDomainResourceElements(element); 51437 if (element.hasUrlElement()) { 51438 composeUri("url", element.getUrlElement()); 51439 } 51440 if (element.hasVersionElement()) { 51441 composeString("version", element.getVersionElement()); 51442 } 51443 if (element.hasNameElement()) { 51444 composeString("name", element.getNameElement()); 51445 } 51446 if (element.hasTitleElement()) { 51447 composeString("title", element.getTitleElement()); 51448 } 51449 if (element.hasStatusElement()) 51450 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 51451 if (element.hasExperimentalElement()) { 51452 composeBoolean("experimental", element.getExperimentalElement()); 51453 } 51454 if (element.hasDateElement()) { 51455 composeDateTime("date", element.getDateElement()); 51456 } 51457 if (element.hasPublisherElement()) { 51458 composeString("publisher", element.getPublisherElement()); 51459 } 51460 if (element.hasContact()) { 51461 for (ContactDetail e : element.getContact()) 51462 composeContactDetail("contact", e); 51463 } 51464 if (element.hasDescriptionElement()) { 51465 composeMarkdown("description", element.getDescriptionElement()); 51466 } 51467 if (element.hasUseContext()) { 51468 for (UsageContext e : element.getUseContext()) 51469 composeUsageContext("useContext", e); 51470 } 51471 if (element.hasJurisdiction()) { 51472 for (CodeableConcept e : element.getJurisdiction()) 51473 composeCodeableConcept("jurisdiction", e); 51474 } 51475 if (element.hasPurposeElement()) { 51476 composeMarkdown("purpose", element.getPurposeElement()); 51477 } 51478 if (element.hasCopyrightElement()) { 51479 composeMarkdown("copyright", element.getCopyrightElement()); 51480 } 51481 if (element.hasKindElement()) 51482 composeEnumeration("kind", element.getKindElement(), 51483 new TerminologyCapabilities.CapabilityStatementKindEnumFactory()); 51484 if (element.hasSoftware()) { 51485 composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent("software", element.getSoftware()); 51486 } 51487 if (element.hasImplementation()) { 51488 composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent("implementation", 51489 element.getImplementation()); 51490 } 51491 if (element.hasLockedDateElement()) { 51492 composeBoolean("lockedDate", element.getLockedDateElement()); 51493 } 51494 if (element.hasCodeSystem()) { 51495 for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent e : element.getCodeSystem()) 51496 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent("codeSystem", e); 51497 } 51498 if (element.hasExpansion()) { 51499 composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent("expansion", element.getExpansion()); 51500 } 51501 if (element.hasCodeSearchElement()) 51502 composeEnumeration("codeSearch", element.getCodeSearchElement(), 51503 new TerminologyCapabilities.CodeSearchSupportEnumFactory()); 51504 if (element.hasValidateCode()) { 51505 composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent("validateCode", 51506 element.getValidateCode()); 51507 } 51508 if (element.hasTranslation()) { 51509 composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent("translation", 51510 element.getTranslation()); 51511 } 51512 if (element.hasClosure()) { 51513 composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent("closure", element.getClosure()); 51514 } 51515 } 51516 51517 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(String name, 51518 TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException { 51519 if (element != null) { 51520 composeElementAttributes(element); 51521 xml.enter(FHIR_NS, name); 51522 composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentElements(element); 51523 composeElementClose(element); 51524 xml.exit(FHIR_NS, name); 51525 } 51526 } 51527 51528 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponentElements( 51529 TerminologyCapabilities.TerminologyCapabilitiesSoftwareComponent element) throws IOException { 51530 composeBackboneElementElements(element); 51531 if (element.hasNameElement()) { 51532 composeString("name", element.getNameElement()); 51533 } 51534 if (element.hasVersionElement()) { 51535 composeString("version", element.getVersionElement()); 51536 } 51537 } 51538 51539 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(String name, 51540 TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException { 51541 if (element != null) { 51542 composeElementAttributes(element); 51543 xml.enter(FHIR_NS, name); 51544 composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentElements(element); 51545 composeElementClose(element); 51546 xml.exit(FHIR_NS, name); 51547 } 51548 } 51549 51550 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponentElements( 51551 TerminologyCapabilities.TerminologyCapabilitiesImplementationComponent element) throws IOException { 51552 composeBackboneElementElements(element); 51553 if (element.hasDescriptionElement()) { 51554 composeString("description", element.getDescriptionElement()); 51555 } 51556 if (element.hasUrlElement()) { 51557 composeUrl("url", element.getUrlElement()); 51558 } 51559 } 51560 51561 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(String name, 51562 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException { 51563 if (element != null) { 51564 composeElementAttributes(element); 51565 xml.enter(FHIR_NS, name); 51566 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentElements(element); 51567 composeElementClose(element); 51568 xml.exit(FHIR_NS, name); 51569 } 51570 } 51571 51572 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponentElements( 51573 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemComponent element) throws IOException { 51574 composeBackboneElementElements(element); 51575 if (element.hasUriElement()) { 51576 composeCanonical("uri", element.getUriElement()); 51577 } 51578 if (element.hasVersion()) { 51579 for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent e : element.getVersion()) 51580 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent("version", e); 51581 } 51582 if (element.hasSubsumptionElement()) { 51583 composeBoolean("subsumption", element.getSubsumptionElement()); 51584 } 51585 } 51586 51587 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponent(String name, 51588 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException { 51589 if (element != null) { 51590 composeElementAttributes(element); 51591 xml.enter(FHIR_NS, name); 51592 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentElements(element); 51593 composeElementClose(element); 51594 xml.exit(FHIR_NS, name); 51595 } 51596 } 51597 51598 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionComponentElements( 51599 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionComponent element) throws IOException { 51600 composeBackboneElementElements(element); 51601 if (element.hasCodeElement()) { 51602 composeString("code", element.getCodeElement()); 51603 } 51604 if (element.hasIsDefaultElement()) { 51605 composeBoolean("isDefault", element.getIsDefaultElement()); 51606 } 51607 if (element.hasCompositionalElement()) { 51608 composeBoolean("compositional", element.getCompositionalElement()); 51609 } 51610 if (element.hasLanguage()) { 51611 for (CodeType e : element.getLanguage()) 51612 composeCode("language", e); 51613 } 51614 if (element.hasFilter()) { 51615 for (TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent e : element.getFilter()) 51616 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent("filter", e); 51617 } 51618 if (element.hasProperty()) { 51619 for (CodeType e : element.getProperty()) 51620 composeCode("property", e); 51621 } 51622 } 51623 51624 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(String name, 51625 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException { 51626 if (element != null) { 51627 composeElementAttributes(element); 51628 xml.enter(FHIR_NS, name); 51629 composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentElements(element); 51630 composeElementClose(element); 51631 xml.exit(FHIR_NS, name); 51632 } 51633 } 51634 51635 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponentElements( 51636 TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element) throws IOException { 51637 composeBackboneElementElements(element); 51638 if (element.hasCodeElement()) { 51639 composeCode("code", element.getCodeElement()); 51640 } 51641 if (element.hasOp()) { 51642 for (CodeType e : element.getOp()) 51643 composeCode("op", e); 51644 } 51645 } 51646 51647 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(String name, 51648 TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException { 51649 if (element != null) { 51650 composeElementAttributes(element); 51651 xml.enter(FHIR_NS, name); 51652 composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentElements(element); 51653 composeElementClose(element); 51654 xml.exit(FHIR_NS, name); 51655 } 51656 } 51657 51658 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponentElements( 51659 TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element) throws IOException { 51660 composeBackboneElementElements(element); 51661 if (element.hasHierarchicalElement()) { 51662 composeBoolean("hierarchical", element.getHierarchicalElement()); 51663 } 51664 if (element.hasPagingElement()) { 51665 composeBoolean("paging", element.getPagingElement()); 51666 } 51667 if (element.hasIncompleteElement()) { 51668 composeBoolean("incomplete", element.getIncompleteElement()); 51669 } 51670 if (element.hasParameter()) { 51671 for (TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent e : element.getParameter()) 51672 composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent("parameter", e); 51673 } 51674 if (element.hasTextFilterElement()) { 51675 composeMarkdown("textFilter", element.getTextFilterElement()); 51676 } 51677 } 51678 51679 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(String name, 51680 TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException { 51681 if (element != null) { 51682 composeElementAttributes(element); 51683 xml.enter(FHIR_NS, name); 51684 composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentElements(element); 51685 composeElementClose(element); 51686 xml.exit(FHIR_NS, name); 51687 } 51688 } 51689 51690 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponentElements( 51691 TerminologyCapabilities.TerminologyCapabilitiesExpansionParameterComponent element) throws IOException { 51692 composeBackboneElementElements(element); 51693 if (element.hasNameElement()) { 51694 composeCode("name", element.getNameElement()); 51695 } 51696 if (element.hasDocumentationElement()) { 51697 composeString("documentation", element.getDocumentationElement()); 51698 } 51699 } 51700 51701 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(String name, 51702 TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException { 51703 if (element != null) { 51704 composeElementAttributes(element); 51705 xml.enter(FHIR_NS, name); 51706 composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentElements(element); 51707 composeElementClose(element); 51708 xml.exit(FHIR_NS, name); 51709 } 51710 } 51711 51712 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponentElements( 51713 TerminologyCapabilities.TerminologyCapabilitiesValidateCodeComponent element) throws IOException { 51714 composeBackboneElementElements(element); 51715 if (element.hasTranslationsElement()) { 51716 composeBoolean("translations", element.getTranslationsElement()); 51717 } 51718 } 51719 51720 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(String name, 51721 TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException { 51722 if (element != null) { 51723 composeElementAttributes(element); 51724 xml.enter(FHIR_NS, name); 51725 composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentElements(element); 51726 composeElementClose(element); 51727 xml.exit(FHIR_NS, name); 51728 } 51729 } 51730 51731 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponentElements( 51732 TerminologyCapabilities.TerminologyCapabilitiesTranslationComponent element) throws IOException { 51733 composeBackboneElementElements(element); 51734 if (element.hasNeedsMapElement()) { 51735 composeBoolean("needsMap", element.getNeedsMapElement()); 51736 } 51737 } 51738 51739 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(String name, 51740 TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException { 51741 if (element != null) { 51742 composeElementAttributes(element); 51743 xml.enter(FHIR_NS, name); 51744 composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentElements(element); 51745 composeElementClose(element); 51746 xml.exit(FHIR_NS, name); 51747 } 51748 } 51749 51750 protected void composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponentElements( 51751 TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element) throws IOException { 51752 composeBackboneElementElements(element); 51753 if (element.hasTranslationElement()) { 51754 composeBoolean("translation", element.getTranslationElement()); 51755 } 51756 } 51757 51758 protected void composeTestReport(String name, TestReport element) throws IOException { 51759 if (element != null) { 51760 composeDomainResourceAttributes(element); 51761 xml.enter(FHIR_NS, name); 51762 composeTestReportElements(element); 51763 composeElementClose(element); 51764 xml.exit(FHIR_NS, name); 51765 } 51766 } 51767 51768 protected void composeTestReportElements(TestReport element) throws IOException { 51769 composeDomainResourceElements(element); 51770 if (element.hasIdentifier()) { 51771 composeIdentifier("identifier", element.getIdentifier()); 51772 } 51773 if (element.hasNameElement()) { 51774 composeString("name", element.getNameElement()); 51775 } 51776 if (element.hasStatusElement()) 51777 composeEnumeration("status", element.getStatusElement(), new TestReport.TestReportStatusEnumFactory()); 51778 if (element.hasTestScript()) { 51779 composeReference("testScript", element.getTestScript()); 51780 } 51781 if (element.hasResultElement()) 51782 composeEnumeration("result", element.getResultElement(), new TestReport.TestReportResultEnumFactory()); 51783 if (element.hasScoreElement()) { 51784 composeDecimal("score", element.getScoreElement()); 51785 } 51786 if (element.hasTesterElement()) { 51787 composeString("tester", element.getTesterElement()); 51788 } 51789 if (element.hasIssuedElement()) { 51790 composeDateTime("issued", element.getIssuedElement()); 51791 } 51792 if (element.hasParticipant()) { 51793 for (TestReport.TestReportParticipantComponent e : element.getParticipant()) 51794 composeTestReportTestReportParticipantComponent("participant", e); 51795 } 51796 if (element.hasSetup()) { 51797 composeTestReportTestReportSetupComponent("setup", element.getSetup()); 51798 } 51799 if (element.hasTest()) { 51800 for (TestReport.TestReportTestComponent e : element.getTest()) 51801 composeTestReportTestReportTestComponent("test", e); 51802 } 51803 if (element.hasTeardown()) { 51804 composeTestReportTestReportTeardownComponent("teardown", element.getTeardown()); 51805 } 51806 } 51807 51808 protected void composeTestReportTestReportParticipantComponent(String name, 51809 TestReport.TestReportParticipantComponent element) throws IOException { 51810 if (element != null) { 51811 composeElementAttributes(element); 51812 xml.enter(FHIR_NS, name); 51813 composeTestReportTestReportParticipantComponentElements(element); 51814 composeElementClose(element); 51815 xml.exit(FHIR_NS, name); 51816 } 51817 } 51818 51819 protected void composeTestReportTestReportParticipantComponentElements( 51820 TestReport.TestReportParticipantComponent element) throws IOException { 51821 composeBackboneElementElements(element); 51822 if (element.hasTypeElement()) 51823 composeEnumeration("type", element.getTypeElement(), new TestReport.TestReportParticipantTypeEnumFactory()); 51824 if (element.hasUriElement()) { 51825 composeUri("uri", element.getUriElement()); 51826 } 51827 if (element.hasDisplayElement()) { 51828 composeString("display", element.getDisplayElement()); 51829 } 51830 } 51831 51832 protected void composeTestReportTestReportSetupComponent(String name, TestReport.TestReportSetupComponent element) 51833 throws IOException { 51834 if (element != null) { 51835 composeElementAttributes(element); 51836 xml.enter(FHIR_NS, name); 51837 composeTestReportTestReportSetupComponentElements(element); 51838 composeElementClose(element); 51839 xml.exit(FHIR_NS, name); 51840 } 51841 } 51842 51843 protected void composeTestReportTestReportSetupComponentElements(TestReport.TestReportSetupComponent element) 51844 throws IOException { 51845 composeBackboneElementElements(element); 51846 if (element.hasAction()) { 51847 for (TestReport.SetupActionComponent e : element.getAction()) 51848 composeTestReportSetupActionComponent("action", e); 51849 } 51850 } 51851 51852 protected void composeTestReportSetupActionComponent(String name, TestReport.SetupActionComponent element) 51853 throws IOException { 51854 if (element != null) { 51855 composeElementAttributes(element); 51856 xml.enter(FHIR_NS, name); 51857 composeTestReportSetupActionComponentElements(element); 51858 composeElementClose(element); 51859 xml.exit(FHIR_NS, name); 51860 } 51861 } 51862 51863 protected void composeTestReportSetupActionComponentElements(TestReport.SetupActionComponent element) 51864 throws IOException { 51865 composeBackboneElementElements(element); 51866 if (element.hasOperation()) { 51867 composeTestReportSetupActionOperationComponent("operation", element.getOperation()); 51868 } 51869 if (element.hasAssert()) { 51870 composeTestReportSetupActionAssertComponent("assert", element.getAssert()); 51871 } 51872 } 51873 51874 protected void composeTestReportSetupActionOperationComponent(String name, 51875 TestReport.SetupActionOperationComponent element) throws IOException { 51876 if (element != null) { 51877 composeElementAttributes(element); 51878 xml.enter(FHIR_NS, name); 51879 composeTestReportSetupActionOperationComponentElements(element); 51880 composeElementClose(element); 51881 xml.exit(FHIR_NS, name); 51882 } 51883 } 51884 51885 protected void composeTestReportSetupActionOperationComponentElements( 51886 TestReport.SetupActionOperationComponent element) throws IOException { 51887 composeBackboneElementElements(element); 51888 if (element.hasResultElement()) 51889 composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); 51890 if (element.hasMessageElement()) { 51891 composeMarkdown("message", element.getMessageElement()); 51892 } 51893 if (element.hasDetailElement()) { 51894 composeUri("detail", element.getDetailElement()); 51895 } 51896 } 51897 51898 protected void composeTestReportSetupActionAssertComponent(String name, TestReport.SetupActionAssertComponent element) 51899 throws IOException { 51900 if (element != null) { 51901 composeElementAttributes(element); 51902 xml.enter(FHIR_NS, name); 51903 composeTestReportSetupActionAssertComponentElements(element); 51904 composeElementClose(element); 51905 xml.exit(FHIR_NS, name); 51906 } 51907 } 51908 51909 protected void composeTestReportSetupActionAssertComponentElements(TestReport.SetupActionAssertComponent element) 51910 throws IOException { 51911 composeBackboneElementElements(element); 51912 if (element.hasResultElement()) 51913 composeEnumeration("result", element.getResultElement(), new TestReport.TestReportActionResultEnumFactory()); 51914 if (element.hasMessageElement()) { 51915 composeMarkdown("message", element.getMessageElement()); 51916 } 51917 if (element.hasDetailElement()) { 51918 composeString("detail", element.getDetailElement()); 51919 } 51920 } 51921 51922 protected void composeTestReportTestReportTestComponent(String name, TestReport.TestReportTestComponent element) 51923 throws IOException { 51924 if (element != null) { 51925 composeElementAttributes(element); 51926 xml.enter(FHIR_NS, name); 51927 composeTestReportTestReportTestComponentElements(element); 51928 composeElementClose(element); 51929 xml.exit(FHIR_NS, name); 51930 } 51931 } 51932 51933 protected void composeTestReportTestReportTestComponentElements(TestReport.TestReportTestComponent element) 51934 throws IOException { 51935 composeBackboneElementElements(element); 51936 if (element.hasNameElement()) { 51937 composeString("name", element.getNameElement()); 51938 } 51939 if (element.hasDescriptionElement()) { 51940 composeString("description", element.getDescriptionElement()); 51941 } 51942 if (element.hasAction()) { 51943 for (TestReport.TestActionComponent e : element.getAction()) 51944 composeTestReportTestActionComponent("action", e); 51945 } 51946 } 51947 51948 protected void composeTestReportTestActionComponent(String name, TestReport.TestActionComponent element) 51949 throws IOException { 51950 if (element != null) { 51951 composeElementAttributes(element); 51952 xml.enter(FHIR_NS, name); 51953 composeTestReportTestActionComponentElements(element); 51954 composeElementClose(element); 51955 xml.exit(FHIR_NS, name); 51956 } 51957 } 51958 51959 protected void composeTestReportTestActionComponentElements(TestReport.TestActionComponent element) 51960 throws IOException { 51961 composeBackboneElementElements(element); 51962 if (element.hasOperation()) { 51963 composeTestReportSetupActionOperationComponent("operation", element.getOperation()); 51964 } 51965 if (element.hasAssert()) { 51966 composeTestReportSetupActionAssertComponent("assert", element.getAssert()); 51967 } 51968 } 51969 51970 protected void composeTestReportTestReportTeardownComponent(String name, 51971 TestReport.TestReportTeardownComponent element) throws IOException { 51972 if (element != null) { 51973 composeElementAttributes(element); 51974 xml.enter(FHIR_NS, name); 51975 composeTestReportTestReportTeardownComponentElements(element); 51976 composeElementClose(element); 51977 xml.exit(FHIR_NS, name); 51978 } 51979 } 51980 51981 protected void composeTestReportTestReportTeardownComponentElements(TestReport.TestReportTeardownComponent element) 51982 throws IOException { 51983 composeBackboneElementElements(element); 51984 if (element.hasAction()) { 51985 for (TestReport.TeardownActionComponent e : element.getAction()) 51986 composeTestReportTeardownActionComponent("action", e); 51987 } 51988 } 51989 51990 protected void composeTestReportTeardownActionComponent(String name, TestReport.TeardownActionComponent element) 51991 throws IOException { 51992 if (element != null) { 51993 composeElementAttributes(element); 51994 xml.enter(FHIR_NS, name); 51995 composeTestReportTeardownActionComponentElements(element); 51996 composeElementClose(element); 51997 xml.exit(FHIR_NS, name); 51998 } 51999 } 52000 52001 protected void composeTestReportTeardownActionComponentElements(TestReport.TeardownActionComponent element) 52002 throws IOException { 52003 composeBackboneElementElements(element); 52004 if (element.hasOperation()) { 52005 composeTestReportSetupActionOperationComponent("operation", element.getOperation()); 52006 } 52007 } 52008 52009 protected void composeTestScript(String name, TestScript element) throws IOException { 52010 if (element != null) { 52011 composeDomainResourceAttributes(element); 52012 xml.enter(FHIR_NS, name); 52013 composeTestScriptElements(element); 52014 composeElementClose(element); 52015 xml.exit(FHIR_NS, name); 52016 } 52017 } 52018 52019 protected void composeTestScriptElements(TestScript element) throws IOException { 52020 composeDomainResourceElements(element); 52021 if (element.hasUrlElement()) { 52022 composeUri("url", element.getUrlElement()); 52023 } 52024 if (element.hasIdentifier()) { 52025 composeIdentifier("identifier", element.getIdentifier()); 52026 } 52027 if (element.hasVersionElement()) { 52028 composeString("version", element.getVersionElement()); 52029 } 52030 if (element.hasNameElement()) { 52031 composeString("name", element.getNameElement()); 52032 } 52033 if (element.hasTitleElement()) { 52034 composeString("title", element.getTitleElement()); 52035 } 52036 if (element.hasStatusElement()) 52037 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 52038 if (element.hasExperimentalElement()) { 52039 composeBoolean("experimental", element.getExperimentalElement()); 52040 } 52041 if (element.hasDateElement()) { 52042 composeDateTime("date", element.getDateElement()); 52043 } 52044 if (element.hasPublisherElement()) { 52045 composeString("publisher", element.getPublisherElement()); 52046 } 52047 if (element.hasContact()) { 52048 for (ContactDetail e : element.getContact()) 52049 composeContactDetail("contact", e); 52050 } 52051 if (element.hasDescriptionElement()) { 52052 composeMarkdown("description", element.getDescriptionElement()); 52053 } 52054 if (element.hasUseContext()) { 52055 for (UsageContext e : element.getUseContext()) 52056 composeUsageContext("useContext", e); 52057 } 52058 if (element.hasJurisdiction()) { 52059 for (CodeableConcept e : element.getJurisdiction()) 52060 composeCodeableConcept("jurisdiction", e); 52061 } 52062 if (element.hasPurposeElement()) { 52063 composeMarkdown("purpose", element.getPurposeElement()); 52064 } 52065 if (element.hasCopyrightElement()) { 52066 composeMarkdown("copyright", element.getCopyrightElement()); 52067 } 52068 if (element.hasOrigin()) { 52069 for (TestScript.TestScriptOriginComponent e : element.getOrigin()) 52070 composeTestScriptTestScriptOriginComponent("origin", e); 52071 } 52072 if (element.hasDestination()) { 52073 for (TestScript.TestScriptDestinationComponent e : element.getDestination()) 52074 composeTestScriptTestScriptDestinationComponent("destination", e); 52075 } 52076 if (element.hasMetadata()) { 52077 composeTestScriptTestScriptMetadataComponent("metadata", element.getMetadata()); 52078 } 52079 if (element.hasFixture()) { 52080 for (TestScript.TestScriptFixtureComponent e : element.getFixture()) 52081 composeTestScriptTestScriptFixtureComponent("fixture", e); 52082 } 52083 if (element.hasProfile()) { 52084 for (Reference e : element.getProfile()) 52085 composeReference("profile", e); 52086 } 52087 if (element.hasVariable()) { 52088 for (TestScript.TestScriptVariableComponent e : element.getVariable()) 52089 composeTestScriptTestScriptVariableComponent("variable", e); 52090 } 52091 if (element.hasSetup()) { 52092 composeTestScriptTestScriptSetupComponent("setup", element.getSetup()); 52093 } 52094 if (element.hasTest()) { 52095 for (TestScript.TestScriptTestComponent e : element.getTest()) 52096 composeTestScriptTestScriptTestComponent("test", e); 52097 } 52098 if (element.hasTeardown()) { 52099 composeTestScriptTestScriptTeardownComponent("teardown", element.getTeardown()); 52100 } 52101 } 52102 52103 protected void composeTestScriptTestScriptOriginComponent(String name, TestScript.TestScriptOriginComponent element) 52104 throws IOException { 52105 if (element != null) { 52106 composeElementAttributes(element); 52107 xml.enter(FHIR_NS, name); 52108 composeTestScriptTestScriptOriginComponentElements(element); 52109 composeElementClose(element); 52110 xml.exit(FHIR_NS, name); 52111 } 52112 } 52113 52114 protected void composeTestScriptTestScriptOriginComponentElements(TestScript.TestScriptOriginComponent element) 52115 throws IOException { 52116 composeBackboneElementElements(element); 52117 if (element.hasIndexElement()) { 52118 composeInteger("index", element.getIndexElement()); 52119 } 52120 if (element.hasProfile()) { 52121 composeCoding("profile", element.getProfile()); 52122 } 52123 } 52124 52125 protected void composeTestScriptTestScriptDestinationComponent(String name, 52126 TestScript.TestScriptDestinationComponent element) throws IOException { 52127 if (element != null) { 52128 composeElementAttributes(element); 52129 xml.enter(FHIR_NS, name); 52130 composeTestScriptTestScriptDestinationComponentElements(element); 52131 composeElementClose(element); 52132 xml.exit(FHIR_NS, name); 52133 } 52134 } 52135 52136 protected void composeTestScriptTestScriptDestinationComponentElements( 52137 TestScript.TestScriptDestinationComponent element) throws IOException { 52138 composeBackboneElementElements(element); 52139 if (element.hasIndexElement()) { 52140 composeInteger("index", element.getIndexElement()); 52141 } 52142 if (element.hasProfile()) { 52143 composeCoding("profile", element.getProfile()); 52144 } 52145 } 52146 52147 protected void composeTestScriptTestScriptMetadataComponent(String name, 52148 TestScript.TestScriptMetadataComponent element) throws IOException { 52149 if (element != null) { 52150 composeElementAttributes(element); 52151 xml.enter(FHIR_NS, name); 52152 composeTestScriptTestScriptMetadataComponentElements(element); 52153 composeElementClose(element); 52154 xml.exit(FHIR_NS, name); 52155 } 52156 } 52157 52158 protected void composeTestScriptTestScriptMetadataComponentElements(TestScript.TestScriptMetadataComponent element) 52159 throws IOException { 52160 composeBackboneElementElements(element); 52161 if (element.hasLink()) { 52162 for (TestScript.TestScriptMetadataLinkComponent e : element.getLink()) 52163 composeTestScriptTestScriptMetadataLinkComponent("link", e); 52164 } 52165 if (element.hasCapability()) { 52166 for (TestScript.TestScriptMetadataCapabilityComponent e : element.getCapability()) 52167 composeTestScriptTestScriptMetadataCapabilityComponent("capability", e); 52168 } 52169 } 52170 52171 protected void composeTestScriptTestScriptMetadataLinkComponent(String name, 52172 TestScript.TestScriptMetadataLinkComponent element) throws IOException { 52173 if (element != null) { 52174 composeElementAttributes(element); 52175 xml.enter(FHIR_NS, name); 52176 composeTestScriptTestScriptMetadataLinkComponentElements(element); 52177 composeElementClose(element); 52178 xml.exit(FHIR_NS, name); 52179 } 52180 } 52181 52182 protected void composeTestScriptTestScriptMetadataLinkComponentElements( 52183 TestScript.TestScriptMetadataLinkComponent element) throws IOException { 52184 composeBackboneElementElements(element); 52185 if (element.hasUrlElement()) { 52186 composeUri("url", element.getUrlElement()); 52187 } 52188 if (element.hasDescriptionElement()) { 52189 composeString("description", element.getDescriptionElement()); 52190 } 52191 } 52192 52193 protected void composeTestScriptTestScriptMetadataCapabilityComponent(String name, 52194 TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { 52195 if (element != null) { 52196 composeElementAttributes(element); 52197 xml.enter(FHIR_NS, name); 52198 composeTestScriptTestScriptMetadataCapabilityComponentElements(element); 52199 composeElementClose(element); 52200 xml.exit(FHIR_NS, name); 52201 } 52202 } 52203 52204 protected void composeTestScriptTestScriptMetadataCapabilityComponentElements( 52205 TestScript.TestScriptMetadataCapabilityComponent element) throws IOException { 52206 composeBackboneElementElements(element); 52207 if (element.hasRequiredElement()) { 52208 composeBoolean("required", element.getRequiredElement()); 52209 } 52210 if (element.hasValidatedElement()) { 52211 composeBoolean("validated", element.getValidatedElement()); 52212 } 52213 if (element.hasDescriptionElement()) { 52214 composeString("description", element.getDescriptionElement()); 52215 } 52216 if (element.hasOrigin()) { 52217 for (IntegerType e : element.getOrigin()) 52218 composeInteger("origin", e); 52219 } 52220 if (element.hasDestinationElement()) { 52221 composeInteger("destination", element.getDestinationElement()); 52222 } 52223 if (element.hasLink()) { 52224 for (UriType e : element.getLink()) 52225 composeUri("link", e); 52226 } 52227 if (element.hasCapabilitiesElement()) { 52228 composeCanonical("capabilities", element.getCapabilitiesElement()); 52229 } 52230 } 52231 52232 protected void composeTestScriptTestScriptFixtureComponent(String name, TestScript.TestScriptFixtureComponent element) 52233 throws IOException { 52234 if (element != null) { 52235 composeElementAttributes(element); 52236 xml.enter(FHIR_NS, name); 52237 composeTestScriptTestScriptFixtureComponentElements(element); 52238 composeElementClose(element); 52239 xml.exit(FHIR_NS, name); 52240 } 52241 } 52242 52243 protected void composeTestScriptTestScriptFixtureComponentElements(TestScript.TestScriptFixtureComponent element) 52244 throws IOException { 52245 composeBackboneElementElements(element); 52246 if (element.hasAutocreateElement()) { 52247 composeBoolean("autocreate", element.getAutocreateElement()); 52248 } 52249 if (element.hasAutodeleteElement()) { 52250 composeBoolean("autodelete", element.getAutodeleteElement()); 52251 } 52252 if (element.hasResource()) { 52253 composeReference("resource", element.getResource()); 52254 } 52255 } 52256 52257 protected void composeTestScriptTestScriptVariableComponent(String name, 52258 TestScript.TestScriptVariableComponent element) throws IOException { 52259 if (element != null) { 52260 composeElementAttributes(element); 52261 xml.enter(FHIR_NS, name); 52262 composeTestScriptTestScriptVariableComponentElements(element); 52263 composeElementClose(element); 52264 xml.exit(FHIR_NS, name); 52265 } 52266 } 52267 52268 protected void composeTestScriptTestScriptVariableComponentElements(TestScript.TestScriptVariableComponent element) 52269 throws IOException { 52270 composeBackboneElementElements(element); 52271 if (element.hasNameElement()) { 52272 composeString("name", element.getNameElement()); 52273 } 52274 if (element.hasDefaultValueElement()) { 52275 composeString("defaultValue", element.getDefaultValueElement()); 52276 } 52277 if (element.hasDescriptionElement()) { 52278 composeString("description", element.getDescriptionElement()); 52279 } 52280 if (element.hasExpressionElement()) { 52281 composeString("expression", element.getExpressionElement()); 52282 } 52283 if (element.hasHeaderFieldElement()) { 52284 composeString("headerField", element.getHeaderFieldElement()); 52285 } 52286 if (element.hasHintElement()) { 52287 composeString("hint", element.getHintElement()); 52288 } 52289 if (element.hasPathElement()) { 52290 composeString("path", element.getPathElement()); 52291 } 52292 if (element.hasSourceIdElement()) { 52293 composeId("sourceId", element.getSourceIdElement()); 52294 } 52295 } 52296 52297 protected void composeTestScriptTestScriptSetupComponent(String name, TestScript.TestScriptSetupComponent element) 52298 throws IOException { 52299 if (element != null) { 52300 composeElementAttributes(element); 52301 xml.enter(FHIR_NS, name); 52302 composeTestScriptTestScriptSetupComponentElements(element); 52303 composeElementClose(element); 52304 xml.exit(FHIR_NS, name); 52305 } 52306 } 52307 52308 protected void composeTestScriptTestScriptSetupComponentElements(TestScript.TestScriptSetupComponent element) 52309 throws IOException { 52310 composeBackboneElementElements(element); 52311 if (element.hasAction()) { 52312 for (TestScript.SetupActionComponent e : element.getAction()) 52313 composeTestScriptSetupActionComponent("action", e); 52314 } 52315 } 52316 52317 protected void composeTestScriptSetupActionComponent(String name, TestScript.SetupActionComponent element) 52318 throws IOException { 52319 if (element != null) { 52320 composeElementAttributes(element); 52321 xml.enter(FHIR_NS, name); 52322 composeTestScriptSetupActionComponentElements(element); 52323 composeElementClose(element); 52324 xml.exit(FHIR_NS, name); 52325 } 52326 } 52327 52328 protected void composeTestScriptSetupActionComponentElements(TestScript.SetupActionComponent element) 52329 throws IOException { 52330 composeBackboneElementElements(element); 52331 if (element.hasOperation()) { 52332 composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); 52333 } 52334 if (element.hasAssert()) { 52335 composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); 52336 } 52337 } 52338 52339 protected void composeTestScriptSetupActionOperationComponent(String name, 52340 TestScript.SetupActionOperationComponent element) throws IOException { 52341 if (element != null) { 52342 composeElementAttributes(element); 52343 xml.enter(FHIR_NS, name); 52344 composeTestScriptSetupActionOperationComponentElements(element); 52345 composeElementClose(element); 52346 xml.exit(FHIR_NS, name); 52347 } 52348 } 52349 52350 protected void composeTestScriptSetupActionOperationComponentElements( 52351 TestScript.SetupActionOperationComponent element) throws IOException { 52352 composeBackboneElementElements(element); 52353 if (element.hasType()) { 52354 composeCoding("type", element.getType()); 52355 } 52356 if (element.hasResourceElement()) { 52357 composeCode("resource", element.getResourceElement()); 52358 } 52359 if (element.hasLabelElement()) { 52360 composeString("label", element.getLabelElement()); 52361 } 52362 if (element.hasDescriptionElement()) { 52363 composeString("description", element.getDescriptionElement()); 52364 } 52365 if (element.hasAcceptElement()) { 52366 composeCode("accept", element.getAcceptElement()); 52367 } 52368 if (element.hasContentTypeElement()) { 52369 composeCode("contentType", element.getContentTypeElement()); 52370 } 52371 if (element.hasDestinationElement()) { 52372 composeInteger("destination", element.getDestinationElement()); 52373 } 52374 if (element.hasEncodeRequestUrlElement()) { 52375 composeBoolean("encodeRequestUrl", element.getEncodeRequestUrlElement()); 52376 } 52377 if (element.hasMethodElement()) 52378 composeEnumeration("method", element.getMethodElement(), new TestScript.TestScriptRequestMethodCodeEnumFactory()); 52379 if (element.hasOriginElement()) { 52380 composeInteger("origin", element.getOriginElement()); 52381 } 52382 if (element.hasParamsElement()) { 52383 composeString("params", element.getParamsElement()); 52384 } 52385 if (element.hasRequestHeader()) { 52386 for (TestScript.SetupActionOperationRequestHeaderComponent e : element.getRequestHeader()) 52387 composeTestScriptSetupActionOperationRequestHeaderComponent("requestHeader", e); 52388 } 52389 if (element.hasRequestIdElement()) { 52390 composeId("requestId", element.getRequestIdElement()); 52391 } 52392 if (element.hasResponseIdElement()) { 52393 composeId("responseId", element.getResponseIdElement()); 52394 } 52395 if (element.hasSourceIdElement()) { 52396 composeId("sourceId", element.getSourceIdElement()); 52397 } 52398 if (element.hasTargetIdElement()) { 52399 composeId("targetId", element.getTargetIdElement()); 52400 } 52401 if (element.hasUrlElement()) { 52402 composeString("url", element.getUrlElement()); 52403 } 52404 } 52405 52406 protected void composeTestScriptSetupActionOperationRequestHeaderComponent(String name, 52407 TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { 52408 if (element != null) { 52409 composeElementAttributes(element); 52410 xml.enter(FHIR_NS, name); 52411 composeTestScriptSetupActionOperationRequestHeaderComponentElements(element); 52412 composeElementClose(element); 52413 xml.exit(FHIR_NS, name); 52414 } 52415 } 52416 52417 protected void composeTestScriptSetupActionOperationRequestHeaderComponentElements( 52418 TestScript.SetupActionOperationRequestHeaderComponent element) throws IOException { 52419 composeBackboneElementElements(element); 52420 if (element.hasFieldElement()) { 52421 composeString("field", element.getFieldElement()); 52422 } 52423 if (element.hasValueElement()) { 52424 composeString("value", element.getValueElement()); 52425 } 52426 } 52427 52428 protected void composeTestScriptSetupActionAssertComponent(String name, TestScript.SetupActionAssertComponent element) 52429 throws IOException { 52430 if (element != null) { 52431 composeElementAttributes(element); 52432 xml.enter(FHIR_NS, name); 52433 composeTestScriptSetupActionAssertComponentElements(element); 52434 composeElementClose(element); 52435 xml.exit(FHIR_NS, name); 52436 } 52437 } 52438 52439 protected void composeTestScriptSetupActionAssertComponentElements(TestScript.SetupActionAssertComponent element) 52440 throws IOException { 52441 composeBackboneElementElements(element); 52442 if (element.hasLabelElement()) { 52443 composeString("label", element.getLabelElement()); 52444 } 52445 if (element.hasDescriptionElement()) { 52446 composeString("description", element.getDescriptionElement()); 52447 } 52448 if (element.hasDirectionElement()) 52449 composeEnumeration("direction", element.getDirectionElement(), 52450 new TestScript.AssertionDirectionTypeEnumFactory()); 52451 if (element.hasCompareToSourceIdElement()) { 52452 composeString("compareToSourceId", element.getCompareToSourceIdElement()); 52453 } 52454 if (element.hasCompareToSourceExpressionElement()) { 52455 composeString("compareToSourceExpression", element.getCompareToSourceExpressionElement()); 52456 } 52457 if (element.hasCompareToSourcePathElement()) { 52458 composeString("compareToSourcePath", element.getCompareToSourcePathElement()); 52459 } 52460 if (element.hasContentTypeElement()) { 52461 composeCode("contentType", element.getContentTypeElement()); 52462 } 52463 if (element.hasExpressionElement()) { 52464 composeString("expression", element.getExpressionElement()); 52465 } 52466 if (element.hasHeaderFieldElement()) { 52467 composeString("headerField", element.getHeaderFieldElement()); 52468 } 52469 if (element.hasMinimumIdElement()) { 52470 composeString("minimumId", element.getMinimumIdElement()); 52471 } 52472 if (element.hasNavigationLinksElement()) { 52473 composeBoolean("navigationLinks", element.getNavigationLinksElement()); 52474 } 52475 if (element.hasOperatorElement()) 52476 composeEnumeration("operator", element.getOperatorElement(), new TestScript.AssertionOperatorTypeEnumFactory()); 52477 if (element.hasPathElement()) { 52478 composeString("path", element.getPathElement()); 52479 } 52480 if (element.hasRequestMethodElement()) 52481 composeEnumeration("requestMethod", element.getRequestMethodElement(), 52482 new TestScript.TestScriptRequestMethodCodeEnumFactory()); 52483 if (element.hasRequestURLElement()) { 52484 composeString("requestURL", element.getRequestURLElement()); 52485 } 52486 if (element.hasResourceElement()) { 52487 composeCode("resource", element.getResourceElement()); 52488 } 52489 if (element.hasResponseElement()) 52490 composeEnumeration("response", element.getResponseElement(), new TestScript.AssertionResponseTypesEnumFactory()); 52491 if (element.hasResponseCodeElement()) { 52492 composeString("responseCode", element.getResponseCodeElement()); 52493 } 52494 if (element.hasSourceIdElement()) { 52495 composeId("sourceId", element.getSourceIdElement()); 52496 } 52497 if (element.hasValidateProfileIdElement()) { 52498 composeId("validateProfileId", element.getValidateProfileIdElement()); 52499 } 52500 if (element.hasValueElement()) { 52501 composeString("value", element.getValueElement()); 52502 } 52503 if (element.hasWarningOnlyElement()) { 52504 composeBoolean("warningOnly", element.getWarningOnlyElement()); 52505 } 52506 } 52507 52508 protected void composeTestScriptTestScriptTestComponent(String name, TestScript.TestScriptTestComponent element) 52509 throws IOException { 52510 if (element != null) { 52511 composeElementAttributes(element); 52512 xml.enter(FHIR_NS, name); 52513 composeTestScriptTestScriptTestComponentElements(element); 52514 composeElementClose(element); 52515 xml.exit(FHIR_NS, name); 52516 } 52517 } 52518 52519 protected void composeTestScriptTestScriptTestComponentElements(TestScript.TestScriptTestComponent element) 52520 throws IOException { 52521 composeBackboneElementElements(element); 52522 if (element.hasNameElement()) { 52523 composeString("name", element.getNameElement()); 52524 } 52525 if (element.hasDescriptionElement()) { 52526 composeString("description", element.getDescriptionElement()); 52527 } 52528 if (element.hasAction()) { 52529 for (TestScript.TestActionComponent e : element.getAction()) 52530 composeTestScriptTestActionComponent("action", e); 52531 } 52532 } 52533 52534 protected void composeTestScriptTestActionComponent(String name, TestScript.TestActionComponent element) 52535 throws IOException { 52536 if (element != null) { 52537 composeElementAttributes(element); 52538 xml.enter(FHIR_NS, name); 52539 composeTestScriptTestActionComponentElements(element); 52540 composeElementClose(element); 52541 xml.exit(FHIR_NS, name); 52542 } 52543 } 52544 52545 protected void composeTestScriptTestActionComponentElements(TestScript.TestActionComponent element) 52546 throws IOException { 52547 composeBackboneElementElements(element); 52548 if (element.hasOperation()) { 52549 composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); 52550 } 52551 if (element.hasAssert()) { 52552 composeTestScriptSetupActionAssertComponent("assert", element.getAssert()); 52553 } 52554 } 52555 52556 protected void composeTestScriptTestScriptTeardownComponent(String name, 52557 TestScript.TestScriptTeardownComponent element) throws IOException { 52558 if (element != null) { 52559 composeElementAttributes(element); 52560 xml.enter(FHIR_NS, name); 52561 composeTestScriptTestScriptTeardownComponentElements(element); 52562 composeElementClose(element); 52563 xml.exit(FHIR_NS, name); 52564 } 52565 } 52566 52567 protected void composeTestScriptTestScriptTeardownComponentElements(TestScript.TestScriptTeardownComponent element) 52568 throws IOException { 52569 composeBackboneElementElements(element); 52570 if (element.hasAction()) { 52571 for (TestScript.TeardownActionComponent e : element.getAction()) 52572 composeTestScriptTeardownActionComponent("action", e); 52573 } 52574 } 52575 52576 protected void composeTestScriptTeardownActionComponent(String name, TestScript.TeardownActionComponent element) 52577 throws IOException { 52578 if (element != null) { 52579 composeElementAttributes(element); 52580 xml.enter(FHIR_NS, name); 52581 composeTestScriptTeardownActionComponentElements(element); 52582 composeElementClose(element); 52583 xml.exit(FHIR_NS, name); 52584 } 52585 } 52586 52587 protected void composeTestScriptTeardownActionComponentElements(TestScript.TeardownActionComponent element) 52588 throws IOException { 52589 composeBackboneElementElements(element); 52590 if (element.hasOperation()) { 52591 composeTestScriptSetupActionOperationComponent("operation", element.getOperation()); 52592 } 52593 } 52594 52595 protected void composeValueSet(String name, ValueSet element) throws IOException { 52596 if (element != null) { 52597 composeDomainResourceAttributes(element); 52598 xml.enter(FHIR_NS, name); 52599 composeValueSetElements(element); 52600 composeElementClose(element); 52601 xml.exit(FHIR_NS, name); 52602 } 52603 } 52604 52605 protected void composeValueSetElements(ValueSet element) throws IOException { 52606 composeDomainResourceElements(element); 52607 if (element.hasUrlElement()) { 52608 composeUri("url", element.getUrlElement()); 52609 } 52610 if (element.hasIdentifier()) { 52611 for (Identifier e : element.getIdentifier()) 52612 composeIdentifier("identifier", e); 52613 } 52614 if (element.hasVersionElement()) { 52615 composeString("version", element.getVersionElement()); 52616 } 52617 if (element.hasNameElement()) { 52618 composeString("name", element.getNameElement()); 52619 } 52620 if (element.hasTitleElement()) { 52621 composeString("title", element.getTitleElement()); 52622 } 52623 if (element.hasStatusElement()) 52624 composeEnumeration("status", element.getStatusElement(), new Enumerations.PublicationStatusEnumFactory()); 52625 if (element.hasExperimentalElement()) { 52626 composeBoolean("experimental", element.getExperimentalElement()); 52627 } 52628 if (element.hasDateElement()) { 52629 composeDateTime("date", element.getDateElement()); 52630 } 52631 if (element.hasPublisherElement()) { 52632 composeString("publisher", element.getPublisherElement()); 52633 } 52634 if (element.hasContact()) { 52635 for (ContactDetail e : element.getContact()) 52636 composeContactDetail("contact", e); 52637 } 52638 if (element.hasDescriptionElement()) { 52639 composeMarkdown("description", element.getDescriptionElement()); 52640 } 52641 if (element.hasUseContext()) { 52642 for (UsageContext e : element.getUseContext()) 52643 composeUsageContext("useContext", e); 52644 } 52645 if (element.hasJurisdiction()) { 52646 for (CodeableConcept e : element.getJurisdiction()) 52647 composeCodeableConcept("jurisdiction", e); 52648 } 52649 if (element.hasImmutableElement()) { 52650 composeBoolean("immutable", element.getImmutableElement()); 52651 } 52652 if (element.hasPurposeElement()) { 52653 composeMarkdown("purpose", element.getPurposeElement()); 52654 } 52655 if (element.hasCopyrightElement()) { 52656 composeMarkdown("copyright", element.getCopyrightElement()); 52657 } 52658 if (element.hasCompose()) { 52659 composeValueSetValueSetComposeComponent("compose", element.getCompose()); 52660 } 52661 if (element.hasExpansion()) { 52662 composeValueSetValueSetExpansionComponent("expansion", element.getExpansion()); 52663 } 52664 } 52665 52666 protected void composeValueSetValueSetComposeComponent(String name, ValueSet.ValueSetComposeComponent element) 52667 throws IOException { 52668 if (element != null) { 52669 composeElementAttributes(element); 52670 xml.enter(FHIR_NS, name); 52671 composeValueSetValueSetComposeComponentElements(element); 52672 composeElementClose(element); 52673 xml.exit(FHIR_NS, name); 52674 } 52675 } 52676 52677 protected void composeValueSetValueSetComposeComponentElements(ValueSet.ValueSetComposeComponent element) 52678 throws IOException { 52679 composeBackboneElementElements(element); 52680 if (element.hasLockedDateElement()) { 52681 composeDate("lockedDate", element.getLockedDateElement()); 52682 } 52683 if (element.hasInactiveElement()) { 52684 composeBoolean("inactive", element.getInactiveElement()); 52685 } 52686 if (element.hasInclude()) { 52687 for (ValueSet.ConceptSetComponent e : element.getInclude()) 52688 composeValueSetConceptSetComponent("include", e); 52689 } 52690 if (element.hasExclude()) { 52691 for (ValueSet.ConceptSetComponent e : element.getExclude()) 52692 composeValueSetConceptSetComponent("exclude", e); 52693 } 52694 } 52695 52696 protected void composeValueSetConceptSetComponent(String name, ValueSet.ConceptSetComponent element) 52697 throws IOException { 52698 if (element != null) { 52699 composeElementAttributes(element); 52700 xml.enter(FHIR_NS, name); 52701 composeValueSetConceptSetComponentElements(element); 52702 composeElementClose(element); 52703 xml.exit(FHIR_NS, name); 52704 } 52705 } 52706 52707 protected void composeValueSetConceptSetComponentElements(ValueSet.ConceptSetComponent element) throws IOException { 52708 composeBackboneElementElements(element); 52709 if (element.hasSystemElement()) { 52710 composeUri("system", element.getSystemElement()); 52711 } 52712 if (element.hasVersionElement()) { 52713 composeString("version", element.getVersionElement()); 52714 } 52715 if (element.hasConcept()) { 52716 for (ValueSet.ConceptReferenceComponent e : element.getConcept()) 52717 composeValueSetConceptReferenceComponent("concept", e); 52718 } 52719 if (element.hasFilter()) { 52720 for (ValueSet.ConceptSetFilterComponent e : element.getFilter()) 52721 composeValueSetConceptSetFilterComponent("filter", e); 52722 } 52723 if (element.hasValueSet()) { 52724 for (CanonicalType e : element.getValueSet()) 52725 composeCanonical("valueSet", e); 52726 } 52727 } 52728 52729 protected void composeValueSetConceptReferenceComponent(String name, ValueSet.ConceptReferenceComponent element) 52730 throws IOException { 52731 if (element != null) { 52732 composeElementAttributes(element); 52733 xml.enter(FHIR_NS, name); 52734 composeValueSetConceptReferenceComponentElements(element); 52735 composeElementClose(element); 52736 xml.exit(FHIR_NS, name); 52737 } 52738 } 52739 52740 protected void composeValueSetConceptReferenceComponentElements(ValueSet.ConceptReferenceComponent element) 52741 throws IOException { 52742 composeBackboneElementElements(element); 52743 if (element.hasCodeElement()) { 52744 composeCode("code", element.getCodeElement()); 52745 } 52746 if (element.hasDisplayElement()) { 52747 composeString("display", element.getDisplayElement()); 52748 } 52749 if (element.hasDesignation()) { 52750 for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) 52751 composeValueSetConceptReferenceDesignationComponent("designation", e); 52752 } 52753 } 52754 52755 protected void composeValueSetConceptReferenceDesignationComponent(String name, 52756 ValueSet.ConceptReferenceDesignationComponent element) throws IOException { 52757 if (element != null) { 52758 composeElementAttributes(element); 52759 xml.enter(FHIR_NS, name); 52760 composeValueSetConceptReferenceDesignationComponentElements(element); 52761 composeElementClose(element); 52762 xml.exit(FHIR_NS, name); 52763 } 52764 } 52765 52766 protected void composeValueSetConceptReferenceDesignationComponentElements( 52767 ValueSet.ConceptReferenceDesignationComponent element) throws IOException { 52768 composeBackboneElementElements(element); 52769 if (element.hasLanguageElement()) { 52770 composeCode("language", element.getLanguageElement()); 52771 } 52772 if (element.hasUse()) { 52773 composeCoding("use", element.getUse()); 52774 } 52775 if (element.hasValueElement()) { 52776 composeString("value", element.getValueElement()); 52777 } 52778 } 52779 52780 protected void composeValueSetConceptSetFilterComponent(String name, ValueSet.ConceptSetFilterComponent element) 52781 throws IOException { 52782 if (element != null) { 52783 composeElementAttributes(element); 52784 xml.enter(FHIR_NS, name); 52785 composeValueSetConceptSetFilterComponentElements(element); 52786 composeElementClose(element); 52787 xml.exit(FHIR_NS, name); 52788 } 52789 } 52790 52791 protected void composeValueSetConceptSetFilterComponentElements(ValueSet.ConceptSetFilterComponent element) 52792 throws IOException { 52793 composeBackboneElementElements(element); 52794 if (element.hasPropertyElement()) { 52795 composeCode("property", element.getPropertyElement()); 52796 } 52797 if (element.hasOpElement()) 52798 composeEnumeration("op", element.getOpElement(), new ValueSet.FilterOperatorEnumFactory()); 52799 if (element.hasValueElement()) { 52800 composeString("value", element.getValueElement()); 52801 } 52802 } 52803 52804 protected void composeValueSetValueSetExpansionComponent(String name, ValueSet.ValueSetExpansionComponent element) 52805 throws IOException { 52806 if (element != null) { 52807 composeElementAttributes(element); 52808 xml.enter(FHIR_NS, name); 52809 composeValueSetValueSetExpansionComponentElements(element); 52810 composeElementClose(element); 52811 xml.exit(FHIR_NS, name); 52812 } 52813 } 52814 52815 protected void composeValueSetValueSetExpansionComponentElements(ValueSet.ValueSetExpansionComponent element) 52816 throws IOException { 52817 composeBackboneElementElements(element); 52818 if (element.hasIdentifierElement()) { 52819 composeUri("identifier", element.getIdentifierElement()); 52820 } 52821 if (element.hasTimestampElement()) { 52822 composeDateTime("timestamp", element.getTimestampElement()); 52823 } 52824 if (element.hasTotalElement()) { 52825 composeInteger("total", element.getTotalElement()); 52826 } 52827 if (element.hasOffsetElement()) { 52828 composeInteger("offset", element.getOffsetElement()); 52829 } 52830 if (element.hasParameter()) { 52831 for (ValueSet.ValueSetExpansionParameterComponent e : element.getParameter()) 52832 composeValueSetValueSetExpansionParameterComponent("parameter", e); 52833 } 52834 if (element.hasContains()) { 52835 for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) 52836 composeValueSetValueSetExpansionContainsComponent("contains", e); 52837 } 52838 } 52839 52840 protected void composeValueSetValueSetExpansionParameterComponent(String name, 52841 ValueSet.ValueSetExpansionParameterComponent element) throws IOException { 52842 if (element != null) { 52843 composeElementAttributes(element); 52844 xml.enter(FHIR_NS, name); 52845 composeValueSetValueSetExpansionParameterComponentElements(element); 52846 composeElementClose(element); 52847 xml.exit(FHIR_NS, name); 52848 } 52849 } 52850 52851 protected void composeValueSetValueSetExpansionParameterComponentElements( 52852 ValueSet.ValueSetExpansionParameterComponent element) throws IOException { 52853 composeBackboneElementElements(element); 52854 if (element.hasNameElement()) { 52855 composeString("name", element.getNameElement()); 52856 } 52857 if (element.hasValue()) { 52858 composeType("value", element.getValue()); 52859 } 52860 } 52861 52862 protected void composeValueSetValueSetExpansionContainsComponent(String name, 52863 ValueSet.ValueSetExpansionContainsComponent element) throws IOException { 52864 if (element != null) { 52865 composeElementAttributes(element); 52866 xml.enter(FHIR_NS, name); 52867 composeValueSetValueSetExpansionContainsComponentElements(element); 52868 composeElementClose(element); 52869 xml.exit(FHIR_NS, name); 52870 } 52871 } 52872 52873 protected void composeValueSetValueSetExpansionContainsComponentElements( 52874 ValueSet.ValueSetExpansionContainsComponent element) throws IOException { 52875 composeBackboneElementElements(element); 52876 if (element.hasSystemElement()) { 52877 composeUri("system", element.getSystemElement()); 52878 } 52879 if (element.hasAbstractElement()) { 52880 composeBoolean("abstract", element.getAbstractElement()); 52881 } 52882 if (element.hasInactiveElement()) { 52883 composeBoolean("inactive", element.getInactiveElement()); 52884 } 52885 if (element.hasVersionElement()) { 52886 composeString("version", element.getVersionElement()); 52887 } 52888 if (element.hasCodeElement()) { 52889 composeCode("code", element.getCodeElement()); 52890 } 52891 if (element.hasDisplayElement()) { 52892 composeString("display", element.getDisplayElement()); 52893 } 52894 if (element.hasDesignation()) { 52895 for (ValueSet.ConceptReferenceDesignationComponent e : element.getDesignation()) 52896 composeValueSetConceptReferenceDesignationComponent("designation", e); 52897 } 52898 if (element.hasContains()) { 52899 for (ValueSet.ValueSetExpansionContainsComponent e : element.getContains()) 52900 composeValueSetValueSetExpansionContainsComponent("contains", e); 52901 } 52902 } 52903 52904 protected void composeVerificationResult(String name, VerificationResult element) throws IOException { 52905 if (element != null) { 52906 composeDomainResourceAttributes(element); 52907 xml.enter(FHIR_NS, name); 52908 composeVerificationResultElements(element); 52909 composeElementClose(element); 52910 xml.exit(FHIR_NS, name); 52911 } 52912 } 52913 52914 protected void composeVerificationResultElements(VerificationResult element) throws IOException { 52915 composeDomainResourceElements(element); 52916 if (element.hasTarget()) { 52917 for (Reference e : element.getTarget()) 52918 composeReference("target", e); 52919 } 52920 if (element.hasTargetLocation()) { 52921 for (StringType e : element.getTargetLocation()) 52922 composeString("targetLocation", e); 52923 } 52924 if (element.hasNeed()) { 52925 composeCodeableConcept("need", element.getNeed()); 52926 } 52927 if (element.hasStatusElement()) 52928 composeEnumeration("status", element.getStatusElement(), new VerificationResult.StatusEnumFactory()); 52929 if (element.hasStatusDateElement()) { 52930 composeDateTime("statusDate", element.getStatusDateElement()); 52931 } 52932 if (element.hasValidationType()) { 52933 composeCodeableConcept("validationType", element.getValidationType()); 52934 } 52935 if (element.hasValidationProcess()) { 52936 for (CodeableConcept e : element.getValidationProcess()) 52937 composeCodeableConcept("validationProcess", e); 52938 } 52939 if (element.hasFrequency()) { 52940 composeTiming("frequency", element.getFrequency()); 52941 } 52942 if (element.hasLastPerformedElement()) { 52943 composeDateTime("lastPerformed", element.getLastPerformedElement()); 52944 } 52945 if (element.hasNextScheduledElement()) { 52946 composeDate("nextScheduled", element.getNextScheduledElement()); 52947 } 52948 if (element.hasFailureAction()) { 52949 composeCodeableConcept("failureAction", element.getFailureAction()); 52950 } 52951 if (element.hasPrimarySource()) { 52952 for (VerificationResult.VerificationResultPrimarySourceComponent e : element.getPrimarySource()) 52953 composeVerificationResultVerificationResultPrimarySourceComponent("primarySource", e); 52954 } 52955 if (element.hasAttestation()) { 52956 composeVerificationResultVerificationResultAttestationComponent("attestation", element.getAttestation()); 52957 } 52958 if (element.hasValidator()) { 52959 for (VerificationResult.VerificationResultValidatorComponent e : element.getValidator()) 52960 composeVerificationResultVerificationResultValidatorComponent("validator", e); 52961 } 52962 } 52963 52964 protected void composeVerificationResultVerificationResultPrimarySourceComponent(String name, 52965 VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException { 52966 if (element != null) { 52967 composeElementAttributes(element); 52968 xml.enter(FHIR_NS, name); 52969 composeVerificationResultVerificationResultPrimarySourceComponentElements(element); 52970 composeElementClose(element); 52971 xml.exit(FHIR_NS, name); 52972 } 52973 } 52974 52975 protected void composeVerificationResultVerificationResultPrimarySourceComponentElements( 52976 VerificationResult.VerificationResultPrimarySourceComponent element) throws IOException { 52977 composeBackboneElementElements(element); 52978 if (element.hasWho()) { 52979 composeReference("who", element.getWho()); 52980 } 52981 if (element.hasType()) { 52982 for (CodeableConcept e : element.getType()) 52983 composeCodeableConcept("type", e); 52984 } 52985 if (element.hasCommunicationMethod()) { 52986 for (CodeableConcept e : element.getCommunicationMethod()) 52987 composeCodeableConcept("communicationMethod", e); 52988 } 52989 if (element.hasValidationStatus()) { 52990 composeCodeableConcept("validationStatus", element.getValidationStatus()); 52991 } 52992 if (element.hasValidationDateElement()) { 52993 composeDateTime("validationDate", element.getValidationDateElement()); 52994 } 52995 if (element.hasCanPushUpdates()) { 52996 composeCodeableConcept("canPushUpdates", element.getCanPushUpdates()); 52997 } 52998 if (element.hasPushTypeAvailable()) { 52999 for (CodeableConcept e : element.getPushTypeAvailable()) 53000 composeCodeableConcept("pushTypeAvailable", e); 53001 } 53002 } 53003 53004 protected void composeVerificationResultVerificationResultAttestationComponent(String name, 53005 VerificationResult.VerificationResultAttestationComponent element) throws IOException { 53006 if (element != null) { 53007 composeElementAttributes(element); 53008 xml.enter(FHIR_NS, name); 53009 composeVerificationResultVerificationResultAttestationComponentElements(element); 53010 composeElementClose(element); 53011 xml.exit(FHIR_NS, name); 53012 } 53013 } 53014 53015 protected void composeVerificationResultVerificationResultAttestationComponentElements( 53016 VerificationResult.VerificationResultAttestationComponent element) throws IOException { 53017 composeBackboneElementElements(element); 53018 if (element.hasWho()) { 53019 composeReference("who", element.getWho()); 53020 } 53021 if (element.hasOnBehalfOf()) { 53022 composeReference("onBehalfOf", element.getOnBehalfOf()); 53023 } 53024 if (element.hasCommunicationMethod()) { 53025 composeCodeableConcept("communicationMethod", element.getCommunicationMethod()); 53026 } 53027 if (element.hasDateElement()) { 53028 composeDate("date", element.getDateElement()); 53029 } 53030 if (element.hasSourceIdentityCertificateElement()) { 53031 composeString("sourceIdentityCertificate", element.getSourceIdentityCertificateElement()); 53032 } 53033 if (element.hasProxyIdentityCertificateElement()) { 53034 composeString("proxyIdentityCertificate", element.getProxyIdentityCertificateElement()); 53035 } 53036 if (element.hasProxySignature()) { 53037 composeSignature("proxySignature", element.getProxySignature()); 53038 } 53039 if (element.hasSourceSignature()) { 53040 composeSignature("sourceSignature", element.getSourceSignature()); 53041 } 53042 } 53043 53044 protected void composeVerificationResultVerificationResultValidatorComponent(String name, 53045 VerificationResult.VerificationResultValidatorComponent element) throws IOException { 53046 if (element != null) { 53047 composeElementAttributes(element); 53048 xml.enter(FHIR_NS, name); 53049 composeVerificationResultVerificationResultValidatorComponentElements(element); 53050 composeElementClose(element); 53051 xml.exit(FHIR_NS, name); 53052 } 53053 } 53054 53055 protected void composeVerificationResultVerificationResultValidatorComponentElements( 53056 VerificationResult.VerificationResultValidatorComponent element) throws IOException { 53057 composeBackboneElementElements(element); 53058 if (element.hasOrganization()) { 53059 composeReference("organization", element.getOrganization()); 53060 } 53061 if (element.hasIdentityCertificateElement()) { 53062 composeString("identityCertificate", element.getIdentityCertificateElement()); 53063 } 53064 if (element.hasAttestationSignature()) { 53065 composeSignature("attestationSignature", element.getAttestationSignature()); 53066 } 53067 } 53068 53069 protected void composeVisionPrescription(String name, VisionPrescription element) throws IOException { 53070 if (element != null) { 53071 composeDomainResourceAttributes(element); 53072 xml.enter(FHIR_NS, name); 53073 composeVisionPrescriptionElements(element); 53074 composeElementClose(element); 53075 xml.exit(FHIR_NS, name); 53076 } 53077 } 53078 53079 protected void composeVisionPrescriptionElements(VisionPrescription element) throws IOException { 53080 composeDomainResourceElements(element); 53081 if (element.hasIdentifier()) { 53082 for (Identifier e : element.getIdentifier()) 53083 composeIdentifier("identifier", e); 53084 } 53085 if (element.hasStatusElement()) 53086 composeEnumeration("status", element.getStatusElement(), new VisionPrescription.VisionStatusEnumFactory()); 53087 if (element.hasCreatedElement()) { 53088 composeDateTime("created", element.getCreatedElement()); 53089 } 53090 if (element.hasPatient()) { 53091 composeReference("patient", element.getPatient()); 53092 } 53093 if (element.hasEncounter()) { 53094 composeReference("encounter", element.getEncounter()); 53095 } 53096 if (element.hasDateWrittenElement()) { 53097 composeDateTime("dateWritten", element.getDateWrittenElement()); 53098 } 53099 if (element.hasPrescriber()) { 53100 composeReference("prescriber", element.getPrescriber()); 53101 } 53102 if (element.hasLensSpecification()) { 53103 for (VisionPrescription.VisionPrescriptionLensSpecificationComponent e : element.getLensSpecification()) 53104 composeVisionPrescriptionVisionPrescriptionLensSpecificationComponent("lensSpecification", e); 53105 } 53106 } 53107 53108 protected void composeVisionPrescriptionVisionPrescriptionLensSpecificationComponent(String name, 53109 VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException { 53110 if (element != null) { 53111 composeElementAttributes(element); 53112 xml.enter(FHIR_NS, name); 53113 composeVisionPrescriptionVisionPrescriptionLensSpecificationComponentElements(element); 53114 composeElementClose(element); 53115 xml.exit(FHIR_NS, name); 53116 } 53117 } 53118 53119 protected void composeVisionPrescriptionVisionPrescriptionLensSpecificationComponentElements( 53120 VisionPrescription.VisionPrescriptionLensSpecificationComponent element) throws IOException { 53121 composeBackboneElementElements(element); 53122 if (element.hasProduct()) { 53123 composeCodeableConcept("product", element.getProduct()); 53124 } 53125 if (element.hasEyeElement()) 53126 composeEnumeration("eye", element.getEyeElement(), new VisionPrescription.VisionEyesEnumFactory()); 53127 if (element.hasSphereElement()) { 53128 composeDecimal("sphere", element.getSphereElement()); 53129 } 53130 if (element.hasCylinderElement()) { 53131 composeDecimal("cylinder", element.getCylinderElement()); 53132 } 53133 if (element.hasAxisElement()) { 53134 composeInteger("axis", element.getAxisElement()); 53135 } 53136 if (element.hasPrism()) { 53137 for (VisionPrescription.PrismComponent e : element.getPrism()) 53138 composeVisionPrescriptionPrismComponent("prism", e); 53139 } 53140 if (element.hasAddElement()) { 53141 composeDecimal("add", element.getAddElement()); 53142 } 53143 if (element.hasPowerElement()) { 53144 composeDecimal("power", element.getPowerElement()); 53145 } 53146 if (element.hasBackCurveElement()) { 53147 composeDecimal("backCurve", element.getBackCurveElement()); 53148 } 53149 if (element.hasDiameterElement()) { 53150 composeDecimal("diameter", element.getDiameterElement()); 53151 } 53152 if (element.hasDuration()) { 53153 composeQuantity("duration", element.getDuration()); 53154 } 53155 if (element.hasColorElement()) { 53156 composeString("color", element.getColorElement()); 53157 } 53158 if (element.hasBrandElement()) { 53159 composeString("brand", element.getBrandElement()); 53160 } 53161 if (element.hasNote()) { 53162 for (Annotation e : element.getNote()) 53163 composeAnnotation("note", e); 53164 } 53165 } 53166 53167 protected void composeVisionPrescriptionPrismComponent(String name, VisionPrescription.PrismComponent element) 53168 throws IOException { 53169 if (element != null) { 53170 composeElementAttributes(element); 53171 xml.enter(FHIR_NS, name); 53172 composeVisionPrescriptionPrismComponentElements(element); 53173 composeElementClose(element); 53174 xml.exit(FHIR_NS, name); 53175 } 53176 } 53177 53178 protected void composeVisionPrescriptionPrismComponentElements(VisionPrescription.PrismComponent element) 53179 throws IOException { 53180 composeBackboneElementElements(element); 53181 if (element.hasAmountElement()) { 53182 composeDecimal("amount", element.getAmountElement()); 53183 } 53184 if (element.hasBaseElement()) 53185 composeEnumeration("base", element.getBaseElement(), new VisionPrescription.VisionBaseEnumFactory()); 53186 } 53187 53188 @Override 53189 protected void composeResource(Resource resource) throws IOException { 53190 if (resource instanceof Parameters) 53191 composeParameters("Parameters", (Parameters) resource); 53192 else if (resource instanceof Account) 53193 composeAccount("Account", (Account) resource); 53194 else if (resource instanceof ActivityDefinition) 53195 composeActivityDefinition("ActivityDefinition", (ActivityDefinition) resource); 53196 else if (resource instanceof AdverseEvent) 53197 composeAdverseEvent("AdverseEvent", (AdverseEvent) resource); 53198 else if (resource instanceof AllergyIntolerance) 53199 composeAllergyIntolerance("AllergyIntolerance", (AllergyIntolerance) resource); 53200 else if (resource instanceof Appointment) 53201 composeAppointment("Appointment", (Appointment) resource); 53202 else if (resource instanceof AppointmentResponse) 53203 composeAppointmentResponse("AppointmentResponse", (AppointmentResponse) resource); 53204 else if (resource instanceof AuditEvent) 53205 composeAuditEvent("AuditEvent", (AuditEvent) resource); 53206 else if (resource instanceof Basic) 53207 composeBasic("Basic", (Basic) resource); 53208 else if (resource instanceof Binary) 53209 composeBinary("Binary", (Binary) resource); 53210 else if (resource instanceof BiologicallyDerivedProduct) 53211 composeBiologicallyDerivedProduct("BiologicallyDerivedProduct", (BiologicallyDerivedProduct) resource); 53212 else if (resource instanceof BodyStructure) 53213 composeBodyStructure("BodyStructure", (BodyStructure) resource); 53214 else if (resource instanceof Bundle) 53215 composeBundle("Bundle", (Bundle) resource); 53216 else if (resource instanceof CapabilityStatement) 53217 composeCapabilityStatement("CapabilityStatement", (CapabilityStatement) resource); 53218 else if (resource instanceof CarePlan) 53219 composeCarePlan("CarePlan", (CarePlan) resource); 53220 else if (resource instanceof CareTeam) 53221 composeCareTeam("CareTeam", (CareTeam) resource); 53222 else if (resource instanceof CatalogEntry) 53223 composeCatalogEntry("CatalogEntry", (CatalogEntry) resource); 53224 else if (resource instanceof ChargeItem) 53225 composeChargeItem("ChargeItem", (ChargeItem) resource); 53226 else if (resource instanceof ChargeItemDefinition) 53227 composeChargeItemDefinition("ChargeItemDefinition", (ChargeItemDefinition) resource); 53228 else if (resource instanceof Claim) 53229 composeClaim("Claim", (Claim) resource); 53230 else if (resource instanceof ClaimResponse) 53231 composeClaimResponse("ClaimResponse", (ClaimResponse) resource); 53232 else if (resource instanceof ClinicalImpression) 53233 composeClinicalImpression("ClinicalImpression", (ClinicalImpression) resource); 53234 else if (resource instanceof CodeSystem) 53235 composeCodeSystem("CodeSystem", (CodeSystem) resource); 53236 else if (resource instanceof Communication) 53237 composeCommunication("Communication", (Communication) resource); 53238 else if (resource instanceof CommunicationRequest) 53239 composeCommunicationRequest("CommunicationRequest", (CommunicationRequest) resource); 53240 else if (resource instanceof CompartmentDefinition) 53241 composeCompartmentDefinition("CompartmentDefinition", (CompartmentDefinition) resource); 53242 else if (resource instanceof Composition) 53243 composeComposition("Composition", (Composition) resource); 53244 else if (resource instanceof ConceptMap) 53245 composeConceptMap("ConceptMap", (ConceptMap) resource); 53246 else if (resource instanceof Condition) 53247 composeCondition("Condition", (Condition) resource); 53248 else if (resource instanceof Consent) 53249 composeConsent("Consent", (Consent) resource); 53250 else if (resource instanceof Contract) 53251 composeContract("Contract", (Contract) resource); 53252 else if (resource instanceof Coverage) 53253 composeCoverage("Coverage", (Coverage) resource); 53254 else if (resource instanceof CoverageEligibilityRequest) 53255 composeCoverageEligibilityRequest("CoverageEligibilityRequest", (CoverageEligibilityRequest) resource); 53256 else if (resource instanceof CoverageEligibilityResponse) 53257 composeCoverageEligibilityResponse("CoverageEligibilityResponse", (CoverageEligibilityResponse) resource); 53258 else if (resource instanceof DetectedIssue) 53259 composeDetectedIssue("DetectedIssue", (DetectedIssue) resource); 53260 else if (resource instanceof Device) 53261 composeDevice("Device", (Device) resource); 53262 else if (resource instanceof DeviceDefinition) 53263 composeDeviceDefinition("DeviceDefinition", (DeviceDefinition) resource); 53264 else if (resource instanceof DeviceMetric) 53265 composeDeviceMetric("DeviceMetric", (DeviceMetric) resource); 53266 else if (resource instanceof DeviceRequest) 53267 composeDeviceRequest("DeviceRequest", (DeviceRequest) resource); 53268 else if (resource instanceof DeviceUseStatement) 53269 composeDeviceUseStatement("DeviceUseStatement", (DeviceUseStatement) resource); 53270 else if (resource instanceof DiagnosticReport) 53271 composeDiagnosticReport("DiagnosticReport", (DiagnosticReport) resource); 53272 else if (resource instanceof DocumentManifest) 53273 composeDocumentManifest("DocumentManifest", (DocumentManifest) resource); 53274 else if (resource instanceof DocumentReference) 53275 composeDocumentReference("DocumentReference", (DocumentReference) resource); 53276 else if (resource instanceof EffectEvidenceSynthesis) 53277 composeEffectEvidenceSynthesis("EffectEvidenceSynthesis", (EffectEvidenceSynthesis) resource); 53278 else if (resource instanceof Encounter) 53279 composeEncounter("Encounter", (Encounter) resource); 53280 else if (resource instanceof Endpoint) 53281 composeEndpoint("Endpoint", (Endpoint) resource); 53282 else if (resource instanceof EnrollmentRequest) 53283 composeEnrollmentRequest("EnrollmentRequest", (EnrollmentRequest) resource); 53284 else if (resource instanceof EnrollmentResponse) 53285 composeEnrollmentResponse("EnrollmentResponse", (EnrollmentResponse) resource); 53286 else if (resource instanceof EpisodeOfCare) 53287 composeEpisodeOfCare("EpisodeOfCare", (EpisodeOfCare) resource); 53288 else if (resource instanceof EventDefinition) 53289 composeEventDefinition("EventDefinition", (EventDefinition) resource); 53290 else if (resource instanceof Evidence) 53291 composeEvidence("Evidence", (Evidence) resource); 53292 else if (resource instanceof EvidenceVariable) 53293 composeEvidenceVariable("EvidenceVariable", (EvidenceVariable) resource); 53294 else if (resource instanceof ExampleScenario) 53295 composeExampleScenario("ExampleScenario", (ExampleScenario) resource); 53296 else if (resource instanceof ExplanationOfBenefit) 53297 composeExplanationOfBenefit("ExplanationOfBenefit", (ExplanationOfBenefit) resource); 53298 else if (resource instanceof FamilyMemberHistory) 53299 composeFamilyMemberHistory("FamilyMemberHistory", (FamilyMemberHistory) resource); 53300 else if (resource instanceof Flag) 53301 composeFlag("Flag", (Flag) resource); 53302 else if (resource instanceof Goal) 53303 composeGoal("Goal", (Goal) resource); 53304 else if (resource instanceof GraphDefinition) 53305 composeGraphDefinition("GraphDefinition", (GraphDefinition) resource); 53306 else if (resource instanceof Group) 53307 composeGroup("Group", (Group) resource); 53308 else if (resource instanceof GuidanceResponse) 53309 composeGuidanceResponse("GuidanceResponse", (GuidanceResponse) resource); 53310 else if (resource instanceof HealthcareService) 53311 composeHealthcareService("HealthcareService", (HealthcareService) resource); 53312 else if (resource instanceof ImagingStudy) 53313 composeImagingStudy("ImagingStudy", (ImagingStudy) resource); 53314 else if (resource instanceof Immunization) 53315 composeImmunization("Immunization", (Immunization) resource); 53316 else if (resource instanceof ImmunizationEvaluation) 53317 composeImmunizationEvaluation("ImmunizationEvaluation", (ImmunizationEvaluation) resource); 53318 else if (resource instanceof ImmunizationRecommendation) 53319 composeImmunizationRecommendation("ImmunizationRecommendation", (ImmunizationRecommendation) resource); 53320 else if (resource instanceof ImplementationGuide) 53321 composeImplementationGuide("ImplementationGuide", (ImplementationGuide) resource); 53322 else if (resource instanceof InsurancePlan) 53323 composeInsurancePlan("InsurancePlan", (InsurancePlan) resource); 53324 else if (resource instanceof Invoice) 53325 composeInvoice("Invoice", (Invoice) resource); 53326 else if (resource instanceof Library) 53327 composeLibrary("Library", (Library) resource); 53328 else if (resource instanceof Linkage) 53329 composeLinkage("Linkage", (Linkage) resource); 53330 else if (resource instanceof ListResource) 53331 composeListResource("List", (ListResource) resource); 53332 else if (resource instanceof Location) 53333 composeLocation("Location", (Location) resource); 53334 else if (resource instanceof Measure) 53335 composeMeasure("Measure", (Measure) resource); 53336 else if (resource instanceof MeasureReport) 53337 composeMeasureReport("MeasureReport", (MeasureReport) resource); 53338 else if (resource instanceof Media) 53339 composeMedia("Media", (Media) resource); 53340 else if (resource instanceof Medication) 53341 composeMedication("Medication", (Medication) resource); 53342 else if (resource instanceof MedicationAdministration) 53343 composeMedicationAdministration("MedicationAdministration", (MedicationAdministration) resource); 53344 else if (resource instanceof MedicationDispense) 53345 composeMedicationDispense("MedicationDispense", (MedicationDispense) resource); 53346 else if (resource instanceof MedicationKnowledge) 53347 composeMedicationKnowledge("MedicationKnowledge", (MedicationKnowledge) resource); 53348 else if (resource instanceof MedicationRequest) 53349 composeMedicationRequest("MedicationRequest", (MedicationRequest) resource); 53350 else if (resource instanceof MedicationStatement) 53351 composeMedicationStatement("MedicationStatement", (MedicationStatement) resource); 53352 else if (resource instanceof MedicinalProduct) 53353 composeMedicinalProduct("MedicinalProduct", (MedicinalProduct) resource); 53354 else if (resource instanceof MedicinalProductAuthorization) 53355 composeMedicinalProductAuthorization("MedicinalProductAuthorization", (MedicinalProductAuthorization) resource); 53356 else if (resource instanceof MedicinalProductContraindication) 53357 composeMedicinalProductContraindication("MedicinalProductContraindication", 53358 (MedicinalProductContraindication) resource); 53359 else if (resource instanceof MedicinalProductIndication) 53360 composeMedicinalProductIndication("MedicinalProductIndication", (MedicinalProductIndication) resource); 53361 else if (resource instanceof MedicinalProductIngredient) 53362 composeMedicinalProductIngredient("MedicinalProductIngredient", (MedicinalProductIngredient) resource); 53363 else if (resource instanceof MedicinalProductInteraction) 53364 composeMedicinalProductInteraction("MedicinalProductInteraction", (MedicinalProductInteraction) resource); 53365 else if (resource instanceof MedicinalProductManufactured) 53366 composeMedicinalProductManufactured("MedicinalProductManufactured", (MedicinalProductManufactured) resource); 53367 else if (resource instanceof MedicinalProductPackaged) 53368 composeMedicinalProductPackaged("MedicinalProductPackaged", (MedicinalProductPackaged) resource); 53369 else if (resource instanceof MedicinalProductPharmaceutical) 53370 composeMedicinalProductPharmaceutical("MedicinalProductPharmaceutical", 53371 (MedicinalProductPharmaceutical) resource); 53372 else if (resource instanceof MedicinalProductUndesirableEffect) 53373 composeMedicinalProductUndesirableEffect("MedicinalProductUndesirableEffect", 53374 (MedicinalProductUndesirableEffect) resource); 53375 else if (resource instanceof MessageDefinition) 53376 composeMessageDefinition("MessageDefinition", (MessageDefinition) resource); 53377 else if (resource instanceof MessageHeader) 53378 composeMessageHeader("MessageHeader", (MessageHeader) resource); 53379 else if (resource instanceof MolecularSequence) 53380 composeMolecularSequence("MolecularSequence", (MolecularSequence) resource); 53381 else if (resource instanceof NamingSystem) 53382 composeNamingSystem("NamingSystem", (NamingSystem) resource); 53383 else if (resource instanceof NutritionOrder) 53384 composeNutritionOrder("NutritionOrder", (NutritionOrder) resource); 53385 else if (resource instanceof Observation) 53386 composeObservation("Observation", (Observation) resource); 53387 else if (resource instanceof ObservationDefinition) 53388 composeObservationDefinition("ObservationDefinition", (ObservationDefinition) resource); 53389 else if (resource instanceof OperationDefinition) 53390 composeOperationDefinition("OperationDefinition", (OperationDefinition) resource); 53391 else if (resource instanceof OperationOutcome) 53392 composeOperationOutcome("OperationOutcome", (OperationOutcome) resource); 53393 else if (resource instanceof Organization) 53394 composeOrganization("Organization", (Organization) resource); 53395 else if (resource instanceof OrganizationAffiliation) 53396 composeOrganizationAffiliation("OrganizationAffiliation", (OrganizationAffiliation) resource); 53397 else if (resource instanceof Patient) 53398 composePatient("Patient", (Patient) resource); 53399 else if (resource instanceof PaymentNotice) 53400 composePaymentNotice("PaymentNotice", (PaymentNotice) resource); 53401 else if (resource instanceof PaymentReconciliation) 53402 composePaymentReconciliation("PaymentReconciliation", (PaymentReconciliation) resource); 53403 else if (resource instanceof Person) 53404 composePerson("Person", (Person) resource); 53405 else if (resource instanceof PlanDefinition) 53406 composePlanDefinition("PlanDefinition", (PlanDefinition) resource); 53407 else if (resource instanceof Practitioner) 53408 composePractitioner("Practitioner", (Practitioner) resource); 53409 else if (resource instanceof PractitionerRole) 53410 composePractitionerRole("PractitionerRole", (PractitionerRole) resource); 53411 else if (resource instanceof Procedure) 53412 composeProcedure("Procedure", (Procedure) resource); 53413 else if (resource instanceof Provenance) 53414 composeProvenance("Provenance", (Provenance) resource); 53415 else if (resource instanceof Questionnaire) 53416 composeQuestionnaire("Questionnaire", (Questionnaire) resource); 53417 else if (resource instanceof QuestionnaireResponse) 53418 composeQuestionnaireResponse("QuestionnaireResponse", (QuestionnaireResponse) resource); 53419 else if (resource instanceof RelatedPerson) 53420 composeRelatedPerson("RelatedPerson", (RelatedPerson) resource); 53421 else if (resource instanceof RequestGroup) 53422 composeRequestGroup("RequestGroup", (RequestGroup) resource); 53423 else if (resource instanceof ResearchDefinition) 53424 composeResearchDefinition("ResearchDefinition", (ResearchDefinition) resource); 53425 else if (resource instanceof ResearchElementDefinition) 53426 composeResearchElementDefinition("ResearchElementDefinition", (ResearchElementDefinition) resource); 53427 else if (resource instanceof ResearchStudy) 53428 composeResearchStudy("ResearchStudy", (ResearchStudy) resource); 53429 else if (resource instanceof ResearchSubject) 53430 composeResearchSubject("ResearchSubject", (ResearchSubject) resource); 53431 else if (resource instanceof RiskAssessment) 53432 composeRiskAssessment("RiskAssessment", (RiskAssessment) resource); 53433 else if (resource instanceof RiskEvidenceSynthesis) 53434 composeRiskEvidenceSynthesis("RiskEvidenceSynthesis", (RiskEvidenceSynthesis) resource); 53435 else if (resource instanceof Schedule) 53436 composeSchedule("Schedule", (Schedule) resource); 53437 else if (resource instanceof SearchParameter) 53438 composeSearchParameter("SearchParameter", (SearchParameter) resource); 53439 else if (resource instanceof ServiceRequest) 53440 composeServiceRequest("ServiceRequest", (ServiceRequest) resource); 53441 else if (resource instanceof Slot) 53442 composeSlot("Slot", (Slot) resource); 53443 else if (resource instanceof Specimen) 53444 composeSpecimen("Specimen", (Specimen) resource); 53445 else if (resource instanceof SpecimenDefinition) 53446 composeSpecimenDefinition("SpecimenDefinition", (SpecimenDefinition) resource); 53447 else if (resource instanceof StructureDefinition) 53448 composeStructureDefinition("StructureDefinition", (StructureDefinition) resource); 53449 else if (resource instanceof StructureMap) 53450 composeStructureMap("StructureMap", (StructureMap) resource); 53451 else if (resource instanceof Subscription) 53452 composeSubscription("Subscription", (Subscription) resource); 53453 else if (resource instanceof Substance) 53454 composeSubstance("Substance", (Substance) resource); 53455 else if (resource instanceof SubstanceNucleicAcid) 53456 composeSubstanceNucleicAcid("SubstanceNucleicAcid", (SubstanceNucleicAcid) resource); 53457 else if (resource instanceof SubstancePolymer) 53458 composeSubstancePolymer("SubstancePolymer", (SubstancePolymer) resource); 53459 else if (resource instanceof SubstanceProtein) 53460 composeSubstanceProtein("SubstanceProtein", (SubstanceProtein) resource); 53461 else if (resource instanceof SubstanceReferenceInformation) 53462 composeSubstanceReferenceInformation("SubstanceReferenceInformation", (SubstanceReferenceInformation) resource); 53463 else if (resource instanceof SubstanceSourceMaterial) 53464 composeSubstanceSourceMaterial("SubstanceSourceMaterial", (SubstanceSourceMaterial) resource); 53465 else if (resource instanceof SubstanceSpecification) 53466 composeSubstanceSpecification("SubstanceSpecification", (SubstanceSpecification) resource); 53467 else if (resource instanceof SupplyDelivery) 53468 composeSupplyDelivery("SupplyDelivery", (SupplyDelivery) resource); 53469 else if (resource instanceof SupplyRequest) 53470 composeSupplyRequest("SupplyRequest", (SupplyRequest) resource); 53471 else if (resource instanceof Task) 53472 composeTask("Task", (Task) resource); 53473 else if (resource instanceof TerminologyCapabilities) 53474 composeTerminologyCapabilities("TerminologyCapabilities", (TerminologyCapabilities) resource); 53475 else if (resource instanceof TestReport) 53476 composeTestReport("TestReport", (TestReport) resource); 53477 else if (resource instanceof TestScript) 53478 composeTestScript("TestScript", (TestScript) resource); 53479 else if (resource instanceof ValueSet) 53480 composeValueSet("ValueSet", (ValueSet) resource); 53481 else if (resource instanceof VerificationResult) 53482 composeVerificationResult("VerificationResult", (VerificationResult) resource); 53483 else if (resource instanceof VisionPrescription) 53484 composeVisionPrescription("VisionPrescription", (VisionPrescription) resource); 53485 else if (resource instanceof Binary) 53486 composeBinary("Binary", (Binary) resource); 53487 else 53488 throw new Error("Unhandled resource type " + resource.getClass().getName()); 53489 } 53490 53491 protected void composeResource(String name, Resource resource) throws IOException { 53492 if (resource instanceof Parameters) 53493 composeParameters(name, (Parameters) resource); 53494 else if (resource instanceof Account) 53495 composeAccount(name, (Account) resource); 53496 else if (resource instanceof ActivityDefinition) 53497 composeActivityDefinition(name, (ActivityDefinition) resource); 53498 else if (resource instanceof AdverseEvent) 53499 composeAdverseEvent(name, (AdverseEvent) resource); 53500 else if (resource instanceof AllergyIntolerance) 53501 composeAllergyIntolerance(name, (AllergyIntolerance) resource); 53502 else if (resource instanceof Appointment) 53503 composeAppointment(name, (Appointment) resource); 53504 else if (resource instanceof AppointmentResponse) 53505 composeAppointmentResponse(name, (AppointmentResponse) resource); 53506 else if (resource instanceof AuditEvent) 53507 composeAuditEvent(name, (AuditEvent) resource); 53508 else if (resource instanceof Basic) 53509 composeBasic(name, (Basic) resource); 53510 else if (resource instanceof Binary) 53511 composeBinary(name, (Binary) resource); 53512 else if (resource instanceof BiologicallyDerivedProduct) 53513 composeBiologicallyDerivedProduct(name, (BiologicallyDerivedProduct) resource); 53514 else if (resource instanceof BodyStructure) 53515 composeBodyStructure(name, (BodyStructure) resource); 53516 else if (resource instanceof Bundle) 53517 composeBundle(name, (Bundle) resource); 53518 else if (resource instanceof CapabilityStatement) 53519 composeCapabilityStatement(name, (CapabilityStatement) resource); 53520 else if (resource instanceof CarePlan) 53521 composeCarePlan(name, (CarePlan) resource); 53522 else if (resource instanceof CareTeam) 53523 composeCareTeam(name, (CareTeam) resource); 53524 else if (resource instanceof CatalogEntry) 53525 composeCatalogEntry(name, (CatalogEntry) resource); 53526 else if (resource instanceof ChargeItem) 53527 composeChargeItem(name, (ChargeItem) resource); 53528 else if (resource instanceof ChargeItemDefinition) 53529 composeChargeItemDefinition(name, (ChargeItemDefinition) resource); 53530 else if (resource instanceof Claim) 53531 composeClaim(name, (Claim) resource); 53532 else if (resource instanceof ClaimResponse) 53533 composeClaimResponse(name, (ClaimResponse) resource); 53534 else if (resource instanceof ClinicalImpression) 53535 composeClinicalImpression(name, (ClinicalImpression) resource); 53536 else if (resource instanceof CodeSystem) 53537 composeCodeSystem(name, (CodeSystem) resource); 53538 else if (resource instanceof Communication) 53539 composeCommunication(name, (Communication) resource); 53540 else if (resource instanceof CommunicationRequest) 53541 composeCommunicationRequest(name, (CommunicationRequest) resource); 53542 else if (resource instanceof CompartmentDefinition) 53543 composeCompartmentDefinition(name, (CompartmentDefinition) resource); 53544 else if (resource instanceof Composition) 53545 composeComposition(name, (Composition) resource); 53546 else if (resource instanceof ConceptMap) 53547 composeConceptMap(name, (ConceptMap) resource); 53548 else if (resource instanceof Condition) 53549 composeCondition(name, (Condition) resource); 53550 else if (resource instanceof Consent) 53551 composeConsent(name, (Consent) resource); 53552 else if (resource instanceof Contract) 53553 composeContract(name, (Contract) resource); 53554 else if (resource instanceof Coverage) 53555 composeCoverage(name, (Coverage) resource); 53556 else if (resource instanceof CoverageEligibilityRequest) 53557 composeCoverageEligibilityRequest(name, (CoverageEligibilityRequest) resource); 53558 else if (resource instanceof CoverageEligibilityResponse) 53559 composeCoverageEligibilityResponse(name, (CoverageEligibilityResponse) resource); 53560 else if (resource instanceof DetectedIssue) 53561 composeDetectedIssue(name, (DetectedIssue) resource); 53562 else if (resource instanceof Device) 53563 composeDevice(name, (Device) resource); 53564 else if (resource instanceof DeviceDefinition) 53565 composeDeviceDefinition(name, (DeviceDefinition) resource); 53566 else if (resource instanceof DeviceMetric) 53567 composeDeviceMetric(name, (DeviceMetric) resource); 53568 else if (resource instanceof DeviceRequest) 53569 composeDeviceRequest(name, (DeviceRequest) resource); 53570 else if (resource instanceof DeviceUseStatement) 53571 composeDeviceUseStatement(name, (DeviceUseStatement) resource); 53572 else if (resource instanceof DiagnosticReport) 53573 composeDiagnosticReport(name, (DiagnosticReport) resource); 53574 else if (resource instanceof DocumentManifest) 53575 composeDocumentManifest(name, (DocumentManifest) resource); 53576 else if (resource instanceof DocumentReference) 53577 composeDocumentReference(name, (DocumentReference) resource); 53578 else if (resource instanceof EffectEvidenceSynthesis) 53579 composeEffectEvidenceSynthesis(name, (EffectEvidenceSynthesis) resource); 53580 else if (resource instanceof Encounter) 53581 composeEncounter(name, (Encounter) resource); 53582 else if (resource instanceof Endpoint) 53583 composeEndpoint(name, (Endpoint) resource); 53584 else if (resource instanceof EnrollmentRequest) 53585 composeEnrollmentRequest(name, (EnrollmentRequest) resource); 53586 else if (resource instanceof EnrollmentResponse) 53587 composeEnrollmentResponse(name, (EnrollmentResponse) resource); 53588 else if (resource instanceof EpisodeOfCare) 53589 composeEpisodeOfCare(name, (EpisodeOfCare) resource); 53590 else if (resource instanceof EventDefinition) 53591 composeEventDefinition(name, (EventDefinition) resource); 53592 else if (resource instanceof Evidence) 53593 composeEvidence(name, (Evidence) resource); 53594 else if (resource instanceof EvidenceVariable) 53595 composeEvidenceVariable(name, (EvidenceVariable) resource); 53596 else if (resource instanceof ExampleScenario) 53597 composeExampleScenario(name, (ExampleScenario) resource); 53598 else if (resource instanceof ExplanationOfBenefit) 53599 composeExplanationOfBenefit(name, (ExplanationOfBenefit) resource); 53600 else if (resource instanceof FamilyMemberHistory) 53601 composeFamilyMemberHistory(name, (FamilyMemberHistory) resource); 53602 else if (resource instanceof Flag) 53603 composeFlag(name, (Flag) resource); 53604 else if (resource instanceof Goal) 53605 composeGoal(name, (Goal) resource); 53606 else if (resource instanceof GraphDefinition) 53607 composeGraphDefinition(name, (GraphDefinition) resource); 53608 else if (resource instanceof Group) 53609 composeGroup(name, (Group) resource); 53610 else if (resource instanceof GuidanceResponse) 53611 composeGuidanceResponse(name, (GuidanceResponse) resource); 53612 else if (resource instanceof HealthcareService) 53613 composeHealthcareService(name, (HealthcareService) resource); 53614 else if (resource instanceof ImagingStudy) 53615 composeImagingStudy(name, (ImagingStudy) resource); 53616 else if (resource instanceof Immunization) 53617 composeImmunization(name, (Immunization) resource); 53618 else if (resource instanceof ImmunizationEvaluation) 53619 composeImmunizationEvaluation(name, (ImmunizationEvaluation) resource); 53620 else if (resource instanceof ImmunizationRecommendation) 53621 composeImmunizationRecommendation(name, (ImmunizationRecommendation) resource); 53622 else if (resource instanceof ImplementationGuide) 53623 composeImplementationGuide(name, (ImplementationGuide) resource); 53624 else if (resource instanceof InsurancePlan) 53625 composeInsurancePlan(name, (InsurancePlan) resource); 53626 else if (resource instanceof Invoice) 53627 composeInvoice(name, (Invoice) resource); 53628 else if (resource instanceof Library) 53629 composeLibrary(name, (Library) resource); 53630 else if (resource instanceof Linkage) 53631 composeLinkage(name, (Linkage) resource); 53632 else if (resource instanceof ListResource) 53633 composeListResource(name, (ListResource) resource); 53634 else if (resource instanceof Location) 53635 composeLocation(name, (Location) resource); 53636 else if (resource instanceof Measure) 53637 composeMeasure(name, (Measure) resource); 53638 else if (resource instanceof MeasureReport) 53639 composeMeasureReport(name, (MeasureReport) resource); 53640 else if (resource instanceof Media) 53641 composeMedia(name, (Media) resource); 53642 else if (resource instanceof Medication) 53643 composeMedication(name, (Medication) resource); 53644 else if (resource instanceof MedicationAdministration) 53645 composeMedicationAdministration(name, (MedicationAdministration) resource); 53646 else if (resource instanceof MedicationDispense) 53647 composeMedicationDispense(name, (MedicationDispense) resource); 53648 else if (resource instanceof MedicationKnowledge) 53649 composeMedicationKnowledge(name, (MedicationKnowledge) resource); 53650 else if (resource instanceof MedicationRequest) 53651 composeMedicationRequest(name, (MedicationRequest) resource); 53652 else if (resource instanceof MedicationStatement) 53653 composeMedicationStatement(name, (MedicationStatement) resource); 53654 else if (resource instanceof MedicinalProduct) 53655 composeMedicinalProduct(name, (MedicinalProduct) resource); 53656 else if (resource instanceof MedicinalProductAuthorization) 53657 composeMedicinalProductAuthorization(name, (MedicinalProductAuthorization) resource); 53658 else if (resource instanceof MedicinalProductContraindication) 53659 composeMedicinalProductContraindication(name, (MedicinalProductContraindication) resource); 53660 else if (resource instanceof MedicinalProductIndication) 53661 composeMedicinalProductIndication(name, (MedicinalProductIndication) resource); 53662 else if (resource instanceof MedicinalProductIngredient) 53663 composeMedicinalProductIngredient(name, (MedicinalProductIngredient) resource); 53664 else if (resource instanceof MedicinalProductInteraction) 53665 composeMedicinalProductInteraction(name, (MedicinalProductInteraction) resource); 53666 else if (resource instanceof MedicinalProductManufactured) 53667 composeMedicinalProductManufactured(name, (MedicinalProductManufactured) resource); 53668 else if (resource instanceof MedicinalProductPackaged) 53669 composeMedicinalProductPackaged(name, (MedicinalProductPackaged) resource); 53670 else if (resource instanceof MedicinalProductPharmaceutical) 53671 composeMedicinalProductPharmaceutical(name, (MedicinalProductPharmaceutical) resource); 53672 else if (resource instanceof MedicinalProductUndesirableEffect) 53673 composeMedicinalProductUndesirableEffect(name, (MedicinalProductUndesirableEffect) resource); 53674 else if (resource instanceof MessageDefinition) 53675 composeMessageDefinition(name, (MessageDefinition) resource); 53676 else if (resource instanceof MessageHeader) 53677 composeMessageHeader(name, (MessageHeader) resource); 53678 else if (resource instanceof MolecularSequence) 53679 composeMolecularSequence(name, (MolecularSequence) resource); 53680 else if (resource instanceof NamingSystem) 53681 composeNamingSystem(name, (NamingSystem) resource); 53682 else if (resource instanceof NutritionOrder) 53683 composeNutritionOrder(name, (NutritionOrder) resource); 53684 else if (resource instanceof Observation) 53685 composeObservation(name, (Observation) resource); 53686 else if (resource instanceof ObservationDefinition) 53687 composeObservationDefinition(name, (ObservationDefinition) resource); 53688 else if (resource instanceof OperationDefinition) 53689 composeOperationDefinition(name, (OperationDefinition) resource); 53690 else if (resource instanceof OperationOutcome) 53691 composeOperationOutcome(name, (OperationOutcome) resource); 53692 else if (resource instanceof Organization) 53693 composeOrganization(name, (Organization) resource); 53694 else if (resource instanceof OrganizationAffiliation) 53695 composeOrganizationAffiliation(name, (OrganizationAffiliation) resource); 53696 else if (resource instanceof Patient) 53697 composePatient(name, (Patient) resource); 53698 else if (resource instanceof PaymentNotice) 53699 composePaymentNotice(name, (PaymentNotice) resource); 53700 else if (resource instanceof PaymentReconciliation) 53701 composePaymentReconciliation(name, (PaymentReconciliation) resource); 53702 else if (resource instanceof Person) 53703 composePerson(name, (Person) resource); 53704 else if (resource instanceof PlanDefinition) 53705 composePlanDefinition(name, (PlanDefinition) resource); 53706 else if (resource instanceof Practitioner) 53707 composePractitioner(name, (Practitioner) resource); 53708 else if (resource instanceof PractitionerRole) 53709 composePractitionerRole(name, (PractitionerRole) resource); 53710 else if (resource instanceof Procedure) 53711 composeProcedure(name, (Procedure) resource); 53712 else if (resource instanceof Provenance) 53713 composeProvenance(name, (Provenance) resource); 53714 else if (resource instanceof Questionnaire) 53715 composeQuestionnaire(name, (Questionnaire) resource); 53716 else if (resource instanceof QuestionnaireResponse) 53717 composeQuestionnaireResponse(name, (QuestionnaireResponse) resource); 53718 else if (resource instanceof RelatedPerson) 53719 composeRelatedPerson(name, (RelatedPerson) resource); 53720 else if (resource instanceof RequestGroup) 53721 composeRequestGroup(name, (RequestGroup) resource); 53722 else if (resource instanceof ResearchDefinition) 53723 composeResearchDefinition(name, (ResearchDefinition) resource); 53724 else if (resource instanceof ResearchElementDefinition) 53725 composeResearchElementDefinition(name, (ResearchElementDefinition) resource); 53726 else if (resource instanceof ResearchStudy) 53727 composeResearchStudy(name, (ResearchStudy) resource); 53728 else if (resource instanceof ResearchSubject) 53729 composeResearchSubject(name, (ResearchSubject) resource); 53730 else if (resource instanceof RiskAssessment) 53731 composeRiskAssessment(name, (RiskAssessment) resource); 53732 else if (resource instanceof RiskEvidenceSynthesis) 53733 composeRiskEvidenceSynthesis(name, (RiskEvidenceSynthesis) resource); 53734 else if (resource instanceof Schedule) 53735 composeSchedule(name, (Schedule) resource); 53736 else if (resource instanceof SearchParameter) 53737 composeSearchParameter(name, (SearchParameter) resource); 53738 else if (resource instanceof ServiceRequest) 53739 composeServiceRequest(name, (ServiceRequest) resource); 53740 else if (resource instanceof Slot) 53741 composeSlot(name, (Slot) resource); 53742 else if (resource instanceof Specimen) 53743 composeSpecimen(name, (Specimen) resource); 53744 else if (resource instanceof SpecimenDefinition) 53745 composeSpecimenDefinition(name, (SpecimenDefinition) resource); 53746 else if (resource instanceof StructureDefinition) 53747 composeStructureDefinition(name, (StructureDefinition) resource); 53748 else if (resource instanceof StructureMap) 53749 composeStructureMap(name, (StructureMap) resource); 53750 else if (resource instanceof Subscription) 53751 composeSubscription(name, (Subscription) resource); 53752 else if (resource instanceof Substance) 53753 composeSubstance(name, (Substance) resource); 53754 else if (resource instanceof SubstanceNucleicAcid) 53755 composeSubstanceNucleicAcid(name, (SubstanceNucleicAcid) resource); 53756 else if (resource instanceof SubstancePolymer) 53757 composeSubstancePolymer(name, (SubstancePolymer) resource); 53758 else if (resource instanceof SubstanceProtein) 53759 composeSubstanceProtein(name, (SubstanceProtein) resource); 53760 else if (resource instanceof SubstanceReferenceInformation) 53761 composeSubstanceReferenceInformation(name, (SubstanceReferenceInformation) resource); 53762 else if (resource instanceof SubstanceSourceMaterial) 53763 composeSubstanceSourceMaterial(name, (SubstanceSourceMaterial) resource); 53764 else if (resource instanceof SubstanceSpecification) 53765 composeSubstanceSpecification(name, (SubstanceSpecification) resource); 53766 else if (resource instanceof SupplyDelivery) 53767 composeSupplyDelivery(name, (SupplyDelivery) resource); 53768 else if (resource instanceof SupplyRequest) 53769 composeSupplyRequest(name, (SupplyRequest) resource); 53770 else if (resource instanceof Task) 53771 composeTask(name, (Task) resource); 53772 else if (resource instanceof TerminologyCapabilities) 53773 composeTerminologyCapabilities(name, (TerminologyCapabilities) resource); 53774 else if (resource instanceof TestReport) 53775 composeTestReport(name, (TestReport) resource); 53776 else if (resource instanceof TestScript) 53777 composeTestScript(name, (TestScript) resource); 53778 else if (resource instanceof ValueSet) 53779 composeValueSet(name, (ValueSet) resource); 53780 else if (resource instanceof VerificationResult) 53781 composeVerificationResult(name, (VerificationResult) resource); 53782 else if (resource instanceof VisionPrescription) 53783 composeVisionPrescription(name, (VisionPrescription) resource); 53784 else if (resource instanceof Binary) 53785 composeBinary(name, (Binary) resource); 53786 else 53787 throw new Error("Unhandled resource type " + resource.getClass().getName()); 53788 } 53789 53790 protected void composeType(String prefix, Type type) throws IOException { 53791 if (type == null) 53792 ; 53793 else if (type instanceof Extension) 53794 composeExtension(prefix + "Extension", (Extension) type); 53795 else if (type instanceof Narrative) 53796 composeNarrative(prefix + "Narrative", (Narrative) type); 53797 else if (type instanceof Count) 53798 composeCount(prefix + "Count", (Count) type); 53799 else if (type instanceof Dosage) 53800 composeDosage(prefix + "Dosage", (Dosage) type); 53801 else if (type instanceof MarketingStatus) 53802 composeMarketingStatus(prefix + "MarketingStatus", (MarketingStatus) type); 53803 else if (type instanceof SubstanceAmount) 53804 composeSubstanceAmount(prefix + "SubstanceAmount", (SubstanceAmount) type); 53805 else if (type instanceof Population) 53806 composePopulation(prefix + "Population", (Population) type); 53807 else if (type instanceof Distance) 53808 composeDistance(prefix + "Distance", (Distance) type); 53809 else if (type instanceof Age) 53810 composeAge(prefix + "Age", (Age) type); 53811 else if (type instanceof Duration) 53812 composeDuration(prefix + "Duration", (Duration) type); 53813 else if (type instanceof ProductShelfLife) 53814 composeProductShelfLife(prefix + "ProductShelfLife", (ProductShelfLife) type); 53815 else if (type instanceof Timing) 53816 composeTiming(prefix + "Timing", (Timing) type); 53817 else if (type instanceof ProdCharacteristic) 53818 composeProdCharacteristic(prefix + "ProdCharacteristic", (ProdCharacteristic) type); 53819 else if (type instanceof Meta) 53820 composeMeta(prefix + "Meta", (Meta) type); 53821 else if (type instanceof Address) 53822 composeAddress(prefix + "Address", (Address) type); 53823 else if (type instanceof Contributor) 53824 composeContributor(prefix + "Contributor", (Contributor) type); 53825 else if (type instanceof Attachment) 53826 composeAttachment(prefix + "Attachment", (Attachment) type); 53827 else if (type instanceof DataRequirement) 53828 composeDataRequirement(prefix + "DataRequirement", (DataRequirement) type); 53829 else if (type instanceof Money) 53830 composeMoney(prefix + "Money", (Money) type); 53831 else if (type instanceof HumanName) 53832 composeHumanName(prefix + "HumanName", (HumanName) type); 53833 else if (type instanceof ContactPoint) 53834 composeContactPoint(prefix + "ContactPoint", (ContactPoint) type); 53835 else if (type instanceof Identifier) 53836 composeIdentifier(prefix + "Identifier", (Identifier) type); 53837 else if (type instanceof Coding) 53838 composeCoding(prefix + "Coding", (Coding) type); 53839 else if (type instanceof SampledData) 53840 composeSampledData(prefix + "SampledData", (SampledData) type); 53841 else if (type instanceof Ratio) 53842 composeRatio(prefix + "Ratio", (Ratio) type); 53843 else if (type instanceof Reference) 53844 composeReference(prefix + "Reference", (Reference) type); 53845 else if (type instanceof TriggerDefinition) 53846 composeTriggerDefinition(prefix + "TriggerDefinition", (TriggerDefinition) type); 53847 else if (type instanceof Quantity) 53848 composeQuantity(prefix + "Quantity", (Quantity) type); 53849 else if (type instanceof Period) 53850 composePeriod(prefix + "Period", (Period) type); 53851 else if (type instanceof Range) 53852 composeRange(prefix + "Range", (Range) type); 53853 else if (type instanceof RelatedArtifact) 53854 composeRelatedArtifact(prefix + "RelatedArtifact", (RelatedArtifact) type); 53855 else if (type instanceof Annotation) 53856 composeAnnotation(prefix + "Annotation", (Annotation) type); 53857 else if (type instanceof ContactDetail) 53858 composeContactDetail(prefix + "ContactDetail", (ContactDetail) type); 53859 else if (type instanceof UsageContext) 53860 composeUsageContext(prefix + "UsageContext", (UsageContext) type); 53861 else if (type instanceof Expression) 53862 composeExpression(prefix + "Expression", (Expression) type); 53863 else if (type instanceof Signature) 53864 composeSignature(prefix + "Signature", (Signature) type); 53865 else if (type instanceof CodeableConcept) 53866 composeCodeableConcept(prefix + "CodeableConcept", (CodeableConcept) type); 53867 else if (type instanceof ParameterDefinition) 53868 composeParameterDefinition(prefix + "ParameterDefinition", (ParameterDefinition) type); 53869 else if (type instanceof CodeType) 53870 composeCode(prefix + "Code", (CodeType) type); 53871 else if (type instanceof OidType) 53872 composeOid(prefix + "Oid", (OidType) type); 53873 else if (type instanceof CanonicalType) 53874 composeCanonical(prefix + "Canonical", (CanonicalType) type); 53875 else if (type instanceof UuidType) 53876 composeUuid(prefix + "Uuid", (UuidType) type); 53877 else if (type instanceof UrlType) 53878 composeUrl(prefix + "Url", (UrlType) type); 53879 else if (type instanceof UnsignedIntType) 53880 composeUnsignedInt(prefix + "UnsignedInt", (UnsignedIntType) type); 53881 else if (type instanceof MarkdownType) 53882 composeMarkdown(prefix + "Markdown", (MarkdownType) type); 53883 else if (type instanceof IdType) 53884 composeId(prefix + "Id", (IdType) type); 53885 else if (type instanceof PositiveIntType) 53886 composePositiveInt(prefix + "PositiveInt", (PositiveIntType) type); 53887 else if (type instanceof DateType) 53888 composeDate(prefix + "Date", (DateType) type); 53889 else if (type instanceof DateTimeType) 53890 composeDateTime(prefix + "DateTime", (DateTimeType) type); 53891 else if (type instanceof StringType) 53892 composeString(prefix + "String", (StringType) type); 53893 else if (type instanceof IntegerType) 53894 composeInteger(prefix + "Integer", (IntegerType) type); 53895 else if (type instanceof UriType) 53896 composeUri(prefix + "Uri", (UriType) type); 53897 else if (type instanceof InstantType) 53898 composeInstant(prefix + "Instant", (InstantType) type); 53899 else if (type instanceof BooleanType) 53900 composeBoolean(prefix + "Boolean", (BooleanType) type); 53901 else if (type instanceof Base64BinaryType) 53902 composeBase64Binary(prefix + "Base64Binary", (Base64BinaryType) type); 53903 else if (type instanceof TimeType) 53904 composeTime(prefix + "Time", (TimeType) type); 53905 else if (type instanceof DecimalType) 53906 composeDecimal(prefix + "Decimal", (DecimalType) type); 53907 else 53908 throw new Error("Unhandled type"); 53909 } 53910 53911}