001package org.hl7.fhir.r5.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, \ 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this \ 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, \ 013 this list of conditions and the following disclaimer in the documentation \ 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 028 POSSIBILITY OF SUCH DAMAGE. 029 */ 030 031// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 032 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public class ResourceFactory extends Factory { 038 039 public static Resource createResource(String name) throws FHIRException { 040 if ("Account".equals(name)) 041 return new Account(); 042 if ("ActivityDefinition".equals(name)) 043 return new ActivityDefinition(); 044 if ("ActorDefinition".equals(name)) 045 return new ActorDefinition(); 046 if ("AdministrableProductDefinition".equals(name)) 047 return new AdministrableProductDefinition(); 048 if ("AdverseEvent".equals(name)) 049 return new AdverseEvent(); 050 if ("AllergyIntolerance".equals(name)) 051 return new AllergyIntolerance(); 052 if ("Appointment".equals(name)) 053 return new Appointment(); 054 if ("AppointmentResponse".equals(name)) 055 return new AppointmentResponse(); 056 if ("ArtifactAssessment".equals(name)) 057 return new ArtifactAssessment(); 058 if ("AuditEvent".equals(name)) 059 return new AuditEvent(); 060 if ("Basic".equals(name)) 061 return new Basic(); 062 if ("Binary".equals(name)) 063 return new Binary(); 064 if ("BiologicallyDerivedProduct".equals(name)) 065 return new BiologicallyDerivedProduct(); 066 if ("BiologicallyDerivedProductDispense".equals(name)) 067 return new BiologicallyDerivedProductDispense(); 068 if ("BodyStructure".equals(name)) 069 return new BodyStructure(); 070 if ("Bundle".equals(name)) 071 return new Bundle(); 072 if ("CapabilityStatement".equals(name)) 073 return new CapabilityStatement(); 074 if ("CarePlan".equals(name)) 075 return new CarePlan(); 076 if ("CareTeam".equals(name)) 077 return new CareTeam(); 078 if ("ChargeItem".equals(name)) 079 return new ChargeItem(); 080 if ("ChargeItemDefinition".equals(name)) 081 return new ChargeItemDefinition(); 082 if ("Citation".equals(name)) 083 return new Citation(); 084 if ("Claim".equals(name)) 085 return new Claim(); 086 if ("ClaimResponse".equals(name)) 087 return new ClaimResponse(); 088 if ("ClinicalImpression".equals(name)) 089 return new ClinicalImpression(); 090 if ("ClinicalUseDefinition".equals(name)) 091 return new ClinicalUseDefinition(); 092 if ("CodeSystem".equals(name)) 093 return new CodeSystem(); 094 if ("Communication".equals(name)) 095 return new Communication(); 096 if ("CommunicationRequest".equals(name)) 097 return new CommunicationRequest(); 098 if ("CompartmentDefinition".equals(name)) 099 return new CompartmentDefinition(); 100 if ("Composition".equals(name)) 101 return new Composition(); 102 if ("ConceptMap".equals(name)) 103 return new ConceptMap(); 104 if ("Condition".equals(name)) 105 return new Condition(); 106 if ("ConditionDefinition".equals(name)) 107 return new ConditionDefinition(); 108 if ("Consent".equals(name)) 109 return new Consent(); 110 if ("Contract".equals(name)) 111 return new Contract(); 112 if ("Coverage".equals(name)) 113 return new Coverage(); 114 if ("CoverageEligibilityRequest".equals(name)) 115 return new CoverageEligibilityRequest(); 116 if ("CoverageEligibilityResponse".equals(name)) 117 return new CoverageEligibilityResponse(); 118 if ("DetectedIssue".equals(name)) 119 return new DetectedIssue(); 120 if ("Device".equals(name)) 121 return new Device(); 122 if ("DeviceAssociation".equals(name)) 123 return new DeviceAssociation(); 124 if ("DeviceDefinition".equals(name)) 125 return new DeviceDefinition(); 126 if ("DeviceDispense".equals(name)) 127 return new DeviceDispense(); 128 if ("DeviceMetric".equals(name)) 129 return new DeviceMetric(); 130 if ("DeviceRequest".equals(name)) 131 return new DeviceRequest(); 132 if ("DeviceUsage".equals(name)) 133 return new DeviceUsage(); 134 if ("DiagnosticReport".equals(name)) 135 return new DiagnosticReport(); 136 if ("DocumentReference".equals(name)) 137 return new DocumentReference(); 138 if ("Encounter".equals(name)) 139 return new Encounter(); 140 if ("EncounterHistory".equals(name)) 141 return new EncounterHistory(); 142 if ("Endpoint".equals(name)) 143 return new Endpoint(); 144 if ("EnrollmentRequest".equals(name)) 145 return new EnrollmentRequest(); 146 if ("EnrollmentResponse".equals(name)) 147 return new EnrollmentResponse(); 148 if ("EpisodeOfCare".equals(name)) 149 return new EpisodeOfCare(); 150 if ("EventDefinition".equals(name)) 151 return new EventDefinition(); 152 if ("Evidence".equals(name)) 153 return new Evidence(); 154 if ("EvidenceReport".equals(name)) 155 return new EvidenceReport(); 156 if ("EvidenceVariable".equals(name)) 157 return new EvidenceVariable(); 158 if ("ExampleScenario".equals(name)) 159 return new ExampleScenario(); 160 if ("ExplanationOfBenefit".equals(name)) 161 return new ExplanationOfBenefit(); 162 if ("FamilyMemberHistory".equals(name)) 163 return new FamilyMemberHistory(); 164 if ("Flag".equals(name)) 165 return new Flag(); 166 if ("FormularyItem".equals(name)) 167 return new FormularyItem(); 168 if ("GenomicStudy".equals(name)) 169 return new GenomicStudy(); 170 if ("Goal".equals(name)) 171 return new Goal(); 172 if ("GraphDefinition".equals(name)) 173 return new GraphDefinition(); 174 if ("Group".equals(name)) 175 return new Group(); 176 if ("GuidanceResponse".equals(name)) 177 return new GuidanceResponse(); 178 if ("HealthcareService".equals(name)) 179 return new HealthcareService(); 180 if ("ImagingSelection".equals(name)) 181 return new ImagingSelection(); 182 if ("ImagingStudy".equals(name)) 183 return new ImagingStudy(); 184 if ("Immunization".equals(name)) 185 return new Immunization(); 186 if ("ImmunizationEvaluation".equals(name)) 187 return new ImmunizationEvaluation(); 188 if ("ImmunizationRecommendation".equals(name)) 189 return new ImmunizationRecommendation(); 190 if ("ImplementationGuide".equals(name)) 191 return new ImplementationGuide(); 192 if ("Ingredient".equals(name)) 193 return new Ingredient(); 194 if ("InsurancePlan".equals(name)) 195 return new InsurancePlan(); 196 if ("InventoryItem".equals(name)) 197 return new InventoryItem(); 198 if ("InventoryReport".equals(name)) 199 return new InventoryReport(); 200 if ("Invoice".equals(name)) 201 return new Invoice(); 202 if ("Library".equals(name)) 203 return new Library(); 204 if ("Linkage".equals(name)) 205 return new Linkage(); 206 if ("List".equals(name)) 207 return new ListResource(); 208 if ("Location".equals(name)) 209 return new Location(); 210 if ("ManufacturedItemDefinition".equals(name)) 211 return new ManufacturedItemDefinition(); 212 if ("Measure".equals(name)) 213 return new Measure(); 214 if ("MeasureReport".equals(name)) 215 return new MeasureReport(); 216 if ("Medication".equals(name)) 217 return new Medication(); 218 if ("MedicationAdministration".equals(name)) 219 return new MedicationAdministration(); 220 if ("MedicationDispense".equals(name)) 221 return new MedicationDispense(); 222 if ("MedicationKnowledge".equals(name)) 223 return new MedicationKnowledge(); 224 if ("MedicationRequest".equals(name)) 225 return new MedicationRequest(); 226 if ("MedicationStatement".equals(name)) 227 return new MedicationStatement(); 228 if ("MedicinalProductDefinition".equals(name)) 229 return new MedicinalProductDefinition(); 230 if ("MessageDefinition".equals(name)) 231 return new MessageDefinition(); 232 if ("MessageHeader".equals(name)) 233 return new MessageHeader(); 234 if ("MolecularSequence".equals(name)) 235 return new MolecularSequence(); 236 if ("NamingSystem".equals(name)) 237 return new NamingSystem(); 238 if ("NutritionIntake".equals(name)) 239 return new NutritionIntake(); 240 if ("NutritionOrder".equals(name)) 241 return new NutritionOrder(); 242 if ("NutritionProduct".equals(name)) 243 return new NutritionProduct(); 244 if ("Observation".equals(name)) 245 return new Observation(); 246 if ("ObservationDefinition".equals(name)) 247 return new ObservationDefinition(); 248 if ("OperationDefinition".equals(name)) 249 return new OperationDefinition(); 250 if ("OperationOutcome".equals(name)) 251 return new OperationOutcome(); 252 if ("Organization".equals(name)) 253 return new Organization(); 254 if ("OrganizationAffiliation".equals(name)) 255 return new OrganizationAffiliation(); 256 if ("PackagedProductDefinition".equals(name)) 257 return new PackagedProductDefinition(); 258 if ("Parameters".equals(name)) 259 return new Parameters(); 260 if ("Patient".equals(name)) 261 return new Patient(); 262 if ("PaymentNotice".equals(name)) 263 return new PaymentNotice(); 264 if ("PaymentReconciliation".equals(name)) 265 return new PaymentReconciliation(); 266 if ("Permission".equals(name)) 267 return new Permission(); 268 if ("Person".equals(name)) 269 return new Person(); 270 if ("PlanDefinition".equals(name)) 271 return new PlanDefinition(); 272 if ("Practitioner".equals(name)) 273 return new Practitioner(); 274 if ("PractitionerRole".equals(name)) 275 return new PractitionerRole(); 276 if ("Procedure".equals(name)) 277 return new Procedure(); 278 if ("Provenance".equals(name)) 279 return new Provenance(); 280 if ("Questionnaire".equals(name)) 281 return new Questionnaire(); 282 if ("QuestionnaireResponse".equals(name)) 283 return new QuestionnaireResponse(); 284 if ("RegulatedAuthorization".equals(name)) 285 return new RegulatedAuthorization(); 286 if ("RelatedPerson".equals(name)) 287 return new RelatedPerson(); 288 if ("RequestOrchestration".equals(name)) 289 return new RequestOrchestration(); 290 if ("Requirements".equals(name)) 291 return new Requirements(); 292 if ("ResearchStudy".equals(name)) 293 return new ResearchStudy(); 294 if ("ResearchSubject".equals(name)) 295 return new ResearchSubject(); 296 if ("RiskAssessment".equals(name)) 297 return new RiskAssessment(); 298 if ("Schedule".equals(name)) 299 return new Schedule(); 300 if ("SearchParameter".equals(name)) 301 return new SearchParameter(); 302 if ("ServiceRequest".equals(name)) 303 return new ServiceRequest(); 304 if ("Slot".equals(name)) 305 return new Slot(); 306 if ("Specimen".equals(name)) 307 return new Specimen(); 308 if ("SpecimenDefinition".equals(name)) 309 return new SpecimenDefinition(); 310 if ("StructureDefinition".equals(name)) 311 return new StructureDefinition(); 312 if ("StructureMap".equals(name)) 313 return new StructureMap(); 314 if ("Subscription".equals(name)) 315 return new Subscription(); 316 if ("SubscriptionStatus".equals(name)) 317 return new SubscriptionStatus(); 318 if ("SubscriptionTopic".equals(name)) 319 return new SubscriptionTopic(); 320 if ("Substance".equals(name)) 321 return new Substance(); 322 if ("SubstanceDefinition".equals(name)) 323 return new SubstanceDefinition(); 324 if ("SubstanceNucleicAcid".equals(name)) 325 return new SubstanceNucleicAcid(); 326 if ("SubstancePolymer".equals(name)) 327 return new SubstancePolymer(); 328 if ("SubstanceProtein".equals(name)) 329 return new SubstanceProtein(); 330 if ("SubstanceReferenceInformation".equals(name)) 331 return new SubstanceReferenceInformation(); 332 if ("SubstanceSourceMaterial".equals(name)) 333 return new SubstanceSourceMaterial(); 334 if ("SupplyDelivery".equals(name)) 335 return new SupplyDelivery(); 336 if ("SupplyRequest".equals(name)) 337 return new SupplyRequest(); 338 if ("Task".equals(name)) 339 return new Task(); 340 if ("TerminologyCapabilities".equals(name)) 341 return new TerminologyCapabilities(); 342 if ("TestPlan".equals(name)) 343 return new TestPlan(); 344 if ("TestReport".equals(name)) 345 return new TestReport(); 346 if ("TestScript".equals(name)) 347 return new TestScript(); 348 if ("Transport".equals(name)) 349 return new Transport(); 350 if ("ValueSet".equals(name)) 351 return new ValueSet(); 352 if ("VerificationResult".equals(name)) 353 return new VerificationResult(); 354 if ("VisionPrescription".equals(name)) 355 return new VisionPrescription(); 356 357 else 358 throw new FHIRException("Unknown Resource Name '"+name+"'"); 359 } 360 361 public static Element createType(String name) throws FHIRException { 362 if ("base64Binary".equals(name)) 363 return new Base64BinaryType(); 364 if ("boolean".equals(name)) 365 return new BooleanType(); 366 if ("canonical".equals(name)) 367 return new CanonicalType(); 368 if ("code".equals(name)) 369 return new CodeType(); 370 if ("date".equals(name)) 371 return new DateType(); 372 if ("dateTime".equals(name)) 373 return new DateTimeType(); 374 if ("decimal".equals(name)) 375 return new DecimalType(); 376 if ("id".equals(name)) 377 return new IdType(); 378 if ("instant".equals(name)) 379 return new InstantType(); 380 if ("integer".equals(name)) 381 return new IntegerType(); 382 if ("integer64".equals(name)) 383 return new Integer64Type(); 384 if ("markdown".equals(name)) 385 return new MarkdownType(); 386 if ("oid".equals(name)) 387 return new OidType(); 388 if ("positiveInt".equals(name)) 389 return new PositiveIntType(); 390 if ("string".equals(name)) 391 return new StringType(); 392 if ("time".equals(name)) 393 return new TimeType(); 394 if ("unsignedInt".equals(name)) 395 return new UnsignedIntType(); 396 if ("uri".equals(name)) 397 return new UriType(); 398 if ("url".equals(name)) 399 return new UrlType(); 400 if ("uuid".equals(name)) 401 return new UuidType(); 402 if ("Address".equals(name)) 403 return new Address(); 404 if ("Age".equals(name)) 405 return new Age(); 406 if ("Annotation".equals(name)) 407 return new Annotation(); 408 if ("Attachment".equals(name)) 409 return new Attachment(); 410 if ("Availability".equals(name)) 411 return new Availability(); 412 if ("CodeableConcept".equals(name)) 413 return new CodeableConcept(); 414 if ("CodeableReference".equals(name)) 415 return new CodeableReference(); 416 if ("Coding".equals(name)) 417 return new Coding(); 418 if ("ContactDetail".equals(name)) 419 return new ContactDetail(); 420 if ("ContactPoint".equals(name)) 421 return new ContactPoint(); 422 if ("Contributor".equals(name)) 423 return new Contributor(); 424 if ("Count".equals(name)) 425 return new Count(); 426 if ("DataRequirement".equals(name)) 427 return new DataRequirement(); 428 if ("Distance".equals(name)) 429 return new Distance(); 430 if ("Dosage".equals(name)) 431 return new Dosage(); 432 if ("Duration".equals(name)) 433 return new Duration(); 434 if ("ElementDefinition".equals(name)) 435 return new ElementDefinition(); 436 if ("Expression".equals(name)) 437 return new Expression(); 438 if ("ExtendedContactDetail".equals(name)) 439 return new ExtendedContactDetail(); 440 if ("Extension".equals(name)) 441 return new Extension(); 442 if ("HumanName".equals(name)) 443 return new HumanName(); 444 if ("Identifier".equals(name)) 445 return new Identifier(); 446 if ("MarketingStatus".equals(name)) 447 return new MarketingStatus(); 448 if ("Meta".equals(name)) 449 return new Meta(); 450 if ("MonetaryComponent".equals(name)) 451 return new MonetaryComponent(); 452 if ("Money".equals(name)) 453 return new Money(); 454 if ("Narrative".equals(name)) 455 return new Narrative(); 456 if ("ParameterDefinition".equals(name)) 457 return new ParameterDefinition(); 458 if ("Period".equals(name)) 459 return new Period(); 460 if ("ProductShelfLife".equals(name)) 461 return new ProductShelfLife(); 462 if ("Quantity".equals(name)) 463 return new Quantity(); 464 if ("Range".equals(name)) 465 return new Range(); 466 if ("Ratio".equals(name)) 467 return new Ratio(); 468 if ("RatioRange".equals(name)) 469 return new RatioRange(); 470 if ("Reference".equals(name)) 471 return new Reference(); 472 if ("RelatedArtifact".equals(name)) 473 return new RelatedArtifact(); 474 if ("SampledData".equals(name)) 475 return new SampledData(); 476 if ("Signature".equals(name)) 477 return new Signature(); 478 if ("Timing".equals(name)) 479 return new Timing(); 480 if ("TriggerDefinition".equals(name)) 481 return new TriggerDefinition(); 482 if ("UsageContext".equals(name)) 483 return new UsageContext(); 484 if ("VirtualServiceDetail".equals(name)) 485 return new VirtualServiceDetail(); 486 487 else 488 throw new FHIRException("Unknown Type Name '"+name+"'"); } 489 490 public static Base createResourceOrType(String name) throws FHIRException { 491 switch (name.hashCode()) { 492 case -1216012752: return new Base64BinaryType(); 493 case 64711720: return new BooleanType(); 494 case 828351732: return new CanonicalType(); 495 case 3059181: return new CodeType(); 496 case 3076014: return new DateType(); 497 case 1792749467: return new DateTimeType(); 498 case 1542263633: return new DecimalType(); 499 case 3355: return new IdType(); 500 case 1957570017: return new InstantType(); 501 case 1958052158: return new IntegerType(); 502 case 246938863: return new MarkdownType(); 503 case 110026: return new OidType(); 504 case -131262666: return new PositiveIntType(); 505 case -891985903: return new StringType(); 506 case 3560141: return new TimeType(); 507 case 1145198778: return new UnsignedIntType(); 508 case 116076: return new UriType(); 509 case 116079: return new UrlType(); 510 case 3601339: return new UuidType(); 511 case 487334413: return new Account(); 512 case 851278306: return new ActivityDefinition(); 513 case 454247688: return new ActorDefinition(); 514 case 1643210993: return new AdministrableProductDefinition(); 515 case -329624856: return new AdverseEvent(); 516 case 1721380104: return new AllergyIntolerance(); 517 case 192873343: return new Appointment(); 518 case 1733332192: return new AppointmentResponse(); 519 case -1438435756: return new ArtifactAssessment(); 520 case -632949857: return new AuditEvent(); 521 case 63955982: return new Basic(); 522 case 1989867553: return new Binary(); 523 case -310041824: return new BiologicallyDerivedProduct(); 524 case -1860867939: return new BiologicallyDerivedProductDispense(); 525 case -202769967: return new BodyStructure(); 526 case 2000952482: return new Bundle(); 527 case -871422185: return new CapabilityStatement(); 528 case 57208314: return new CarePlan(); 529 case 57320750: return new CareTeam(); 530 case -883723257: return new ChargeItem(); 531 case -315725638: return new ChargeItemDefinition(); 532 case -1378062585: return new Citation(); 533 case 65189916: return new Claim(); 534 case 1488475261: return new ClaimResponse(); 535 case -1268501092: return new ClinicalImpression(); 536 case 462236103: return new ClinicalUseDefinition(); 537 case 1076953756: return new CodeSystem(); 538 case -236322890: return new Communication(); 539 case -1874423303: return new CommunicationRequest(); 540 case 1287805733: return new CompartmentDefinition(); 541 case 828944778: return new Composition(); 542 case 57185780: return new ConceptMap(); 543 case 1142656251: return new Condition(); 544 case 1722998958: return new ConditionDefinition(); 545 case -1678813190: return new Consent(); 546 case -502303438: return new Contract(); 547 case -287122936: return new Coverage(); 548 case -140860822: return new CoverageEligibilityRequest(); 549 case -18784314: return new CoverageEligibilityResponse(); 550 case 850563927: return new DetectedIssue(); 551 case 2043677302: return new Device(); 552 case 515535915: return new DeviceAssociation(); 553 case 1083244649: return new DeviceDefinition(); 554 case -1031366157: return new DeviceDispense(); 555 case -949306426: return new DeviceMetric(); 556 case 776138553: return new DeviceRequest(); 557 case 115711179: return new DeviceUsage(); 558 case -1122842661: return new DiagnosticReport(); 559 case -1202791344: return new DocumentReference(); 560 case -766867181: return new Encounter(); 561 case -1213716479: return new EncounterHistory(); 562 case 1805746613: return new Endpoint(); 563 case -1377846581: return new EnrollmentRequest(); 564 case 289362821: return new EnrollmentResponse(); 565 case -1093178557: return new EpisodeOfCare(); 566 case 1851868013: return new EventDefinition(); 567 case 447611511: return new Evidence(); 568 case -715436405: return new EvidenceReport(); 569 case -1162161645: return new EvidenceVariable(); 570 case 1175230202: return new ExampleScenario(); 571 case -1001676601: return new ExplanationOfBenefit(); 572 case 1260711798: return new FamilyMemberHistory(); 573 case 2192268: return new Flag(); 574 case 1238228672: return new FormularyItem(); 575 case -1128240127: return new GenomicStudy(); 576 case 2224947: return new Goal(); 577 case -180371167: return new GraphDefinition(); 578 case 69076575: return new Group(); 579 case 997117913: return new GuidanceResponse(); 580 case 933423720: return new HealthcareService(); 581 case -1650574028: return new ImagingSelection(); 582 case -650580623: return new ImagingStudy(); 583 case -2004863454: return new Immunization(); 584 case -1768794370: return new ImmunizationEvaluation(); 585 case 1728372347: return new ImmunizationRecommendation(); 586 case 1410262602: return new ImplementationGuide(); 587 case 1787055601: return new Ingredient(); 588 case -1503864573: return new InsurancePlan(); 589 case -726783377: return new InventoryItem(); 590 case 1884986768: return new InventoryReport(); 591 case -670115059: return new Invoice(); 592 case 1830861979: return new Library(); 593 case 1841735333: return new Linkage(); 594 case 2368702: return new ListResource(); 595 case 1965687765: return new Location(); 596 case -116700279: return new ManufacturedItemDefinition(); 597 case -1691992770: return new Measure(); 598 case 1681397778: return new MeasureReport(); 599 case -302536977: return new Medication(); 600 case -342579923: return new MedicationAdministration(); 601 case -408244884: return new MedicationDispense(); 602 case 1537687119: return new MedicationKnowledge(); 603 case 1627523232: return new MedicationRequest(); 604 case -2097348800: return new MedicationStatement(); 605 case -1378257556: return new MedicinalProductDefinition(); 606 case -2037697382: return new MessageDefinition(); 607 case -1087398572: return new MessageHeader(); 608 case -1839726095: return new MolecularSequence(); 609 case 369315063: return new NamingSystem(); 610 case -146918204: return new NutritionIntake(); 611 case 1247831734: return new NutritionOrder(); 612 case 1768059479: return new NutritionProduct(); 613 case 1790214156: return new Observation(); 614 case 673706623: return new ObservationDefinition(); 615 case -2140710406: return new OperationDefinition(); 616 case -526550005: return new OperationOutcome(); 617 case 1343242579: return new Organization(); 618 case 2069161885: return new OrganizationAffiliation(); 619 case 577413700: return new PackagedProductDefinition(); 620 case -1842766326: return new Parameters(); 621 case 873235173: return new Patient(); 622 case 2082457694: return new PaymentNotice(); 623 case 28778089: return new PaymentReconciliation(); 624 case 1475846639: return new Permission(); 625 case -1907849355: return new Person(); 626 case 1401244028: return new PlanDefinition(); 627 case 738893626: return new Practitioner(); 628 case -621058352: return new PractitionerRole(); 629 case 908763827: return new Procedure(); 630 case 2093211201: return new Provenance(); 631 case -218088061: return new Questionnaire(); 632 case 269058788: return new QuestionnaireResponse(); 633 case 2137545436: return new RegulatedAuthorization(); 634 case 846088000: return new RelatedPerson(); 635 case 1880382482: return new RequestOrchestration(); 636 case -1455554384: return new Requirements(); 637 case 1312904398: return new ResearchStudy(); 638 case -1008013583: return new ResearchSubject(); 639 case -766422255: return new RiskAssessment(); 640 case -633276745: return new Schedule(); 641 case -912457023: return new SearchParameter(); 642 case -1944810950: return new ServiceRequest(); 643 case 2579998: return new Slot(); 644 case -2068224216: return new Specimen(); 645 case 863741595: return new SpecimenDefinition(); 646 case 1133777670: return new StructureDefinition(); 647 case 1958247177: return new StructureMap(); 648 case 505523517: return new Subscription(); 649 case 108709775: return new SubscriptionStatus(); 650 case 835579378: return new SubscriptionTopic(); 651 case -1760959152: return new Substance(); 652 case 1971491523: return new SubstanceDefinition(); 653 case -300807236: return new SubstanceNucleicAcid(); 654 case 1272939294: return new SubstancePolymer(); 655 case 1361440787: return new SubstanceProtein(); 656 case 159007313: return new SubstanceReferenceInformation(); 657 case -222622766: return new SubstanceSourceMaterial(); 658 case 383030819: return new SupplyDelivery(); 659 case 665843328: return new SupplyRequest(); 660 case 2599333: return new Task(); 661 case -549565975: return new TerminologyCapabilities(); 662 case -1082257669: return new TestPlan(); 663 case -616289146: return new TestReport(); 664 case -589453283: return new TestScript(); 665 case -1238034679: return new Transport(); 666 case -1345530543: return new ValueSet(); 667 case 957089336: return new VerificationResult(); 668 case -555387838: return new VisionPrescription(); 669 case 516961236: return new Address(); 670 case 65759: return new Age(); 671 case 438421327: return new Annotation(); 672 case 29963587: return new Attachment(); 673 case -2133104261: return new Availability(); 674 case -1153521791: return new CodeableConcept(); 675 case -464287196: return new CodeableReference(); 676 case 2023747466: return new Coding(); 677 case 973193329: return new ContactDetail(); 678 case 1428236656: return new ContactPoint(); 679 case -227407685: return new Contributor(); 680 case 65298671: return new Count(); 681 case -367870439: return new DataRequirement(); 682 case 353103893: return new Distance(); 683 case 2052815575: return new Dosage(); 684 case -1927368268: return new Duration(); 685 case -1605049009: return new ElementDefinition(); 686 case 198012600: return new Expression(); 687 case 1711712184: return new ExtendedContactDetail(); 688 case 1391410207: return new Extension(); 689 case 1592332600: return new HumanName(); 690 case 375032009: return new Identifier(); 691 case -926250600: return new MarketingStatus(); 692 case 2394661: return new Meta(); 693 case -1336076400: return new MonetaryComponent(); 694 case 74526880: return new Money(); 695 case -540546990: return new Narrative(); 696 case 671337916: return new ParameterDefinition(); 697 case -1907858975: return new Period(); 698 case 1209602103: return new ProductShelfLife(); 699 case -1220360021: return new Quantity(); 700 case 78727453: return new Range(); 701 case 78733291: return new Ratio(); 702 case -200924142: return new RatioRange(); 703 case 1078812459: return new Reference(); 704 case -330210563: return new RelatedArtifact(); 705 case 1824308900: return new SampledData(); 706 case -1217415016: return new Signature(); 707 case -1789797270: return new Timing(); 708 case 770498827: return new TriggerDefinition(); 709 case 1071332590: return new UsageContext(); 710 case 1218149947: return new VirtualServiceDetail(); 711 712 default: 713 if (name.equals("xhtml")) { 714 return new XhtmlType(); 715 } else { 716 throw new FHIRException("Unknown Resource or Type Name '"+name+"'"); 717 } 718 } 719 } 720 721 public static DataType createPrimitive(String type, String value) { 722 switch (type) { 723 case "boolean": return new BooleanType(value); 724 case "integer": return new IntegerType(value); 725 case "integer64": return new Integer64Type(value); 726 case "string": return new StringType(value); 727 case "decimal": return new DecimalType(value); 728 case "uri": return new UriType(value); 729 case "url": return new UrlType(value); 730 case "canonical": return new CanonicalType(value); 731 case "base64Binary": return new Base64BinaryType(value); 732 case "instant": return new InstantType(value); 733 case "date": return new DateType(value); 734 case "dateTime": return new DateTimeType(value); 735 case "time": return new TimeType(value); 736 case "code": return new CodeType(value); 737 case "oid": return new OidType(value); 738 case "id": return new IdType(value); 739 case "markdown": return new MarkdownType(value); 740 case "unsignedInt": return new UnsignedIntType(value); 741 case "positiveInt": return new PositiveIntType(value); 742 case "uuid": return new UuidType(value); 743 default: 744 throw new FHIRException("Unknown Primitive Type '"+type+"'"); 745 } 746 } 747 748}